mezzanine_events/views.py
def event_json(request, pk):
    """
    Returns a JSON representation of an Event.
    Other sites can use this endpoint to import events.
    """
    event = get_object_or_404(Event.objects.published(), pk=pk)
    event_dict = json.loads(serialize("json", [event]))[0]
    event_dict["occurrences"] = json.loads(serialize("json", event.occurrences.all()))
    return HttpResponse(json.dumps(event_dict), content_type="application/json")

    Returns a JSON representation of an Event.
    Other sites can use this endpoint to import events.
    
Returns a JSON representation of an Event.
Other sites can use this endpoint to import events.
Returns a JSON representation of an Event . Other sites can use this endpoint to import events .
def event_json(request, pk):
    event = get_object_or_404(Event.objects.published(), pk=pk)
    event_dict = json.loads(serialize("json", [event]))[0]
    event_dict["occurrences"] = json.loads(serialize("json", event.occurrences.all()))
    return HttpResponse(json.dumps(event_dict), content_type="application/json")
def event_json ( request , pk ) : event = get_object_or_404 ( Event . objects . published ( ) , pk = pk ) event_dict = json . loads ( serialize ( "json" , [ event ] ) ) [ 0 ] event_dict [ "occurrences" ] = json . loads ( serialize ( "json" , event . occurrences . all ( ) ) ) return HttpResponse ( json . dumps ( event_dict ) , content_type = "application/json" )
Returns a JSON representation of an Event.
Returns a JSON representation of an Event .
"""
    Returns a JSON representation of an Event.
    Other sites can use this endpoint to import events.
    """
request
pk