Exemplo n.º 1
0
def get(request):
    """
    Finds events within a given date range;
    spits out a batch of events as json.

    This web service is used by fullcalendar
    to initialise calendar views, such as
    during the initial page load, or when you
    press 'month|week|day'.

    """
    f = rip(request.GET)

    # fetch the events
    events = Event.gql(q, **f)

    # format and deliver
    return HttpResponse(json.dumps([e.dict_() for e in events]),
                        mimetype=json_hdr)
Exemplo n.º 2
0
def get(request):
    """
    Finds events within a given date range;
    spits out a batch of events as json.

    This web service is used by fullcalendar
    to initialise calendar views, such as
    during the initial page load, or when you
    press 'month|week|day'.

    """
    f = rip(request.GET)

    # fetch the events
    events = Event.gql(q, **f)

    # format and deliver
    return HttpResponse(json.dumps([e.dict_() for e in events]),
                        mimetype=json_hdr)