Permalink
Browse files

disable /admin/ in production

  • Loading branch information...
stnbu committed Aug 14, 2018
1 parent 52d2b91 commit de5109628e27466003666ca5d3b493cb3988a6b9
Showing with 6 additions and 2 deletions.
  1. +5 −1 sws/urls.py
  2. +1 −1 tabs/templates/tabs/index.html
@@ -1,9 +1,13 @@
from django.contrib import admin
from django.urls import path, include
from django.views.generic import RedirectView
from django.conf import settings
urlpatterns = [
path('', RedirectView.as_view(url='/tabs/home/')),
path('tabs/', include('tabs.urls')),
path('admin/', admin.site.urls),
]
# completely disable admin UI in production
if settings.DEBUG:
urlpatterns.append(path('admin/', admin.site.urls))
@@ -53,7 +53,7 @@ <h2>{{ current_tab.label }}</h2>
</div>
<div id="footer">
Built with <a href="">Django</a> by <a href="mailto:mburr@unintuitive.org">Mike Burr</a>
Built with <a href="https://www.djangoproject.com/">Django</a> by <a href="mailto:mburr@unintuitive.org">Mike Burr</a>
</div>
</html>

0 comments on commit de51096

Please sign in to comment.