google-code-export / dojango

Automatically exported from code.google.com/p/dojango
Other
1 stars 0 forks source link

formfield_function implementation seems to prevent subclasses of fields to provide own default form fields #77

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have created a custom field, by subclassing db.models.CharField, which 
provides its own formfield-method, which points to a custom form field, using 
the method described here: 
http://docs.djangoproject.com/en/dev/howto/custom-model-fields/#specifying-the-f
orm-field-for-a-model-field

But my method never receives an empty form_class argument, as the 
formfield_function evaluates by isinstance, rather than direct lookup on the 
class.

Original issue reported on code.google.com by soeren.h...@gmail.com on 14 Feb 2011 at 11:05

GoogleCodeExporter commented 9 years ago
Could you send a concrete example of your custom field?

Original comment by tobias.k...@googlemail.com on 14 Apr 2011 at 5:03