Re: [Django] #19185: AUTH_USER_MODEL and GeoManager

2012-10-26 Thread Django
#19185: AUTH_USER_MODEL and GeoManager
-+-
 Reporter:  email.max.bucher@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |   Resolution:
 Severity:  Release blocker  |  worksforme
 Keywords:  AUTH_USER_MODEL  | Triage Stage:
  GeoManager |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by russellm):

 That's our point - it *does* work out of the box. However, nothing works
 "out of the box" if you don't write the correct code for your situation.

 We can't make the default UserManager a GeoManager, because not all Users
 are GIS-enabled. We also can't make the default GeoManager a UserManager
 -- not all GIS models are Users. The only way we can address this with
 code would be to provide a "UserGeoManager" -- however, such a class
 wouldn't be adding any functionality on top of what you can get yourself
 by subclassing both GeoManager and UserManager. On top of that, we'd then
 have an additional class to document, which people would have to learn
 about, and then use correctly.

 If you have another approach that we could take to solve this, please let
 us know.

-- 
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] #19185: AUTH_USER_MODEL and GeoManager

2012-10-26 Thread Django
#19185: AUTH_USER_MODEL and GeoManager
-+-
 Reporter:  email.max.bucher@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |   Resolution:
 Severity:  Release blocker  |  worksforme
 Keywords:  AUTH_USER_MODEL  | Triage Stage:
  GeoManager |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by email.max.bucher@…):

 Yes, I know how I can solve this.
 But shouldn't it be working "out of the box"?

-- 
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] #19185: AUTH_USER_MODEL and GeoManager

2012-10-25 Thread Django
#19185: AUTH_USER_MODEL and GeoManager
-+-
 Reporter:  email.max.bucher@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:
  (models, ORM)  |   Resolution:
 Severity:  Release blocker  |  worksforme
 Keywords:  AUTH_USER_MODEL  | Triage Stage:
  GeoManager |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by ptone):

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


Comment:

 Custom user objects require a custom manager that inherits from at least
 django.contrib.auth.models.BaseUserManager, which defines the
 get_by_natural_key method

 There are a minimum set of documented requirements for a manager of User
 objects, and GeoManager does not meet that set.

 Because the GeoManager defines a completely non-conflicting set of methods
 - you should be able to define your manager as:

 {{{class MyCustomGeoUserManager(BaseUserManager, GeoManager):}}}

 and then defining create_user and create_superuser on
 MyCustomGeoUserManager per the docs

-- 
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] #19185: AUTH_USER_MODEL and GeoManager

2012-10-25 Thread Django
#19185: AUTH_USER_MODEL and GeoManager
-+-
 Reporter:  email.max.bucher@…   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:
  (models, ORM)  |   Resolution:
 Severity:  Release blocker  | Triage Stage:
 Keywords:  AUTH_USER_MODEL  |  Unreviewed
  GeoManager |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by claudep):

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


Comment:

 Can you try creating and using a custom manager inheriting from both
 !GeoManager and !UserManager (or !BaseUserManager)?

-- 
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.