Esempio n. 1
0
def feed_for_user(request):
    """
    An atom feed for all :model:`notification.Notice`s for a user.
    """
    feedgen = NoticeUserFeed().get_feed(request.user.username)
    response = HttpResponse(mimetype=feedgen.mime_type)
    feedgen.write(response, 'utf-8')
    return response
def feed_for_user(request):
    """
    An atom feed for all unarchived :model:`notification.Notice`s for a user.
    """
    feedgen = NoticeUserFeed().get_feed(request.user.username)
    response = HttpResponse(mimetype=feedgen.mime_type)
    feedgen.write(response, 'utf-8')
    return response
Esempio n. 3
0
def feed_for_user(request):
    """
    An atom feed for all unarchived :model:`notification.Notice`s for a user.
    """

    try:
        feedgen = NoticeUserFeed('feed', request).get_feed(request.user.username)
    except FeedDoesNotExist:
        raise Http404("Invalid feed parameters. Slug %r is valid, but other parameters, or lack thereof, are not." % slug)

    response = HttpResponse(mimetype=feedgen.mime_type)
    feedgen.write(response, 'utf-8')
    return response