I have the following model:

class Publishers(models.Model):
  books = models.CharField(maxlength=1, choices=BOOKS)

BOOKS is a tuple:
BOOKS = ( ('1', 'Book A'), ('2', 'Book B') )

When I use form_for_instance(Publishers) to generate my template's
HTML based upon the Publisher model, the books field is a standard
<input> field rather than a <select> field.

Is this a bug in Django or am I missing something?  If its the latter,
how can I get the desired effect using my model (I realize I could
create a custom form by coding a PublisherForm(forms.Form) -- trying
to stay DRY).  From my perspective, it seems reasonable to expect the
HTML to be a <select> field when a "choices" attribute is added to the
model definition.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to