#12907: Problems with django admin on Jython with custom user models
---------------------------------------------------+------------------------
          Reporter:  gbauer                        |         Owner:  nobody
            Status:  reopened                      |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.1   
        Resolution:                                |      Keywords:  jython
             Stage:  Accepted                      |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by russellm):

  * component:  django.contrib.admin => Database layer (models, ORM)
  * stage:  Unreviewed => Accepted

Comment:

 Ok - looking deeper, this is an issue with model inheritance.

 Based on your sample SQL, I'm guessing that you've subclassed Group (not
 User like your instructions say), and it's this Group subclass that you're
 trying to edit. In this specific case, the SQL that is generated seems to
 use a string rather than an integer.

 If you try to view the auth.Group base class, the query rolls out as
 follows:
 {{{
 SQL: SELECT "auth_group"."id", "auth_group"."name" FROM "auth_group" WHERE
 "auth_group"."id" = %s
 PARAMS: (1,)
 }}}
 That is - when inheritance isn't involved, the query parameters roll out
 fine. It's only when you add inheritance to the mix that the problem
 emerges. This might be due to the admin URL handling not processing the
 primary key value properly, or it might be due to the query handling for
 the inheritance join. Either way, it doesn't appear to be a JDBC problem.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12907#comment:4>
Django <http://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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to