On Tue, 2006-10-17 at 17:45 -0700, JHeasly wrote: > Just to verify, to get something like the "complex example" of the docs > (http://www.djangoproject.com/documentation/syndication/) to work -- > where feeds publish different data for different URL parameters -- is > there anything special you need to do to the URLConf regex? Is > > (r'^rss/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', > {'feed_dict': feeds}), > > with a URL like: > > http://www.foo.com/rss/the_slug/11344/bar/ > > and this from the URLConf: > > feeds = { > 'rss': CustomRSS, > }
You're close to perfect here. The 'rss' string is either the distinguishing portion in the URL configuration (the reg-exp above) or the piece that is used by the syndication framework to identify the particular feed. In your case, with your example URL, you would need to put "the_slug" into the feeds dictionary, not "rss". This might be annoying if you have a lot of possibilities for that set, although you could fake it with a dictionary-look-alike class if you were sufficiently creative. The intended logic here, as I understand it, is to put all the feeds for a site under, say, a feeds/ directory and then feeds/rss/... is handled by your CustomRSS class and feeds/atom/... is handled by another class, etc. This can become a little fiddly if you want to hang the feeds off your main tree -- making them another entity under the same portion as the main pages -- but that is a bit fiddly anyway, so Django doesn't make it much worse. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---