Re: Marking usernames as not for use dynamically

2009-11-02 Thread Javier Guerra
On Mon, Nov 2, 2009 at 2:00 PM, Max Battcher wrote: > I'm rather fond of using URLs of the form: > > http://example.com/~username/ +1 -- Javier --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Re: Marking usernames as not for use dynamically

2009-11-02 Thread Max Battcher
> Not really answering your question, but a couple simple workarounds: > > - put your user profiles under http://domain.com/profiles/username I'm rather fond of using URLs of the form: http://example.com/~username/ It's an old tradition (well, old in internet/unix years), but I think sometime

Re: Marking usernames as not for use dynamically

2009-11-02 Thread Sean Brant
Thanks Ethan. bruno you are right moving stuff under the /profiles/ namespace would solve everything. Moving the pattern last but allowing users to still create the username of "login" would prevent there username from working. You are also right about "whenever you add any other url..." this w

Re: Marking usernames as not for use dynamically

2009-11-02 Thread bruno desthuilliers
On 2 nov, 16:05, Sean Brant wrote: > So i have user profiles at http://domain.com/username. I'd like to > prevent a user from signing up with a username that is the same as a > page on my site (ie: /login/, /blog/, etc). I was thinking I could > inspect my url patterns to determine what pages exi

Re: Marking usernames as not for use dynamically

2009-11-02 Thread Ethan Jucovy
I haven't tried this, but it looks like you can use `django.core.urlresolvers.resolve(path_string)` to figure out if a view exists with a given path. http://docs.djangoproject.com/en/dev/topics/http/urls/#django.core.urlresolvers.resolve http://docs.djangoproject.com/en/dev/topics/http/urls/#resol

Marking usernames as not for use dynamically

2009-11-02 Thread Sean Brant
So i have user profiles at http://domain.com/username. I'd like to prevent a user from signing up with a username that is the same as a page on my site (ie: /login/, /blog/, etc). I was thinking I could inspect my url patterns to determine what pages exist so I can prevent that from being a usern