> It sounds like you have 3 views, and each one can pick from a pool of > categories. If this is correct, all you need to do is enter a line > for each view (main#), and pass the category (page#) as a variable to > the view, which can then do the lookup. You will use something like: > Thanks for the reply.
The Problem is that I want to fetch a list of categories from the database, so the amount of categories could vary. I could add them manually to urls.py but that's not my preferred way. So if a user enters mydomain.com/main1/page1 --> check if main1 exists in the database --> render a menu of all pages which are linked to main1 --> show page1 Rob > r'^main1/\w+/$' > > which will pass all characters matching the regex (here, alphanumeric > chars) to the view you specify as a positional arg. You can also pass > them as a kwarg. Read here: > http://docs.djangoproject.com/en/dev/topics/http/urls/ > > > > > Is there a way to do something like: (r'^(.*)/(.*)/$', view), (I know > > this doesn't work) > > To do something like that, instead of wildcarding everything greedily, > just pass a range of characters and symbols you will not accept > (whitespace, etc.) by using [^don't_accept_these] in your regex. -- You received this message because you are subscribed to the Google Groups "Django users" 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-users?hl=en.

