Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-06 Thread Christian Jensen
I think this is the right approach when I was making my custom user model I was thinking the same thing. I hope these mixins make it in. Sent from my iPhone On 2012-11-06, at 2:55 PM, Alex Ogier wrote: So, I went ahead and implemented the most useful mixin of the three that I defined previously

Re: Custom user models don't like non integer primary keys.

2012-11-06 Thread Russell Keith-Magee
Hi Eric, Although the full stack trace would confirm it, I think I can guess what the problem is here -- it's the mechanism for generating reset tokens. If you dig into the token generation (and reversal) mechanisms, they use int_to_base36 and base36_to_int to convert the user's primary key into

Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-06 Thread Alex Ogier
So, I went ahead and implemented the most useful mixin of the three that I defined previously, the PermissionsMixin. You can see it at https://github.com/ogier/django/blob/permissions-mixin/django/contrib/auth/models.py#L293 This should dramatically simplify the creation of a custom User model in

Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-06 Thread Anssi Kääriäinen
On 6 marras, 23:05, Alex Ogier wrote: > ... Since you can't actually override or change the fields of an abstract > model anyways (so far as I know?) Allowing override of abstract parent's fields is fairly trivial (https://github.com/akaariai/django/compare/abstract_overrides). I don't immedia

Re: Custom user models in 1.5, not flexible/dry enough?

2012-11-06 Thread Alex Ogier
I consider the mixins I wrote at https://github.com/ogier/django/blob/auth-mixins/django/contrib/auth/mixins.py helpful because they decompose the old User model into some orthogonal chunks that you can pick and ch

Re: Custom user models don't like non integer primary keys.

2012-11-06 Thread Jacob Kaplan-Moss
Hey Eric -- Can you post the full traceback instead of just the snippet? Without that it's not clear whether this is a bug or just a consequence of defining your own custom user model. As the documentation notes: """ As you may expect, built-in Django's forms and views make certain assumptions a

Custom user models don't like non integer primary keys.

2012-11-06 Thread Eric Hutchinson
I've been playing with custom user models. Something i've found is that trying to use the django-extensions uuidfield as a primary key doesn't seem very usable at the moment. Many of the built in auth views, specifically password reset, assume an integer field here. /lib/python2.7/site-packag

Re: Status of bug #11580 ?

2012-11-06 Thread Florian Apolloner
Hi Michał, The bug got accepted by a core dev, so the next thing to do for you if you want to get this bug fixed is probably to work on a patch. With 1.5 coming this year it would be the perfect time to fix it ;) Our plans are obviously to fix all existing bugs, but as you can imagine our time

Status of bug #11580 ?

2012-11-06 Thread Michał Nowotka
Hello, There is a bug submitted 3 years ago: https://code.djangoproject.com/ticket/11580 I have exact the same problem using django 1.4. Are there any plans to fix that in near future? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To p