Postorius (#241)

* Remove the secret key.

* Use the latest tag for postorius.

* Use the latest django-mailman3 that supports Python 3.

* Use minimum version on Django-mailman3.

* Fix import errors.
This commit is contained in:
Abhilash Raj
2018-05-16 19:52:41 -07:00
committed by GitHub
parent 7ec61d6f45
commit bbb3030359
3 changed files with 5 additions and 15 deletions

View File

@@ -16,8 +16,7 @@ RUN set -ex \
&& apk add --no-cache --virtual .mailman-rundeps bash \
postgresql-client mysql-client py-mysqldb curl mailcap \
&& pip install -U Django>=1.11 pip \
&& pip install postorius>=1.2.0a1 \
django-mailman3>=1.2.0a2 \
&& pip install postorius==1.2.0a1 \
uwsgi \
psycopg2 \
dj-database-url \

View File

@@ -58,13 +58,12 @@ ALLOWED_HOSTS = [
]
# Try to get the address of Mailman Core automatically.
MAILMAN_HOST_IP_AUTO = socket.gethostbyname('mailman-core')
# Mailman API credentials
MAILMAN_REST_API_URL = os.environ.get('MAILMAN_REST_URL', 'http://mailman-core:8001')
MAILMAN_REST_API_USER = os.environ.get('MAILMAN_REST_USER', 'restadmin')
MAILMAN_REST_API_PASS = os.environ.get('MAILMAN_REST_PASSWORD', 'restpass')
MAILMAN_ARCHIVER_FROM = (MAILMAN_HOST_IP_AUTO, os.environ.get('MAILMAN_HOST_IP', '172.19.199.2'))
MAILMAN_ARCHIVER_FROM = os.environ.get('MAILMAN_HOST_IP', '172.19.199.2')
# Application definition
@@ -92,7 +91,7 @@ INSTALLED_APPS = (
'allauth.socialaccount.providers.google',
)
_MIDDLEWARE = (
MIDDLEWARE = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@@ -106,17 +105,8 @@ _MIDDLEWARE = (
'postorius.middleware.PostoriusMiddleware',
)
# Use old-style Middleware class in Python 2 and released versions of
# Django-mailman3 don't support new style middlewares.
if sys.version_info < (3, 0):
MIDDLEWARE_CLASSES = _MIDDLEWARE
else:
MIDDLEWARE = _MIDDLEWARE
ROOT_URLCONF = 'urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',

View File

@@ -17,8 +17,9 @@
# Postorius. If not, see <http://www.gnu.org/licenses/>.
from django.conf.urls import include, url, reverse_lazy
from django.conf.urls import include, url
from django.contrib import admin
from django.urls import reverse_lazy
from django.views.generic import RedirectView
urlpatterns = [