On Jan 24, 11:03 am, "vfoley" <[EMAIL PROTECTED]> wrote:
> one thing that bugs me about URL patterns is that you can specify a
> prefix only for the view functions to call, not for the URLs to match.
[snip]
> urls.py:
> urlpatterns = patterns('', prefix_url='project/',
> (r'^view/(?P<id>\d+)/$', 'myproject.myapp.views.view'),)This has bugged me before too, as I wanted to remove the regex duplication from my url patterns without having to put them in a seperate file. I remember making a regexpatterns() function that simply returned a list of tuples to extend urlpatterns. The syntax was almost exactly what you gave here in your example. I can't seem to find that bit of code I wrote, but it would be very simple to reproduce. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
