Merge pull request #3530 from FinnStutzenstein/emailDebugFlag

Email debug flag (fixes #3526)
This commit is contained in:
Emanuel Schütze 2018-01-12 15:37:01 +01:00 committed by GitHub
commit 42b82c683b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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')