On Tuesday, February 16, 2016 at 3:51:47 PM UTC-8, Winter Kryz wrote:
>
>
>
>
> I created a module Countries.py with all the country names, imported into
> my model db.py and
>
> from applications.Egressum.modules.
> countries import *
> ...
> Field ('countries', requires =
I created a module Countries.py with all the country names, imported into
my model db.py and
from applications.Egressum.modules.
countries import *
...
Field ('countries', requires = IS_IN_SET(COUNTRIES), default='United
States'),
then when I go to execute it, I get the following error
I created a module Countries.py with all the country names, imported into
my model db.py and
Field ('countries', requires = IS_IN_SET(COUNTRIES), default='United
States'),
then when I go to execute it, I get the following error
(1025, "Error on rename of
I attached a file with a list of all countries
On Tuesday, 9 February 2016 19:59:41 UTC-6, Dave S wrote:
>
>
>
> On Tuesday, February 9, 2016 at 5:10:03 PM UTC-8, Winter Kryz wrote:
>>
>> Thanks for the answers
>> I tried what xmarx said but it didn't work
>>
>
> What errors did you get?
>
>
>
On Wednesday, February 10, 2016 at 4:57:58 PM UTC-8, Winter Kryz wrote:
>
>
> I tried
> Field('nationality', requires=IS_IN_SET(nationalities), default='United
> States')
>
> but it gives me the following error
>
> name 'nationalities' is not defined
>
You need to define the set
I tried
Field('nationality', requires=IS_IN_SET(nationalities), default='United
States')
but it gives me the following error
name 'nationalities' is not defined
I have to mention that I have already load all the nationalities names into
a table called 'Nationalities' so what I need is
I would not make this a reference fields. I would make it a IS_IN_SET(...)
field. This is because possible nationalities do not change very often and
are definitively not changed by the user.
On Tuesday, 9 February 2016 05:34:29 UTC-6, xmarx wrote:
>
> db.define_table('Person',
>
db.define_table('Person',
Field('last_name', 'string'),
Field('name', 'string'),
Field('telephone', 'string'),
Field('email', 'string'),
Field('nationality','reference Nationalities',default=1),
Thanks for the answers
I tried what xmarx said but it didn't work
How would I use it with IS_IN_SET?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You
On Tuesday, February 9, 2016 at 5:10:03 PM UTC-8, Winter Kryz wrote:
>
> Thanks for the answers
> I tried what xmarx said but it didn't work
>
What errors did you get?
> How would I use it with IS_IN_SET?
>
>
nationalities=['United States',"United Kingdom","France",'Germany']
10 matches
Mail list logo