From 5b94bf5e5b5c78a1ad831c4649fba7f7e8b18457 Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Wed, 24 Jan 2018 21:07:50 +0000 Subject: [PATCH 1/3] update documentation for Django upgrade (#1333) --- doc/upgrade.rst | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/doc/upgrade.rst b/doc/upgrade.rst index 7b707ddbd..2860defa9 100644 --- a/doc/upgrade.rst +++ b/doc/upgrade.rst @@ -94,12 +94,24 @@ Specific instructions 1.10.0 ====== -First of all, update postfix map files as follows: +Edit the :file:`settings.py` file and replace the following line: + +.. sourcecode:: python + + MIDDLEWARE_CLASSES = ( + +by: + +.. sourcecode:: python + + MIDDLEWARE = ( + +Update postfix map files as follows: .. sourcecode:: bash > python manage.py generate_postfix_maps --destdir - + Then, modify postfix's configuration as follows:: smtpd_sender_login_maps = @@ -236,9 +248,9 @@ Edit your :file:`settings.py` file and apply the following modifications: * Remove the ``SWAGGER_SETTINGS`` variable * Add the following content - + .. sourcecode:: python - + # CKeditor CKEDITOR_UPLOAD_PATH = "uploads/" @@ -332,7 +344,7 @@ Edit the :file:`settings.py` and apply the following changes: * Add ``'modoboa.core.middleware.LocalConfigMiddleware'`` to ``MIDDLEWARE_CLASSES``: .. sourcecode:: python - + MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', @@ -468,7 +480,7 @@ First of all, update postfix map files as follows: .. sourcecode:: bash > python manage.py generate_postfix_maps --destdir --force-overwrite - + Then, modify postfix's configuration as follows:: smtpd_sender_login_maps = @@ -603,7 +615,7 @@ your :file:`settings.py` file, make sure it looks like this:: .. warning:: - Do not follow the regular upgrade procedure for this version. + Do not follow the regular upgrade procedure for this version. Some extension have been moved back into the main repository. The main reason for that is that using Modoboa without them doesn't make sense. @@ -628,7 +640,7 @@ Then, apply the following steps: $ pip uninstall modoboa-admin modoboa-admin-limits modoboa-admin-relaydomains #. Install all extension updates using pip (check the *Modoboa > Information* page) - + #. Manually migrate database:: $ cd @@ -648,7 +660,7 @@ This version also introduces a REST API. To enable it: #. Add ``'rest_framework.authtoken'`` to the ``INSTALLED_APPS`` variable #. Add the following configuration inside ``settings.py``:: - + # Rest framework settings REST_FRAMEWORK = { @@ -780,7 +792,7 @@ versions. To activate it, you need to update the ``TEMPLATE_CONTEXT_PROCESSORS`` variable like this:: from django.conf import global_settings - + TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( 'modoboa.core.context_processors.top_notifications', ) From 4f98ffbb4dd6891ce32c06d02c7c9c2922deaf8b Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Wed, 24 Jan 2018 22:39:50 +0000 Subject: [PATCH 2/3] don't silence pip it can provide useful information when you break something --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index bda1a8504..0222a5063 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,10 +33,10 @@ before_install: - pip install codecov install: - - pip install -q -r requirements.txt - - pip install -q -r ldap-requirements.txt - - pip install -q -r test-requirements.txt - - python setup.py -q develop + - pip install -r requirements.txt + - pip install -r ldap-requirements.txt + - pip install -r test-requirements.txt + - python setup.py develop before_script: - mkdir /tmp/slapd From 0c24969663c25f334f66ae83867faa746f2f42ed Mon Sep 17 00:00:00 2001 From: Andrew Fyfe Date: Wed, 24 Jan 2018 23:13:24 +0000 Subject: [PATCH 3/3] update migrations --- .../migrations/0013_auto_20180124_2311.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modoboa/admin/migrations/0013_auto_20180124_2311.py diff --git a/modoboa/admin/migrations/0013_auto_20180124_2311.py b/modoboa/admin/migrations/0013_auto_20180124_2311.py new file mode 100644 index 000000000..d0671ab0d --- /dev/null +++ b/modoboa/admin/migrations/0013_auto_20180124_2311.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.8 on 2018-01-24 23:11 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('admin', '0012_auto_20180112_1658'), + ] + + operations = [ + migrations.AlterField( + model_name='domain', + name='dkim_key_selector', + field=models.CharField(default='modoboa', max_length=30), + ), + migrations.AlterField( + model_name='domain', + name='type', + field=models.CharField(default='domain', max_length=20), + ), + migrations.AlterField( + model_name='mailboxoperation', + name='type', + field=models.CharField(choices=[('rename', 'rename'), ('delete', 'delete')], max_length=20), + ), + ]