Ejemplo n.º 1
0
def event_detail_context(request, slug, year=None, month=None, day=None):
    when = get_when_or_now(year, month, day) 
    event = get_object_or_404(Event, date__exact=when, slug=slug)
    ctxt = {
        'when':when,
        'event':event,
        'week':generate_datetime_radius(when, 3) 
    }
    return ctxt
Ejemplo n.º 2
0
def events_for_day_context(request, year=None, month=None, day=None):
    when = get_when_or_now(year, month, day).date()
    events = Event.objects.filter(date=when)
    ctxt = {
        'when':when,
        'events':events,
        'day':when,
        'week':generate_datetime_radius(when, 3) 
    }
    return ctxt
Ejemplo n.º 3
0
def events_for_day_context(request, year=None, month=None, day=None):
    when = get_when_or_now(year, month, day)
    events = Event.objects.filter(date=when)
    ctxt = {"when": when, "events": events, "day": when, "week": generate_datetime_radius(when, 3)}
    return ctxt