Enable Django admin site for Rietveld example (issue3982041)

9 views
Skip to first unread message

tech...@gmail.com

unread,
Jan 17, 2011, 10:10:22 AM1/17/11
to albrec...@googlemail.com, gae2d...@googlegroups.com, re...@codereview.appspotmail.com
Reviewers: Andi Albrecht,

Message:
Admin site works ok with Django 1.1.3

Please review this at http://codereview.appspot.com/3982041/

Affected files:
M examples/rietveld/TODO
M examples/rietveld/rietveld_helper/urls.py
M examples/rietveld/settings.py


Index: examples/rietveld/rietveld_helper/urls.py
===================================================================
--- examples/rietveld/rietveld_helper/urls.py (revision 155)
+++ examples/rietveld/rietveld_helper/urls.py (working copy)
@@ -1,7 +1,7 @@
from django.conf.urls.defaults import *
from django.contrib import admin

-#from codereview.urls import urlpatterns
+from codereview.urls import urlpatterns

admin.autodiscover()

@@ -10,7 +10,7 @@
{'document_root': 'static/'}),
(r'^accounts/login/$', 'django.contrib.auth.views.login'),

(r'^accounts/logout/$', 'django.contrib.auth.views.logout_then_login'),
-# ('^admin/', include(admin.site.urls)),
+ ('^admin/', include(admin.site.urls)),
('^_ah/admin', 'rietveld_helper.views.admin_redirect'),
('', include('codereview.urls')),
)
Index: examples/rietveld/settings.py
===================================================================
--- examples/rietveld/settings.py (revision 155)
+++ examples/rietveld/settings.py (working copy)
@@ -71,6 +71,7 @@
)

TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.core.context_processors.auth', # required by admin panel
'django.core.context_processors.request',
)

Index: examples/rietveld/TODO
===================================================================
--- examples/rietveld/TODO (revision 155)
+++ examples/rietveld/TODO (working copy)
@@ -1,2 +1 @@
-* Add Django admin site for Rietveld.
* How to add users (via admin site)?
\ No newline at end of file


Reply all
Reply to author
Forward
0 new messages