public
Description: DjangoHQ is a (hand-driven) aggregator for django related news.
Homepage: http://www.djangohq.de/
Clone URL: git://github.com/bartTC/djangohq.git
djangohq / context_processors.py
100644 18 lines (16 sloc) 0.471 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from datetime import date
from django.contrib.auth.forms import AuthenticationForm
from django.conf import settings
from tagging.models import Tag
from weblog.models import Entry
 
def auth(request):
    return {
        'auth_login_url': settings.LOGIN_URL,
        'auth_logout_url': settings.LOGOUT_URL,
        'auth_form': AuthenticationForm(),
    }
 
def road_to_10(request):
    days = (date(2008,9,2)-date.today()).days
    return {
        'days_to_1': days
    }