Thursday, June 29, 2017

Re: First models.py needs tuning

On Thu, 29 Jun 2017, Guilherme Leal wrote:

> "An iterable (e.g., a list or tuple) consisting itself of iterables of
> exactly two items"
>
> I don't think that constructing choices as a "iterableof 1 item iterables"
> will work.
>
> Think of each item in the choices iterables as a key-value pair, where the
> first item is the key (literally is the value that is saved on the DB
> field), and the value is the "display value".

Guilherme,

I missed the first sentence when I looked at the page. Your third
paragraph explains the syntax very clearly. I'll change the code to comply.

Thanks very much,

Rich

No comments:

Post a Comment