On 12/04/2015 3:38 PM, Kishan Mehta wrote:
Hey Friends,
There is a model.py and i want to add its column headers in drop down
list in HTML.
Any way to pass them through views.py ?
Dont want to hardcode at HTML because too many columns .
You probably want
https://docs.djangoproject.com/en/1.8/ref/models/meta/#retrieving-all-field-instances-of-a-model
but check here too ...
https://docs.djangoproject.com/en/1.8/releases/1.8/#model-meta-api
Thanks for the help.
Regards,
Kishan
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/552A15C2.1000100%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.