Email debug flag (fixes #3526)

This commit is contained in:
FinnStutzenstein 2018-01-12 08:40:15 +01:00
parent 541e1edb27
commit 9c3260d400
2 changed files with 11 additions and 0 deletions

View File

@ -83,6 +83,10 @@ windows run::
$ python manage.py start --no-browser
When debugging something email related change the email backend to console::
$ python manage.py start --debug-email
To start OpenSlides with Daphne and four workers (avoid concurrent write
requests or use PostgreSQL, see below) run::

View File

@ -107,6 +107,10 @@ def get_parser():
'--no-browser',
action='store_true',
help='Do not launch the default web browser.')
subcommand_start.add_argument(
'--debug-email',
action='store_true',
help='Change the email backend to console output.')
subcommand_start.add_argument(
'--host',
action='store',
@ -188,6 +192,9 @@ def start(args):
django.setup()
from django.conf import settings
if args.debug_email:
settings.EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# Migrate database
call_command('migrate')