Perhaps try adding a URL pattern like the following: (r^(?P<user_name>\w+)/$', 'project.views.user_page')
Your view function (called "user_page") will now accept "user_name" as an argument in addition to the request object. I should warn you that using that regular expression could be dangerous, as it'll accept any string past the root url. That having been said, I'm sure there's a better way to do this, but this should get you started. On Jul 29, 7:17 pm, 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 areawww.mysite.com/jess--> go to Jess' > areawww.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 -~----------~----~----~----~------~----~------~--~---