> Or explaining what is going wrong. :-)
>
> Care to give us a few clues as to the problems you're seeing? On the
> surface, your class looks fairly much correct.
ha ha!! Yes of course this is the message that I am getting:
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
site-packages/django/core/handlers/base.py" in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
site-packages/django/contrib/syndication/views.py" in feed
19. feedgen = f(slug, request).get_feed(param)
Exception Type: TypeError at /feeds/media/usersmedia/tim/
Exception Value: __init__() takes at least 4 arguments (3 given)
Perhaps I am passing the wrong things to it:
class LatestParticularUsersMedia(MediaRSS):
def get_object(self, bits):
if len(bits) != 1:
raise ObjectDoesNotExist
return User.objects.get(username__exact=bits[0])
def title(self, obj):
return u"Media for %s" % obj.username
def subtitle(self, obj):
return "test"
def link(self, obj):
if not obj:
raise FeedDoesNotExist
return obj.get_absolute_url()
def description(self, obj):
return u"Contentcentre media recently published by %s" %
obj.username
def author_name(self, obj):
return obj.username
def items(self, obj):
mediaitems = MediaItem.objects.filter(owner__id__exact=obj.id)
return mediaitems.filter(everyone_allowed=True,
media_hidden=False)[:30]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---