def set_latest(request, set): """Show latest releases from set""" set = get_object_or_404(Set, name=set) queryset = set.comics.all() page = get_navigation(request, 'set', instance=set, days=1, latest=True) return generic_show(request, queryset, page, latest=True, extra_context={'set': set})
def set_show(request, set, year=None, month=None, day=None, days=1): """Show comics in this set from one or more dates""" year = year and int(year) month = month and int(month) day = day and int(day) days = days and int(days) if not (1 <= days <= settings.COMICS_MAX_DAYS_IN_PAGE): raise Http404 set = get_object_or_404(Set, name=set) queryset = set.comics.all() page = get_navigation(request, 'set', instance=set, year=year, month=month, day=day, days=days) return generic_show(request, queryset, page, extra_context={'set': set})