------------------------from Model file------------------------ ... class A(models.Model): B = models.AutoField(primary_key=True) C = models.CharField(max_length=5) D = models.CharField(blank=True, max_length=255) def __unicode__(self): return unicode( self.Description ) class Admin: pass class Meta: db_table = 'A' ...
------------------------contents of a file named A------------------------ from django.contrib.syndication.feeds import Feed from Application.Project.models import A class A(Feed): title = "Title" link = "/A/" description = "RSS test" def items(self): return A.objects.order_by('B') I don't have a view for this. If one is needed, I could write one up. I was under the impression that I didn't need one to get an RSS reader to do it's thing. On Mar 20, 1:55 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-03-19 at 10:27 -0700, howaldmg wrote: > > object has no attribute 'get_feed' > > > I have followed every tutorial I could find to get a simple RSS feed > > working. This is the location of the problem: > > > /home/32358/data/python/django/django/contrib/syndication/views.py in > > feed > > > 12. try: > > 13. f = feed_dict[slug] > > 14. except KeyError: > > 15. raise Http404, "Slug %r isn't registered." % slug > > 16. try: > > > 19. feedgen = f(slug, request).get_feed(param) ... > > > 20. except feeds.FeedDoesNotExist: > > 21. raise Http404, "Invalid feed parameters. Slug %r is valid, but > > other parameters, or lack thereof, are not." % slug > > 22. response = HttpResponse(mimetype=feedgen.mime_type) > > 23. feedgen.write(response, 'utf-8') > > 24. return response > > > no tutorial actually says anything about providing a get_feed method. > > The get_feed() method is defined on the Feed class that your feed class > must inherit from. Normally, it would be easier to debug a problem like > this if you could provide a short code sample that demonstrates the > problem. This doesn't mean giving away confidential information -- just > construct a small case that displays the same problem and changes the > names from the original. If I had to guess I would say the object > returned from the feed dictionary for this particular slug doesn't > inherit from django.contrib.syndication.feeds.Feed. > > Regards, > Malcolm > > -- > He who laughs last thinks slowest.http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---