If all you have is a list of users to look through the suggestions work just fine. Otherwise, it's easier to set a common root for that particular lookup, such as mysite.com/user/matt. This avoids the problem of mixing in a variable URL value with other parts of your site. It also maps nicely to a Django app as well.
On 7/29/07, Matt <[EMAIL PROTECTED]> wrote: > > > Hello list, > > I was wondering if the following is possible with the URLconf: > > I'd like the URL regex to match part of a URL if it exists within a > specific list of values. For example, if you wanted to direct users to > their area of your site, you might have something like this: > > www.mysite.com/matt --> go to my area > www.mysite.com/jess --> go to Jess' area > www.mysite.com/mark --> go to Mark's area > > In this situation you'd want a URL match for every user on your site, > which is obviously database driven. I'd like to be able to pull a list > of all the users out of the database and use a single line in my > URLconf to acheive the above. > > This could all be acheived using another view to determine whether the > given name was a valid user, and if so direct you to the appropriate > view, but wouldn't that prevent you using Django's generic views? > > Thanks, > Matt. > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---