Great I didn't know about that one. I'm curious to what are the benefits of doing it that are?
Thanks 2009/8/2 Chris Withers <ch...@simplistix.co.uk> > > Rob B (uk) wrote: > > Solved it by doing this: > > > > def profile_detail(request, name): > > p = get_object_or_404(Profile, name=name) > > return render_to_response('profile_detail.html', {'name': p}) > > How about using the detail generic view: > > from django.views.generic.list_detail import object_detail > > urlpatterns = patterns('', > (r'^(?P<name>[\w\._-]+)/$', > object_detail, > {'queryset':Profile.objects.all()})) > > cheers, > > Chris > > -- > Simplistix - Content Management, Batch Processing & Python Consulting > - http://www.simplistix.co.uk > > > > --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---