Hi guys,
This might be best explained by example... for the following model:
class Setting(models.Model):
data_type = models.CharField()
value = models.TextField()
I want Django's admin to display a different form widget for the
"value" field depending on the input of "data_type". For example: if
"data_type" was "date", then the value field would use a date widget
instead of the TextField's default widget.
My predicament is that ModelAdmin is defined as a class, and not
instances. So I can't pass it a custom form since instances (i.e.
"data_type" value) are needed to decide what field the form should
have...
Any help would be greatly appreciated!
thanks, Jon
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en.