aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTeddy Wing2014-04-20 12:26:21 -0400
committerTeddy Wing2014-04-20 12:26:21 -0400
commitba8146d30296d32b9720b274e75d0724c3559909 (patch)
tree2d229bd09f2b9b3665d9a8496f944c796c6aab4a /examples
parentc82294dab0f5dbe21b9b041d10363c938b832189 (diff)
downloaddjango-sneak-peek-ba8146d30296d32b9720b274e75d0724c3559909.tar.bz2
Enable Django admin in example project
Diffstat (limited to 'examples')
-rw-r--r--examples/djangoproject/djangoproject/settings.py2
-rw-r--r--examples/djangoproject/djangoproject/urls.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/djangoproject/djangoproject/settings.py b/examples/djangoproject/djangoproject/settings.py
index 0361033..accec56 100644
--- a/examples/djangoproject/djangoproject/settings.py
+++ b/examples/djangoproject/djangoproject/settings.py
@@ -115,7 +115,7 @@ INSTALLED_APPS = (
'django.contrib.staticfiles',
'sneak_peek_tag',
# Uncomment the next line to enable the admin:
- # 'django.contrib.admin',
+ 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
diff --git a/examples/djangoproject/djangoproject/urls.py b/examples/djangoproject/djangoproject/urls.py
index 7c1817b..37cf2ee 100644
--- a/examples/djangoproject/djangoproject/urls.py
+++ b/examples/djangoproject/djangoproject/urls.py
@@ -1,7 +1,11 @@
from django.conf.urls import patterns, include, url
from django.views.generic.base import TemplateView
+from django.contrib import admin
+admin.autodiscover()
+
urlpatterns = patterns('',
url(r'^$', TemplateView.as_view(template_name='index.html'), name='index'),
+ url(r'^admin/', include(admin.site.urls)),
)