require login

This commit is contained in:
James Turk 2012-05-29 00:19:20 -04:00
parent f7caaf2450
commit f6f7c19569
2 changed files with 6 additions and 1 deletions

View File

@ -1,10 +1,12 @@
from itertools import izip_longest
from collections import defaultdict
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required
from fowl.game.models import (Team, TeamPoints, Star, Event, League,
OUTCOMES, TITLES)
@login_required
def events(request, league_id):
league = get_object_or_404(League, pk = league_id)
leagues = League.objects.all()
@ -26,6 +28,7 @@ def events(request, league_id):
'leagues':leagues})
@login_required
def edit_event(request, event):
if event == 'new':
event = None
@ -76,6 +79,8 @@ def edit_event(request, event):
'TITLES': TITLES}
)
@login_required
def league(request, league_id):
league = get_object_or_404(League, pk = league_id)
leagues = League.objects.all()

View File

@ -5,6 +5,6 @@ admin.autodiscover()
urlpatterns = patterns('',
url(r'^', include('fowl.game.urls')),
url(r'^accounts/login/$', 'django.contrib.auth.views.login'),
url(r'^admin/', include(admin.site.urls)),
)