Commit Graph
36 Commits
Author SHA1 Message Date
Jérôme Lebleu 817015688d Bump Django to 2.0 and simplify URL routing syntax
See: https://docs.djangoproject.com/en/stable/releases/2.0/

The only required changes are - as reported in #1466 - the addition of
`app_name` in `urls.py` for URL namespaces.
2020-01-13 09:55:17 +01:00
Jérôme Lebleu 369d05e1c3 Remove the UTF-8 coding header 2020-01-07 10:16:54 +01:00
Jérôme Lebleu 74d66c00a0 Update imports for Python 3.4+ 2020-01-07 10:16:54 +01:00
Andrew Fyfe f71414ddfa add missing utf8 header
use `# -*- coding: utf-8 -*-` which is more widely supported by editors
2018-02-03 00:59:08 +00:00
Andrew Fyfe eaec271e02 pep8 fixes
- B007 Loop control variable not used within the loop body. If this is intended, start the name with an underscore.
    * modoboa/admin/lib.py
    * modoboa/admin/templatetags/admin_tags.py
    * modoboa/admin/tests/test_account.py
    * modoboa/admin/views/domain.py
    * modoboa/admin/views/identity.py
    * modoboa/core/views/dashboard.py
    * modoboa/limits/forms.py
    * modoboa/limits/handlers.py
    * modoboa/limits/tests/test_api.py
    * modoboa/limits/tests/test_domain_limits.py
    * modoboa/limits/tests/test_import.py
    * modoboa/limits/tests/test_user_limits.py
    * modoboa/limits/utils.py
    * modoboa/parameters/tools.py
    * modoboa/relaydomains/tests.py
- C402 Unnecessary generator - rewrite as a dict comprehension.
    * modoboa/admin/models/domain.py
    * modoboa/admin/views/domain.py
    * modoboa/admin/views/identity.py
    * modoboa/limits/searializers.py
- C407 Unnecessary list comprehension - can take a generator.
    * modoboa/core/password_validation.py
    * modoboa/parameters/tools.py
    * modoboa/transport/backends.py
- C408 Unnecessary dict call - rewrite as a literal.
    * modoboa/admin/tests/test_account.py
    * modoboa/admin/tests/test_alias.py
    * modoboa/admin/tests/test_password_schemes.py
    * modoboa/admin/views/domain.py
    * modoboa/admin/views/identity.py
    * modoboa/core/extensions.py
    * modoboa/lib/middleware.py
    * modoboa/lib/templatetags/form_tags.py
    * modoboa/lib/templatetags/lib_tags.py
    * modoboa/lib/web_utils.py
    * modoboa/limits/handlers.py
    * modoboa/limits/tests/test_user_limits.py
- E741 ambiguous variable name
    * modoboa/core/management/commands/cleanlogs.py
    * modoboa/limits/forms.py
    * modoboa/limits/tests/test_user_limits.py
    * modoboa/limits/utils.py
    * modoboa/relaydomains/tests.py
- F401 imported but unused
    * doc/conf.py
    * modoboa/admin/views/domain.py
    * modoboa/core/app_settings.py
    * modoboa/core/management/commands/load_initial_data.py
- F821 undefined name 'raw_input'
    * modoboa/core/commands/deploy.py
- F841 local variable 'test' is assigned to but never used
    * modoboa/core/app_settings.py
- N802 function name 'setUpTestData' should be lowercase xxx
    * modoboa/lib/email_utils.py - __ for name mangeling, _ for internal
- N805 first argument of a method should be named 'self'
    * modoboa/lib/connections.py
    * modoboa/lib/singleton.py

Ignore the following
- A001 "copyright" is a python builtin and is being shadowed, consider renaming the variable
    * doc/conf.py
- A003 is a python builtin, consider renaming the class attribute
    * modoboa/admin/factories.py
    * modoboa/admin/forms/domain.py
    * modoboa/admin/management/commands/handle_mailbox_operations.py
    * modoboa/admin/management/commands/modo.py
    * modoboa/admin/management/commands/subcommands/_repair.py
    * modoboa/admin/models/domain.py
    * modoboa/admin/models/mailbox.py
    * modoboa/core/commands/__init__.py
    * modoboa/core/commands/deploy.py
    * modoboa/core/commands/help.py
    * modoboa/core/management/commands/clean_inactive_accounts.py
    * modoboa/core/management/commands/cleanlogs.py
    * modoboa/core/management/commands/communicate_with_public_api.py
    * modoboa/core/management/commands/generate_postfix_maps.py
    * modoboa/core/management/commands/load_initial_data.py
    * modoboa/core/management/commands/set_default_site.py
- F401 imported but unused
    * modoboa/admin/apps.py - used to load handlers
    * modoboa/core/password_hashers/__init__.py - dynamically loaded
    * modoboa/limits/apps.py - used to load handlers
    * modoboa/relaydomains/apps.py - used to load handlers
    * modoboa/transport/apps.py - used to load handlers
- N802 function name should be lowercase xxx
    * modoboa/admin/tests/test_account.py
    * modoboa/admin/tests/test_alias.py
    * modoboa/admin/tests/test_domain_alias.py
    * modoboa/admin/tests/test_export.py
    * modoboa/admin/tests/test_mailbox_operations.py
    * modoboa/admin/tests/test_password_schemas.py
    * modoboa/admin/tests/test_repair.py
    * modoboa/core/tests/test_authentication.py
    * modoboa/core/tests/test_core.py
    * modoboa/core/tests/test_ldap.py
    * modoboa/core/tests/test_views.py
    * modoboa/lib/imap_utf7.py
    * modoboa/limits/tests/test_api.py
    * modoboa/limits/tests/test_domain_limits.py
    * modoboa/limits/tests/test_import.py
    * modoboa/limits/tests/test_user_limits.py
    * modoboa/relaydomains/tests.py

other fixes:
- use isinstance() instead of type() == Class
2018-02-03 00:44:00 +00:00
Andrew Fyfe 8a1d5736c9 fix quotes
This ensures all files use " for quotes with the exception of
migrations, as this are auto generated I've not modified them.

pip install unify
unify --in-place --recursive --quote \" .
2018-02-03 00:43:58 +00:00
Arthur Vuillard 3ffa3a5396 improvements in using six ; tests in modoboa.core in both python 2 and 3 2017-05-11 16:37:19 +02:00
Arthur Vuillard 615f73f272 unicode_literals everywhere and modoboa-admin deploy fixes 2017-05-11 09:25:42 +02:00
Arthur Vuillard 9a5c293d52 remove useless builtins imports 2017-05-11 00:02:00 +02:00
Antoine Nguyen 2109feffd2 Initial python3 support. 2017-05-10 18:29:17 +02:00
Antoine Nguyen 5ca4e455a8 Fixed unit test.
see #1084
2017-03-26 20:04:43 +02:00
Antoine Nguyen b1f0c3b39a Increased coverage.
see #1084
2017-03-26 19:48:10 +02:00
Antoine Nguyen 0252bccf2f Include plugins API urls if available.
see #1084
2017-03-26 18:17:36 +02:00
Antoine Nguyen 545a759967 Oups.
see #1024
2017-02-14 16:19:08 +01:00
Antoine Nguyen ec3db91b50 Update management commands.
see #1024
2017-02-14 16:04:48 +01:00
Antoine Nguyen de342d0622 Fixed top redirection.
see #1019
2017-02-08 10:16:43 +01:00
Antoine Nguyen 669bf6c76e Add unit tests to cover the extension engine. 2016-10-23 13:56:11 +02:00
Antoine Nguyen 413d01323a Send statistics to the API.
see #890
2016-06-15 21:35:45 +02:00
Stéphane Klein f7b0ee3c42 Fix check new versions bug if modoboa is offline 2015-06-23 11:58:59 +02:00
Antoine Nguyen cc4d60e479 Move DomainAdmins references (almost all) inside modoboa_admin. 2015-04-10 15:13:47 +02:00
Antoine Nguyen d1af775b64 Merge extensions and information pages.
Check updates for extensions too.
2015-04-04 13:51:57 +02:00
Antoine Nguyen dde98c235c WIP: change the way extensions initial data is loaded. 2015-01-29 21:06:15 +01:00
Antoine Nguyen 9b3d00027f Django 1.7 migrations + cleanup. 2015-01-29 11:31:50 +01:00
Antoine Nguyen 0a49b0a52b PEP8 fixes 2015-01-16 10:31:35 +01:00
Antoine Nguyen 39781e1600 PEP8 fixes 2015-01-14 13:43:35 +01:00
Antoine Nguyen b9cf349900 Few fixes.
see #537
2014-11-17 17:48:53 +01:00
Antoine Nguyen 3148fee75f Infinite scroll for the calendar list.
see #585
2014-10-08 16:33:28 +02:00
Antoine Nguyen a12e72f0c8 Use URL namespaces.
see #585
2014-09-24 21:36:29 +02:00
Antoine Nguyen 4e72d70917 Compatibility with reversion >= 1.8.
fixes #497
2013-11-12 21:48:48 +01:00
Antoine Nguyen 03b8b61a95 Merge branch 'master' into features/relay_domains 2013-11-08 11:03:50 +01:00
Antoine Nguyen 91ce9c5f5c Don't propose all extensions for top redirection. 2013-11-04 10:27:28 +01:00
Antoine Nguyen a11e69074d wip: relay domains.
Fixed various issues about:
* Permissions
* Limits

Unit tests were also added.

see #491
2013-10-31 20:35:59 +01:00
Antoine Nguyen f91ef1adf2 wip: relay domains support
* Unit tests added (limits application)
* Added support for limits
* Big changes were required
* Using standard HTTP codes to identify errors (json)
* Custom exceptions have been reworked (not finished yet)

see #491
2013-10-28 18:36:42 +01:00
Antoine Nguyen ff5b9e2457 Useless import statements removed. 2013-10-09 17:52:09 +02:00
Antoine Nguyen 1155532365 wip: Big refacto
The admin application is now a true extension.
2013-08-16 16:34:15 +02:00
Antoine Nguyen 937e09c723 wip: big refactoring
Moving files.
2013-08-14 15:43:16 +02:00