[Debconf-video-commits] r368 - package/branches/pycon09/src/debconfvideo/web

benh at alioth.debian.org benh at alioth.debian.org
Sat Mar 21 18:29:02 UTC 2009


Author: benh
Date: 2009-03-21 18:29:02 +0000 (Sat, 21 Mar 2009)
New Revision: 368

Modified:
   package/branches/pycon09/src/debconfvideo/web/urls.py
Log:
Add front page with links to the most important admin pages.


Modified: package/branches/pycon09/src/debconfvideo/web/urls.py
===================================================================
--- package/branches/pycon09/src/debconfvideo/web/urls.py	2009-03-21 18:06:26 UTC (rev 367)
+++ package/branches/pycon09/src/debconfvideo/web/urls.py	2009-03-21 18:29:02 UTC (rev 368)
@@ -1,9 +1,27 @@
 from django.conf.urls.defaults import *
+from django.http import HttpResponse
 
 # Uncomment the next two lines to enable the admin:
 from django.contrib import admin
 admin.autodiscover()
 
+def front_page(request):
+    return HttpResponse('''\
+<html>
+  <head><title>Pycon Video Management</title></head>
+  <body>
+    <h1>Pycon Video Management</h1>
+    <p><a href="event/">Events</a> - all known events in the conference</p>
+    <p><a href="videorecording/">Recordings</a> - all recorded files</p>
+    <p><a href="videoeventrecording/">Event-recordings</a> - events known to have been recorded</p>
+    <p><a href="videotargetfile/">Target files</a> - completed files for publication or archival</p>
+  </body>
+</html>
+''')
+
+def admin_pyconvideo(request, url):
+    return admin.site.root(request, 'pyconvideo/' + url)
+
 urlpatterns = patterns('',
     # Example:
     # (r'^web/', include('web.foo.urls')),
@@ -14,4 +32,9 @@
 
     # Uncomment the next line to enable the admin:
     (r'^admin/(.*)', admin.site.root),
+
+    (r'^((?:event|videorecording|videoeventrecording|videotargetfile)/.*)',
+     admin_pyconvideo),
+
+    (r'^$', front_page),
 )




More information about the Debconf-video-commits mailing list