#12907: Problems with django admin on Jython with custom user models
----------------------------------+-----------------------------------------
 Reporter:  gbauer                |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  django.contrib.admin  |     Version:  1.1       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 It looks like django passes the unparsed string parameter from the URL to
 the sql method that fetches the custom user instance from the database
 when you edit a custom user in the django admin. The result on Jython is
 that due to the different backend, the database complains that it can't
 compare integers and varchars.

 /home/gb/Projects/JythonPlay/Lib/site-
 packages/doj/backends/zxjdbc/common.py in execute
         self.cursor.execute(sql, params) ...
 Local vars

 params (u'4',)
 self <doj.backends.zxjdbc.postgresql.base.CursorWrapper object at 0x4af>

 sql
 'SELECT "auth_group"."id", "auth_group"."name",
 "Organisation_rolle"."group_ptr_id", "Organisation_rolle"."kurz_name" FROM
 "Organisation_rolle" INNER JOIN "auth_group" ON
 ("Organisation_rolle"."group_ptr_id" = "auth_group"."id") WHERE
 "Organisation_rolle"."group_ptr_id" = ? '

 I am currently not sure wether this is a problem of the backend or the
 admin, but for some reason I think the admin could be to be blamed - an
 sql command shouldn't get wrong types for parameters. Allthough it could
 be a result of the %s vs ? handling of parameters - the JDBC backend seems
 to use prepared parameterized statements, not string substitutions with
 pre-escaped values.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12907>
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