Beispiel #1
0
def view_event(request, eventid):
    """
    View an Event.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param eventid: The ObjectId of the event to get details for.
    :type eventid: str
    :returns: :class:`django.http.HttpResponse`
    """

    request.user._setup()
    user = request.user

    if user.has_access_to(EventACL.READ):
        template = 'event_detail.html'
        (new_template, args) = get_event_details(eventid, user)
        if new_template:
            template = new_template
        return render_to_response(template, args, RequestContext(request))
    else:
        return render_to_response(
            "error.html",
            {'error': 'User does not have permission to view Event Details.'},
            RequestContext(request))
Beispiel #2
0
def view_event(request, eventid):
    """
    View an Event.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param eventid: The ObjectId of the event to get details for.
    :type eventid: str
    :returns: :class:`django.http.HttpResponse`
    """

    request.user._setup()
    user = request.user

    if user.has_access_to(EventACL.READ):
        template = 'event_detail.html'
        (new_template, args) = get_event_details(eventid, user)
        if new_template:
            template = new_template
        return render_to_response(template,
                                  args,
                                  RequestContext(request))
    else:
        return render_to_response("error.html",
                                  {'error': 'User does not have permission to view Event Details.'},
                                  RequestContext(request))
Beispiel #3
0
def view_event(request, eventid):
    """
    View an Event.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param eventid: The ObjectId of the event to get details for.
    :type eventid: str
    :returns: :class:`django.http.HttpResponse`
    """

    analyst = request.user.username
    template = 'event_detail.html'
    (new_template, args) = get_event_details(eventid, analyst)
    if new_template:
        template = new_template
    return render_to_response(template, args, RequestContext(request))
Beispiel #4
0
def view_event(request, eventid):
    """
    View an Event.

    :param request: Django request object (Required)
    :type request: :class:`django.http.HttpRequest`
    :param eventid: The ObjectId of the event to get details for.
    :type eventid: str
    :returns: :class:`django.http.HttpResponse`
    """

    analyst = request.user.username
    template = 'event_detail.html'
    (new_template, args) = get_event_details(eventid, analyst)
    if new_template:
        template = new_template
    return render_to_response(template,
                              args,
                              RequestContext(request))