Mercurial > public > sg101
annotate gpp/views.py @ 145:71cb4208dc98
Tweak to #30, admin dashboard. Because of a bug in Django (9568), my dashboard appears on the login page. To get around this, pass in the user to the templatetag, so it can do a 'if user.is_staff' check. Also tweaked the HTML and CSS to show non-zero pending items in red. Shortened the pending item titles for readability.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 09 Dec 2009 00:03:10 +0000 |
parents | aa2b41c5212b |
children |
rev | line source |
---|---|
bgneal@19 | 1 """ |
bgneal@19 | 2 This file contains views that don't belong to any specific application. |
bgneal@19 | 3 In particular, the home page view. |
bgneal@19 | 4 """ |
bgneal@19 | 5 from django.shortcuts import render_to_response |
bgneal@19 | 6 from django.template import RequestContext |
bgneal@19 | 7 |
bgneal@19 | 8 |
bgneal@19 | 9 def home(request): |
bgneal@19 | 10 """ |
bgneal@19 | 11 The home page view of the site. |
bgneal@19 | 12 """ |
bgneal@19 | 13 return render_to_response('home.html', { |
bgneal@19 | 14 }, |
bgneal@19 | 15 context_instance = RequestContext(request)) |