Ignore:
Timestamp:
Mar 23, 2013, 11:56:33 PM (13 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
aab0dc8
Parents:
f610262
git-author:
Alex Dehnert <adehnert@…> (03/23/13 23:56:33)
git-committer:
Alex Dehnert <adehnert@…> (03/23/13 23:56:33)
Message:

Add Midway map link to front page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asadb/forms/views.py

    rf610262 r1cfab5a  
    565565##########
    566566
     567def midway_map_latest(request, ):
     568    midways = forms.models.Midway.objects.order_by('-date')[:1]
     569    if len(midways) == 0:
     570        raise Http404("No midways found.")
     571    else:
     572        url = reverse('midway-map', args=(midways[0].slug, ))
     573        return HttpResponseRedirect(url)
     574
    567575
    568576class MidwayAssignmentFilter(django_filters.FilterSet):
     
    588596            ('location', 'Location', ),
    589597        )
     598
    590599
    591600class MidwayMapView(DetailView):
Note: See TracChangeset for help on using the changeset viewer.