* Implement mail tracking Signed-off-by: Victor "multun" Collod <victor.collod@prologin.org> * Implement task merging * Add a mail tracker title format pattern * Autocomplete task names * Fix comment display * Track notification answers * Add a socket timeout for the mail worker A mail worker is a long running application. And sometimes, the IMAP server just hangs for hours for no apparent reason. imaplib doesn't enable setting a timeout, and setting it globally seems fine. * Only validate the merge form when submitted * Redirect to the new form when merging * Prettier task edit UI * Make task merging optional * Test mail tracking * Update documentation for mail tracking * Update dependencies * Add the TODO_COMMENT_CLASSES setting * Fix dependencies install order * Remove debug leftovers, improve documentation * Fail on missing from_address
19 lines
618 B
Python
19 lines
618 B
Python
from django.core.checks import Error, register
|
|
|
|
# the sole purpose of this warning is to prevent people who have
|
|
# django-autocomplete-light installed but not configured to start the app
|
|
@register()
|
|
def dal_check(app_configs, **kwargs):
|
|
from django.conf import settings
|
|
from todo.features import HAS_AUTOCOMPLETE
|
|
|
|
if not HAS_AUTOCOMPLETE:
|
|
return
|
|
|
|
errors = []
|
|
missing_apps = {'dal', 'dal_select2'} - set(settings.INSTALLED_APPS)
|
|
for missing_app in missing_apps:
|
|
errors.append(
|
|
Error('{} needs to be in INSTALLED_APPS'.format(missing_app))
|
|
)
|
|
return errors
|