Thank you for explaining. This is indeed exact what I was looking for. I thought I could only pass one argument to the view.
Rob On 4 dec, 18:32, wayne <wayne.tuxro...@gmail.com> wrote: > > 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 > > So, I take it that if the user enters the above, and main1 does not > exist in the db, then you will raise an error (probably 404)? > > If so, then like I mentioned, it should suffice to do something like: > > r'^(?P<main_obj>\w+)/(?P<page_obj>\w+)$', 'view_to_pass_to' > > to match against. It will then call the view you specify, and pass > the kwargs main_obj and page_obj. You can then look up these two > slugs in your db, check if they exist, find all page_objs that link to > main_obj, etc. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.