mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Put local Docker setting into Jinja2 if block
This commit is contained in:
parent
8b82dfae8a
commit
5d78b32f2b
|
@ -54,11 +54,12 @@ MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware', ]
|
|||
INSTALLED_APPS += ['debug_toolbar', ]
|
||||
|
||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
||||
{% if cookiecutter.use_docker == 'y' %}
|
||||
# tricks to have debug toolbar when developing with docker
|
||||
if os.environ.get('USE_DOCKER') == 'yes':
|
||||
ip = socket.gethostbyname(socket.gethostname())
|
||||
INTERNAL_IPS += [ip[:-1] + '1']
|
||||
|
||||
{% endif %}
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'DISABLE_PANELS': [
|
||||
'debug_toolbar.panels.redirects.RedirectsPanel',
|
||||
|
|
Loading…
Reference in New Issue
Block a user