Merge pull request #3530 from FinnStutzenstein/emailDebugFlag
Email debug flag (fixes #3526)
This commit is contained in:
commit
42b82c683b
@ -83,6 +83,10 @@ windows run::
|
|||||||
|
|
||||||
$ python manage.py start --no-browser
|
$ 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
|
To start OpenSlides with Daphne and four workers (avoid concurrent write
|
||||||
requests or use PostgreSQL, see below) run::
|
requests or use PostgreSQL, see below) run::
|
||||||
|
|
||||||
|
@ -107,6 +107,10 @@ def get_parser():
|
|||||||
'--no-browser',
|
'--no-browser',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help='Do not launch the default web browser.')
|
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(
|
subcommand_start.add_argument(
|
||||||
'--host',
|
'--host',
|
||||||
action='store',
|
action='store',
|
||||||
@ -188,6 +192,9 @@ def start(args):
|
|||||||
django.setup()
|
django.setup()
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
|
if args.debug_email:
|
||||||
|
settings.EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
||||||
# Migrate database
|
# Migrate database
|
||||||
call_command('migrate')
|
call_command('migrate')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user