On Thu, Jan 3, 2013 at 1:51 PM, Glyn Jackson <cfspa...@gmail.com> wrote:
> I really struggling with my understanding of the following issue and how to
> resolve
>
>
> ----------------------------------------
>
>
> When I try and save (using the Django standard admin interface) I get the
> following error...
>
>>     TypeError at /admin/web/campaign/dc6eb21f-87fa-462f-88af-416cf6be37f6/
>>
>>     get_db_prep_value() got an unexpected keyword argument 'connection'
>
>
> Could someone explain this to me, why and maybe a possible solution? I'm
> assuming it is something to do with my custom HibernateBooleanField field.
>

You don't say whether this used to work, or has stopped working, but
the issue is that your custom field is not compatible with Django 1.4
(It's not compatible with any version above 1.1.x).

The fine documentation explains what this method does and what
signature it should have:

https://docs.djangoproject.com/en/1.4/howto/custom-model-fields/#converting-query-values-to-database-values

get_db_prep_value() is supposed to be used to generate DB specific
customizations of the value. If you do not need DB specific
customizations, don't override get_db_prep_value(), override
get_prep_value().

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to