mezzanine_events/views.py
def event_detail(request, slug):
    """
    Detail page for an event.
    """
    templates = [
        "mezzanine_events/event_detail_{}.html".format(slug),
        "mezzanine_events/event_detail.html",
    ]
    if request.is_ajax():
        templates.insert(0, "mezzanine_events/event_detail_ajax.html")

    events = Event.objects.published(for_user=request.user).select_related()
    event = get_object_or_404(events, slug=slug)

    context = {
        "event": event,
        "editable_obj": event,
        "filter_form": ListFilterForm(),
        "filter_form_url": reverse("mezzanine_events:event_list"),
    }
    return render(request, templates, context)

    Detail page for an event.
    
Detail page for an event.
Detail page for an event .
def event_detail(request, slug):
    templates = [
        "mezzanine_events/event_detail_{}.html".format(slug),
        "mezzanine_events/event_detail.html",
    ]
    if request.is_ajax():
        templates.insert(0, "mezzanine_events/event_detail_ajax.html")
    events = Event.objects.published(for_user=request.user).select_related()
    event = get_object_or_404(events, slug=slug)
    context = {
        "event": event,
        "editable_obj": event,
        "filter_form": ListFilterForm(),
        "filter_form_url": reverse("mezzanine_events:event_list"),
    }
    return render(request, templates, context)
def event_detail ( request , slug ) : templates = [ "mezzanine_events/event_detail_{}.html" . format ( slug ) , "mezzanine_events/event_detail.html" , ] if request . is_ajax ( ) : templates . insert ( 0 , "mezzanine_events/event_detail_ajax.html" ) events = Event . objects . published ( for_user = request . user ) . select_related ( ) event = get_object_or_404 ( events , slug = slug ) context = { "event" : event , "editable_obj" : event , "filter_form" : ListFilterForm ( ) , "filter_form_url" : reverse ( "mezzanine_events:event_list" ) , } return render ( request , templates , context )
Detail page for an event.
Detail page for an event .
"""
    Detail page for an event.
    """
request
slug