22afaf43eb5e

Installed the django-mobileadmin stuff.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Mon, 19 Jan 2009 07:21:38 -0500
parents 24ce70aa9934
children 51222b465056
branches/tags (none)
files settings.py urls.py

Changes

--- a/settings.py	Mon Jan 19 01:15:01 2009 -0500
+++ b/settings.py	Mon Jan 19 07:21:38 2009 -0500
@@ -72,6 +72,10 @@
     BASE_DIR + 'templates/',
 )
 
+TEMPLATE_CONTEXT_PROCESSORS = ( 
+    'mobileadmin.context_processors.user_agent', 
+)
+
 INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
@@ -83,4 +87,5 @@
     'stevelosh.blog',
     'stevelosh.projects',
     'stevelosh.thoughts',
+    'mobileadmin',
 )
--- a/urls.py	Mon Jan 19 01:15:01 2009 -0500
+++ b/urls.py	Mon Jan 19 07:21:38 2009 -0500
@@ -1,10 +1,13 @@
 from django.conf.urls.defaults import *
 from django.contrib import admin
 from django.conf import settings
+import mobileadmin
 from stevelosh.rss.feeds import *
 
 
 admin.autodiscover()
+mobileadmin.autoregister()
+
 feeds = { 'blog': LatestEntries, 
           'comments': LatestComments,
           'projects': LatestProjects, 
@@ -13,6 +16,7 @@
 
 urlpatterns = patterns('',
     (r'^admin/(.*)', admin.site.root),
+    (r'^m/(.*)', mobileadmin.sites.site.root),
     url(r'^blog/$',                'stevelosh.blog.views.list',        name='blog-list-newest'),
     url(r'^blog/page/(\d+)/$',     'stevelosh.blog.views.list',        name='blog-list-page'),
     url(r'^blog/comment/$',        'stevelosh.blog.views.comment',     name='blog-post-comment'),
@@ -33,4 +37,7 @@
     urlpatterns += patterns('',
         (r'^site-media/(?P<path>.*)$', 'django.views.static.serve',
          {'document_root': settings.MEDIA_ROOT}),
-    )
\ No newline at end of file
+    )
+
+handler404 = 'mobileadmin.views.page_not_found'
+handler500 = 'mobileadmin.views.server_error'