Hi Lau,
Yes, documentation is not my strong suite :)
The Lookup field is in fact interpreted as a Python statement, so things
like Lists, Tuples and List comprehensions are possible as lookup values.
For example in the included "Simple permit management setup (Official)"
bootstrap setup, a 'user' metadata type is included that automatically
displays the list of active users for selection, the code is as follows:
sorted([user.get_full_name() or user for user in User.objects.all() if
user.is_active])
if you want to display a list of years (say 1990 to 2000) you can create
the list by hand:
['1990', '1991', '1992', '1993', '1994', '1995', '1996', '1997', '1998',
'1999', '2000']
but being a Python statement it can also be done with a list comprehension
[str(year) for year in range(1990, 2001)]
As you well noted the resulting values of the lookup and default values
must be strings, hence enclosed in quotes (") or single quotes (').
--Roberto
On Monday, January 14, 2013 6:29:09 AM UTC-4, Lau Llobet wrote:
>
> I found the anwer by myselve , in the lookup field options are described
> like [ "hig","low" ] . Hope this post may be usefull for future begginers
--