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
> 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
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
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
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
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
6 matches
Mail list logo