>
> Do you already have the mapping, perhaps in a dictionary (or can you get
>> it into one)? If so, maybe something like:
>>
>> ISO_COUNTRY_CODE_MAPPINGS = {k: T(v) for (k, v) in original_mapping.
>> iteritems()} # requires Python 2.7
>>
>> I see. It is still iterating through the whole mapping
On Monday, June 25, 2012 6:38:47 PM UTC+2, Anthony wrote:
>
> Do you already have the mapping, perhaps in a dictionary (or can you get
> it into one)? If so, maybe something like:
>
> ISO_COUNTRY_CODE_MAPPINGS = {k: T(v) for (k, v) in original_mapping.
> iteritems()} # requires Python 2.7
>
> An
Do you already have the mapping, perhaps in a dictionary (or can you get it
into one)? If so, maybe something like:
ISO_COUNTRY_CODE_MAPPINGS = {k: T(v) for (k, v) in original_mapping.
iteritems()} # requires Python 2.7
Anthony
On Monday, June 25, 2012 11:53:24 AM UTC-4, Daniel Gonzalez wrote:
Yes, that is one of the options I mentioned. If I include all possible
countries, my list would have200 entries.
I still do not fully understand the process in which
modules/views/controllers are loaded when requests are received.
But, if I am not completely mistaken, these files are parsed each
>
> Now, to support internationalization here, I see two options:
>
> - I implement a function which returns the desired predefined mapping,
> according to the language of the user. How can I know this? How does the T
> operator know this?
> - I walk the list of ISO country codes applying the T
On Monday, June 25, 2012 4:45:22 PM UTC+2, Anthony wrote:
>
> Check out the IS_IN_SET documentation at
> http://web2py.com/books/default/chapter/29/7. Instead of a list of
> individual items, it can be a list of two-tuples or a dictionary, where the
> first tuple item or dictionary key is the v
Check out the IS_IN_SET documentation at
http://web2py.com/books/default/chapter/29/7. Instead of a list of
individual items, it can be a list of two-tuples or a dictionary, where the
first tuple item or dictionary key is the value and the second tuple item
or dictionary value is the label to b
7 matches
Mail list logo