Pythonish approach to widgets
Hi list,
Django.forms have a great system of widgets. But customizing them can
be a pain. Writing complex html in the python code is write-only and
error-prone approach.
I know that js files can be included in admin:
class ModelAdmin(admin.ModelAdmin):
class Media:
css = {
'all':('/static/admin/mywidget.css', )
}
js = [
"/static/admin/mywidget.js"
]
What are best practices to separate html from python code?
--
Best,
Alex
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home