#16039: syncdb with --database option fails
-------------------------------------+-------------------------------------
     Reporter:  yedpodtrzitko        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Release blocker      |             Triage Stage:  Design
     Keywords:                       |  decision needed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

 Replying to [comment:27 akaariai]:
 > To me it seems that some core parts of Django aren't ready to handle
 situations where different databases give different permissions to a user
 (auth/backends.py).

 Yes, you almost certainly have to put all auth-related tables on the same
 database. But it doesn't have to be the default database.

 > This ticket is out of my domain, I just don't have experience of the use
 cases needing contenttypes and/or permissions in different databases so I
 don't know what behavior we should be looking after.

 A legitimate use case would be to use a default database with some
 business data, and a separate database just for Django's apps (auth,
 admin, etc.) This is easy to achieve with a router. (But I never tried so
 I'm not sure to what extent it works.)

 > Maybe one approach could be checking if there is any core-supported use
 case for having the contenttypes/permissions in multiple databases: for
 contenttypes, sure, generic foreign keys for example. For permissions - I
 don't think so, auth/backends.py doesn't work and thus default
 user.has_perm() doesn't work. So, what is the use case for having
 permissions in more than one DB?

 In my opinion, in this ticket, the use case is to put permissions and
 content types in a non-default database. It isn't to put them in more that
 one database; this is too far from being usable right now.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16039#comment:29>
Django <https://code.djangoproject.com/>
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.


Reply via email to