Thursday, July 24, 2014

Re: Getting list of user groups

Hi Kyle,

Apologies for the typo on my part that led you astray. 

Regarding the approach you describe -- you may want to look into Django's Forms library. That library is designed to specifically handle the kind of problem you describe (a pull-down select box filled with all the options populated from a particular query. In particular, look for details on the ModelChoiceField. This will save you from writing a bunch of code to render the select box, validate input received from the user, and so on.

Yours,
Russ Magee %-)



On Fri, Jul 25, 2014 at 5:05 AM, Kyle Adams <kyle@n3twork.com> wrote:
After some more research, turns out it is "values_list" instead of "value_list"

--
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+unsubscribe@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/54e20481-8952-4f84-b471-7c13556c1354%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@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/CAJxq848_tp6jQHGcM%2Bf0DD1%3DSPAxNEo7Lqa%2BU%2BYm-eeMCNVvuQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment