Re: Passing tuple values to a model choices field
Like they do in the admin, right ?
You might want to check Django's source for the admin forms and templates to get some inspiration then.
Hard coding the choices is never a satisfactory solution but I suggest you retrieve them from your models file so you stay DRY compliant and then it's pretty OK.
As you put the widget in your field I think you just need to put form.branch_name to get it to display.
Le 8 août 2011 14:07, "Kayode Odeyemi" <dreyemi@gmail.com> a écrit :
-- 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