Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:merforga/gw2raidar into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
amadanmath committed Oct 23, 2017
2 parents def6533 + 4a8a8b8 commit 6860f39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions gw2raidar/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
# (it can be set in `settings_local.py`)
ALLOWED_HOSTS = []

INTERNAL_IPS = ['127.0.0.1']


# Application definition

Expand Down Expand Up @@ -160,3 +162,8 @@
from .settings_local import *
except ImportError:
pass

if DEBUG:
if importlib.util.find_spec("debug_toolbar"):
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
9 changes: 8 additions & 1 deletion raidar/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls import url
from django.conf.urls import url, include
from django.contrib.auth import views as auth_views
import importlib

from . import views

Expand Down Expand Up @@ -30,3 +31,9 @@
url(r'^$', views.index, name = "index"),
url(r'^global_stats(?:/(?P<era_id>[0-9]+))?(?:/area-(?P<area_id>[0-9]+))?(?P<json>\.json)?$', views.global_stats, name = "global_stats"),
]

if settings.DEBUG and importlib.util.find_spec('debug_toolbar'):
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns

0 comments on commit 6860f39

Please sign in to comment.