2009/3/17 Dougal Matthews :
> or just have the other pages above the users in the url conf and register
> the other usernames yourself so nobody else can and they wont be viewable
> anyway.
> Dougal
Yep, that's what I was doing originally, but I like the complicated way!
Cheers,
Andrew
--~--~--
and that would just to be too easy!
You could use subdomains for the other parts of the site? would also be an
easy/clean solution.
or just have the other pages above the users in the url conf and register
the other usernames yourself so nobody else can and they wont be viewable
anyway.
Dougal
-
2009/3/17 P M :
> why don't you use
> ABSOLUTE_URL_OVERRIDES = {
> 'auth.user': lambda o: "/user/%s/" % o.username,
> }
>
> so username will not collide with application name !!!
> Greetings.
> Puneet
Because I wanted the user's home page to be of the form
http://mydomain.com/username !!
--~-
why don't you use
ABSOLUTE_URL_OVERRIDES = {
'auth.user': lambda o: "/*user*/%s/" % o.username,
}
so username will not collide with application name !!!
Greetings.
Puneet
On Tue, Mar 17, 2009 at 3:14 PM, Andrew Turner wrote:
>
> Just for the record, I have created the following class (subc
Just for the record, I have created the following class (subclassing
RegistrationFormUniqueEmail):-
class RegistrationFormNonBlacklisted(RegistrationFormUniqueEmail):
def clean_username(self):
if self.cleaned_data['username'] in settings.BLACKLISTED_USERNAMES:
raise forms.
2009/3/17 Alex Gaynor :
> django-registration's views take a custom formclass, just subclsas the
> default form and add a clean_username function to do the validation as
> usuall. If you want to get really clever about how you do it you could
> import the Django resolver, test if "/%s/" % usernam
On Tue, Mar 17, 2009 at 8:35 AM, Andrew Turner wrote:
>
> 2009/3/17 Alex Gaynor :
> > One way is to actively validate these, another is to just list that URL
> > pattern after your other ones, so that if someone goes to /admin/ it goes
> to
> > your admin, no they're profile.
> >
> > Alex
>
> Tha
2009/3/17 Alex Gaynor :
> One way is to actively validate these, another is to just list that URL
> pattern after your other ones, so that if someone goes to /admin/ it goes to
> your admin, no they're profile.
>
> Alex
Thanks for your reply. I do have the other url patterns listed before
the pro
On Tue, Mar 17, 2009 at 6:28 AM, Andrew Turner wrote:
>
> Hi,
>
> I have overridden my absolute urls like thus:-
>
> ABSOLUTE_URL_OVERRIDES = {
>'auth.user': lambda o: "/%s/" % o.username,
> }
>
> so that users can access their profiles via http://mydomain.com/username
>
> However, if someone
Hi,
I have overridden my absolute urls like thus:-
ABSOLUTE_URL_OVERRIDES = {
'auth.user': lambda o: "/%s/" % o.username,
}
so that users can access their profiles via http://mydomain.com/username
However, if someone creates a user called, say, 'admin' or 'blog', it
will conflict with othe
10 matches
Mail list logo