I noticed that as well. Currently I'm using 0.2a1.dev4 and I think the
0.3 is not usable at this time (at least not compatible with most
existing apps).
I have another problem: the "feed_for_user" (r'^feed/$') doesn't work
in Django 1.3. By looking into Django 1.3 source code, I found it is
due to the deprecated "feed()" function. Although Django 1.3 provided
backwards compatibility, it doesn't work with "feed_for_user()" in
notification.
Codes I mentioned above:
in notification:
def feed_for_user(request):
"""
An atom feed for all unarchived :model:`notification.Notice`s for
a user.
"""
url = "feed/%s" % request.user.username
return feed(request, url, {
"feed": NoticeUserFeed,
})
in Django 1.3:
def feed(request, url, feed_dict=None):
"""Provided for backwards compatibility."""
from django.contrib.syndication.feeds import Feed as LegacyFeed
import warnings
warnings.warn('The syndication feed() view is deprecated. Please
use the '
'new class based view API.',
category=DeprecationWarning)
if not feed_dict:
raise Http404("No feeds are registered.")
try:
slug, param = url.split('/', 1)
except ValueError:
slug, param = url, ''
try:
f = feed_dict[slug]
except KeyError:
raise Http404("Slug %r isn't registered." % slug)
# Backwards compatibility within the backwards compatibility;
# Feeds can be updated to be class-based, but still be deployed
# using the legacy feed view. This only works if the feed takes
# no arguments (i.e., get_object returns None). Refs #14176.
if not issubclass(f, LegacyFeed):
instance = f()
instance.feed_url = getattr(f, 'feed_url', None) or
request.path
instance.title_template = f.title_template or ('feeds/
%s_title.html' % slug)
instance.description_template = f.description_template or
('feeds/%s_description.html' % slug)
return instance(request)
try:
feedgen = f(slug, request).get_feed(param)
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
On May 19, 4:27 am, Shabda Raaj <
sha...@agiliq.com> wrote:
> I am trying to use pinax/django-notifications to enable notifications
> for users. I need to send notifications via email, and show them on
> the website.
>
> This commit
>
>
https://github.com/pinax/django-notification/commit/a2fd330c11a64dfdf...