mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-14 05:36:58 +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', ]
|
INSTALLED_APPS += ['debug_toolbar', ]
|
||||||
|
|
||||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
||||||
|
{% if cookiecutter.use_docker == 'y' %}
|
||||||
# tricks to have debug toolbar when developing with docker
|
# tricks to have debug toolbar when developing with docker
|
||||||
if os.environ.get('USE_DOCKER') == 'yes':
|
if os.environ.get('USE_DOCKER') == 'yes':
|
||||||
ip = socket.gethostbyname(socket.gethostname())
|
ip = socket.gethostbyname(socket.gethostname())
|
||||||
INTERNAL_IPS += [ip[:-1] + '1']
|
INTERNAL_IPS += [ip[:-1] + '1']
|
||||||
|
{% endif %}
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
'DISABLE_PANELS': [
|
'DISABLE_PANELS': [
|
||||||
'debug_toolbar.panels.redirects.RedirectsPanel',
|
'debug_toolbar.panels.redirects.RedirectsPanel',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user