Re: [Django] #19284: django.contrib.auth.forms imports User instead of using get_user_model

2012-11-13 Thread Django
#19284: django.contrib.auth.forms imports User instead of using get_user_model
-+---
 Reporter:  kunitoki@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  contrib.auth |  Version:  1.5-alpha-1
 Severity:  Release blocker  |   Resolution:  wontfix
 Keywords:  auth user| Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by russellm):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Just importing User shouldn't cause an error. You must be inadvertently
 using the User model in some way.

 The only forms using User are UserCreationForm and UserChangeForm, both of
 which are documented as needing to be over

 The patch form @akaariai won't work reliably, either -- because it assumes
 makes an assumption about the name and validation of the username field.
 This means the form will fail in interesting ways, depending on the User
 model you have in use.

 As an aside, the patch also make testing difficult, because the form is
 bound to the User model that is in use at the time the auth module is
 imported.

 It might be possible to make the Create and Change forms completely
 generic, but for my money, it just isn't worth the effort and complexity,
 given the effort required to fix in a subclass. There might be some
 opportunity for introducing a base class to make subclassing easier, but
 that's a topic for a separate ticket.

 tl;dr - that particular User import was deliberate, and shouldn't be
 causing problems. Marking wontfix on that basis.

 If someone can demonstrate the way to reproduce the described error, then
 feel free to reopen.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19284: django.contrib.auth.forms imports User instead of using get_user_model

2012-11-13 Thread Django
#19284: django.contrib.auth.forms imports User instead of using get_user_model
-+---
 Reporter:  kunitoki@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  contrib.auth |  Version:  1.5-alpha-1
 Severity:  Release blocker  |   Resolution:
 Keywords:  auth user| Triage Stage:  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 This was discussed in [https://groups.google.com/d/topic/django-developers
 /EI-ihJ4CLqw/discussion this thread].

 There's a
 
[https://github.com/akaariai/django/commit/04ae5183df8613fd0d91b43834a4582fdf6b0d04
 proposed patch] but it isn't entirely satisfying.

 I'm pretty sure that the current implementation is a design decision and
 not on oversight; I'll ask its author to confirm.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.