Workaround flake8 "imported but unused" errors

This commit is contained in:
Nikita P. Shupeyko 2017-04-21 18:52:53 +03:00
parent 19924fecf4
commit c4e646214a

View File

@ -12,8 +12,6 @@ Local settings
- Add django-extensions as app
"""
import socket
import os
from .base import * # noqa
# DEBUG
@ -55,6 +53,9 @@ INSTALLED_APPS += ['debug_toolbar', ]
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
{% if cookiecutter.use_docker == 'y' %}
{# [cookiecutter-django] This is a workaround to flake8 "imported but unused" errors #}
import socket
import os
# tricks to have debug toolbar when developing with docker
if os.environ.get('USE_DOCKER') == 'yes':
ip = socket.gethostbyname(socket.gethostname())