i have something like this in urls.py:
---
from django.db.models.fields import TextField
for model, modeladmin in admin.site._registry.items():
if isinstance(modeladmin, <SomeClass>):
if TextField in modeladmin.formfield_overrides:
modeladmin.formfield_overrides[TextField]['widget'] =
CustomWidget
---
although this is working, it's not working as i expected.
CustomWidget is applied to all modeladmin.formfield_overrides and not
just for <SomeClass>.
also, i'm using admin.site._registry which is private, is there some
other way to do this?
Aljosa Mohorovic
--
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.