formfield_overrides for a specific field

2009-09-27 Thread tygielzchaosem

Hey all,

Is it possible to use ModelAdmin.formfield_overrides attribute to
customize a widget for only one field in an admin form, not for all
fields of a certain type in a model?

Say we have an admin class like this:

class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {
'widget': forms.Textarea(attrs={'cols': '100', 'rows':
'20'})
},
}
admin.site.register(MyModel MyModelAdmin)

If there were more then one fields in MyModel of type TextField, all
of them would be affected. It would be useful to have a modifier
targeting a field instance, not a field type.

Best Regards,
TygielZChaosem
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Apache ImportError: Could not import settings

2009-02-02 Thread tygielzchaosem

same here; hasn't something been messed up since some recent svn
commits?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---