Thanks. It's actually the importing part that I don't know how to do.
On Jun 20, 2:29 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote:
> sure, its just python:
> for r in ROLES:
> r[0] #retrieves 'Associate' the first iteration
> r[1] # also retrieves 'Associate'
>
> You just need to ensure that ROLES is imported into your views.
> hth,
> -richard
>
> On 6/20/08, diggs <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I've defined a set of choices in my model.py file that are used in a
> > particular model via the CHOICE arg. Is it possible to access these
> > values from a view to populate a random select list? In models:
>
> > ROLES = (
> > ('Associate', 'Associate'),
> > ('Role 2', 'Role2'),
> > )
>
> > I don't want to have to redefine them or hard-code them into the view.
>
> > Thanks,
> > Phillip
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---