http://www.djangoproject.com/documentation/url_dispatch/
look at the regular expressions used in the examples, and the section "named groups" On Jun 23, 9:22 am, sebastian stephenson <[EMAIL PROTECTED]> wrote: > ok so I have in my data base a colium of rss feeds and I am parseing > them via feedparser and I am having a touble getting one feed to have > like "local/show/1" and another feed have "local/show/2" but how do > you do this here is the urls.py in its current state: > > from django.conf.urls.defaults import * > > urlpatterns = patterns('', > # Example: > # (r'^ubermicro/', include('ubermicro.foo.urls')), > > # Uncomment this for admin: > (r'^admin/', include('django.contrib.admin.urls')), > #temp only fo dev proposes > (r'^shows/','ubermicro.shows.views.show_page') # .* does not work > ) > > then views.py: > > from django.http import HttpResponse > import feedparser > from ubermicro.shows.models import show > from django.template import Context, loader > > def show_page(request): > """this is where we take what we need form the rss feeds in the > data base""" > query = show.objects.filter(show_feed__contains="http://") > for s in query: > podcast = feedparser.parse(s.show_feed) > if podcast.entries: > elements = {'show_about': > podcast.feed.summary,'show_latest_title': podcast.entries > [0].title,'show_latest': podcast.entries[0].summary} > e = elements > t = loader.get_template('shows/show_page_base.html') > return HttpResponse(t.render(Context(e))) > > just to say new to django and webdev python etc. so baby language > please thank you very much in advance > > Thanks > see ya > > sebey --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---