#3621: FileField in admin broken with sqlite3
------------------------------------+---------------------------------------
Reporter:  [EMAIL PROTECTED]  |       Owner:  adrian                        
  Status:  new                      |   Component:  Database wrapper            
  
 Version:  SVN                      |    Keywords:  sqlite3 FileField unique 
admin
   Stage:  Unreviewed               |   Has_patch:  0                           
  
------------------------------------+---------------------------------------
 Using the sqlite3 backend:
 
 If FileField has unique=True set, you cannot add a file due to an
 InterfaceError: Error binding parameter 0 - probably unsupported type.
 
 If you drop the unique=True flag, you are able to insert a object, but not
 change it; the admin interface gives: Enter a valid filename.
 
 The traceback when unique=True:
 
 Traceback (most recent call last):
 File "/Users/jimmy/UNIX/src/django-devel/django/core/handlers/base.py" in
 get_response
   77. response = callback(request, *callback_args, **callback_kwargs)
 File "/Users/jimmy/UNIX/src/django-
 devel/django/contrib/admin/views/decorators.py" in _checklogin
   55. return view_func(request, *args, **kwargs)
 File "/Users/jimmy/UNIX/src/django-devel/django/views/decorators/cache.py"
 in _wrapped_view_func
   39. response = view_func(request, *args, **kwargs)
 File "/Users/jimmy/UNIX/src/django-
 devel/django/contrib/admin/views/main.py" in add_stage
   250. errors = manipulator.get_validation_errors(new_data)
 File "/Users/jimmy/UNIX/src/django-
 devel/django/db/models/fields/__init__.py" in manipulator_validator_unique
   37. old_obj = self.manager.get(**{lookup_type: field_data})
 File "/Users/jimmy/UNIX/src/django-devel/django/db/models/manager.py" in
 get
   73. return self.get_query_set().get(*args, **kwargs)
 File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in get
   248. obj_list = list(clone)
 File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in
 __iter__
   108. return iter(self._get_data())
 File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in
 _get_data
   468. self._result_cache = list(self.iterator())
 File "/Users/jimmy/UNIX/src/django-devel/django/db/models/query.py" in
 iterator
   181. cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") +
 ",".join(select) + sql, params)
 File "/Users/jimmy/UNIX/src/django-devel/django/db/backends/util.py" in
 execute
   12. return self.cursor.execute(sql, params)
 File "/Users/jimmy/UNIX/src/django-
 devel/django/db/backends/sqlite3/base.py" in execute
   92. return Database.Cursor.execute(self, query, params)
 
   InterfaceError at /admin/polls/bar/add/
   Error binding parameter 0 - probably unsupported type.

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