[web2py] Differnt represent in SQLFORM.grid and in the view

2018-05-16 Thread Martin Weissenboeck
​I am using* db.mytable.myfield.represent=function_to_represent* in the
grid.
After clicking the "view" button ​I want to see *myfield *in another
representation. Is it possible to change   *db.mytable.myfield.represent*
only for the view?

Regards, Martin

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: Differnt represent in SQLFORM.grid and in the view

2018-05-16 Thread Martin Weissenboeck
nice idea - thank you!

2018-05-16 10:11 GMT+02:00 黄祥 :

> think you can use condition to check the request.args value then assign
> the represent on it, before defining SQLFORM.grid
> *e.g.*
> if 'view' in request.args:
> db.mytable.myfield.represent = function_to_represent
> grid = SQLFORM.grid(...)
>
> best regards,
> stifan
>
> --
> 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 received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Differnt represent in SQLFORM.grid and in the view

2018-05-16 Thread 黄祥
think you can use condition to check the request.args value then assign the 
represent on it, before defining SQLFORM.grid
*e.g.*
if 'view' in request.args:
db.mytable.myfield.represent = function_to_represent
grid = SQLFORM.grid(...)

best regards,
stifan

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.16.1 is OUT

2018-05-16 Thread 黄祥
test in web2py source 2.16.1-stable+timestamp.2017.11.14.05.54.25
(Running on Rocket 1.2.6, Python 3.6.2)

Traceback (most recent call last):
  File "/Users/sugizo/python/web2py/gluon/custom_import.py", line 77, in 
custom_importer
return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'test_callback'

the same code running well in python 2.7.10, btw python 3 installed in 
ampps and added to the $PATH
export PATH="/Applications/AMPPS/python/bin:$PATH"

best regards,
stifan

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] TABLE FOR LIST:REFERENCE

2018-05-16 Thread Ayron Rangel
Guys,

How can I display the list:reference like a table?

Ex.: I have this in db.py:  "Field('product', 'list:reference products', 
notnull=True, label='Products')" in my view appears, like this:





I Want to display this like HMTL table!

Could you help me???

Thks,



-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] TABLE FOR LIST:REFERENCE

2018-05-16 Thread Ayron Rangel
I Just used {{=form}} um mundo view!! Could you know to do that in custom??


Em qua, 16 de mai de 2018 12:19, António Ramos 
escreveu:

> What code are u using in your view to display the record?
>
> 2018-05-16 15:17 GMT+01:00 Ayron Rangel :
>
>> Guys,
>>
>> How can I display the list:reference like a table?
>>
>> Ex.: I have this in db.py:  "Field('product', 'list:reference products',
>> notnull=True, label='Products')" in my view appears, like this:
>>
>> 
>>
>>
>>
>>
>> I Want to display this like HMTL table!
>>
>> Could you help me???
>>
>> Thks,
>>
>>
>>
>> --
>> 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 received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] TABLE FOR LIST:REFERENCE

2018-05-16 Thread António Ramos
What code are u using in your view to display the record?

2018-05-16 15:17 GMT+01:00 Ayron Rangel :

> Guys,
>
> How can I display the list:reference like a table?
>
> Ex.: I have this in db.py:  "Field('product', 'list:reference products',
> notnull=True, label='Products')" in my view appears, like this:
>
> 
>
>
>
>
> I Want to display this like HMTL table!
>
> Could you help me???
>
> Thks,
>
>
>
> --
> 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 received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: New table fields don't show

2018-05-16 Thread Luís Guilherme F
Here's the output of the Query db.mercado.id>0 :

mercado.id mercado.cod_m mercado.nome
136 5 Beira Litoral
137 7 Alentejo
138 8 Entre Douro e...
139 14 Centro (Aveir...
140 15 Norte (Viseu)
141 16 Oeste

Luís

On Wednesday, 16 May 2018 15:54:27 UTC+1, Luís Guilherme F wrote:
>
> Anthony,
> What I see are only the two first columns (cod_m, nome), on a table query 
> on appadmin (database administration).
> The two new columns (regiao, tipo) are not shown.
>
> Thank you
> Luís
>
> On Wednesday, 16 May 2018 14:51:41 UTC+1, Anthony wrote:
>>
>> It's not quite clear what the current problem is. Are you getting an 
>> error? What do you see, and what are you expecting instead?
>>
>> On Wednesday, May 16, 2018 at 9:20:23 AM UTC-4, Luís Guilherme F wrote:
>>>
>>> Hello,
>>> I had a table with two fields. My app was fine.
>>> Then I added two more but web2py/appadmin doesn't show them.
>>> I used mysql tools to change it.
>>> Then I corrected my models/db.py, and ONLY then I ran appadmin.
>>> I've tried migrate=False (and True) and fake_migrate=True.
>>>
>>> Original table:
>>>
>>> db.define_table('mercado',
>>> Field('cod_m',   type='integer'),
>>> Field('nome',type='string')
>>> migrate=False)
>>>
>>> Now:
>>>
>>> db.define_table('mercado',
>>> Field('cod_m',   type='integer'),
>>> Field('nome',type='string'),
>>> Field('regiao',  type='integer'),
>>> Field('tipo',type='integer'),
>>> fake_migrate=True)
>>>
>>> Best regards,
>>> Luís
>>>
>>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: python2 and python3 in 1 machine

2018-05-16 Thread Antonio Salazar
You just install them both, as your instructions say.

If you want to start wen2py in python2, just execute it with python:
python web2py.py

If you want to start web2py in Python 3, execute it with python3:
python3 web2py.py

This is how I do it in Linux, but I'm almost sure MacOS does it the same 
way.
Windows is not as straightforward, but it can be done if you add these 
scripts to your PATH variable:

PYTHON.CMD
C:\Python\Python27-32\Python.exe %*

PYTHON3.CMD
C:\Python\Python36-32\Python.exe %*

According to your installation, you might have to adjust where the Python 
.EXEs are located.


On Monday, May 7, 2018 at 7:11:37 PM UTC-5, 黄祥 wrote:
>
> plan to test web2py both python2 and python3 in 1 machine, any idea how to 
> do that in the safety way?
> already googling found this:
>
> brew update
> brew install python
> brew install python3
>
> any thought or comment?
>
> thx and best regards,
> stifan
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: New table fields don't show

2018-05-16 Thread Luís Guilherme F
Anthony,
What I see are only the two first columns (cod_m, nome), on a table query 
on appadmin (database administration).
The two new columns (regiao, tipo) are not shown.

Thank you
Luís

On Wednesday, 16 May 2018 14:51:41 UTC+1, Anthony wrote:
>
> It's not quite clear what the current problem is. Are you getting an 
> error? What do you see, and what are you expecting instead?
>
> On Wednesday, May 16, 2018 at 9:20:23 AM UTC-4, Luís Guilherme F wrote:
>>
>> Hello,
>> I had a table with two fields. My app was fine.
>> Then I added two more but web2py/appadmin doesn't show them.
>> I used mysql tools to change it.
>> Then I corrected my models/db.py, and ONLY then I ran appadmin.
>> I've tried migrate=False (and True) and fake_migrate=True.
>>
>> Original table:
>>
>> db.define_table('mercado',
>> Field('cod_m',   type='integer'),
>> Field('nome',type='string')
>> migrate=False)
>>
>> Now:
>>
>> db.define_table('mercado',
>> Field('cod_m',   type='integer'),
>> Field('nome',type='string'),
>> Field('regiao',  type='integer'),
>> Field('tipo',type='integer'),
>> fake_migrate=True)
>>
>> Best regards,
>> Luís
>>
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: sending html emails.... bug ...

2018-05-16 Thread António Ramos
In fact its not an issue with images ,



any help?

regards

2018-05-16 17:14 GMT+01:00 António Ramos :

> Hello i´m sending html emails but some clients for example google have an
> issue with images
>
> Google is showing this code for the original html email...
>
> https://www.iol.pt; target=*3D*"_blank">
>
> instead of
> https://www.iol.pt; target="_blank">
>
> what could be the issue with *3D  ???*
>
> regards
> António
>
>
>
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] sending html emails.... bug ...

2018-05-16 Thread António Ramos
Hello i´m sending html emails but some clients for example google have an
issue with images

Google is showing this code for the original html email...

https://www.iol.pt; target=*3D*"_blank">

instead of
https://www.iol.pt; target="_blank">

what could be the issue with *3D  ???*

regards
António

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: New table fields don't show

2018-05-16 Thread Anthony
It's not quite clear what the current problem is. Are you getting an error? 
What do you see, and what are you expecting instead?

On Wednesday, May 16, 2018 at 9:20:23 AM UTC-4, Luís Guilherme F wrote:
>
> Hello,
> I had a table with two fields. My app was fine.
> Then I added two more but web2py/appadmin doesn't show them.
> I used mysql tools to change it.
> Then I corrected my models/db.py, and ONLY then I ran appadmin.
> I've tried migrate=False (and True) and fake_migrate=True.
>
> Original table:
>
> db.define_table('mercado',
> Field('cod_m',   type='integer'),
> Field('nome',type='string')
> migrate=False)
>
> Now:
>
> db.define_table('mercado',
> Field('cod_m',   type='integer'),
> Field('nome',type='string'),
> Field('regiao',  type='integer'),
> Field('tipo',type='integer'),
> fake_migrate=True)
>
> Best regards,
> Luís
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] New table fields don't show

2018-05-16 Thread Luís Guilherme F
Hello,
I had a table with two fields. My app was fine.
Then I added two more but web2py/appadmin doesn't show them.
I used mysql tools to change it.
Then I corrected my models/db.py, and ONLY then I ran appadmin.
I've tried migrate=False (and True) and fake_migrate=True.

Original table:

db.define_table('mercado',
Field('cod_m',   type='integer'),
Field('nome',type='string')
migrate=False)

Now:

db.define_table('mercado',
Field('cod_m',   type='integer'),
Field('nome',type='string'),
Field('regiao',  type='integer'),
Field('tipo',type='integer'),
fake_migrate=True)

Best regards,
Luís

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: New table fields don't show

2018-05-16 Thread Luís Guilherme F
Now I've dropped the table and deleted the "define_table" command in 
models/db.py.
Nevertheless, table 'mercado' is still listed in appadmin console's table 
list.
But when I click on it I get an error with a long Traceback which ends with:
File "/opt/web2py/gluon/contrib/pymysql/err.py", line 107, in 
raise_mysql_exception
raise errorclass(errno, errval)
ProgrammingError: (1146, u"Table 'cotsima.mercado' doesn't exist")


Then I included the db.define_table('mercado', ...  again, in db.py
After that I get no errors clicking on db.mercado at appadmin, but still 
have only two fields at Insert New Record form.



On Wednesday, 16 May 2018 16:24:02 UTC+1, Luís Guilherme F wrote:
>
> Here's the output of the Query db.mercado.id>0 :
>
> mercado.id mercado.cod_m mercado.nome
> 136 5 Beira Litoral
> 137 7 Alentejo
> 138 8 Entre Douro e...
> 139 14 Centro (Aveir...
> 140 15 Norte (Viseu)
> 141 16 Oeste
>
> Luís
>
> On Wednesday, 16 May 2018 15:54:27 UTC+1, Luís Guilherme F wrote:
>>
>> Anthony,
>> What I see are only the two first columns (cod_m, nome), on a table query 
>> on appadmin (database administration).
>> The two new columns (regiao, tipo) are not shown.
>>
>> Thank you
>> Luís
>>
>> On Wednesday, 16 May 2018 14:51:41 UTC+1, Anthony wrote:
>>>
>>> It's not quite clear what the current problem is. Are you getting an 
>>> error? What do you see, and what are you expecting instead?
>>>
>>> On Wednesday, May 16, 2018 at 9:20:23 AM UTC-4, Luís Guilherme F wrote:

 Hello,
 I had a table with two fields. My app was fine.
 Then I added two more but web2py/appadmin doesn't show them.
 I used mysql tools to change it.
 Then I corrected my models/db.py, and ONLY then I ran appadmin.
 I've tried migrate=False (and True) and fake_migrate=True.

 Original table:

 db.define_table('mercado',
 Field('cod_m',   type='integer'),
 Field('nome',type='string')
 migrate=False)

 Now:

 db.define_table('mercado',
 Field('cod_m',   type='integer'),
 Field('nome',type='string'),
 Field('regiao',  type='integer'),
 Field('tipo',type='integer'),
 fake_migrate=True)

 Best regards,
 Luís

>>>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: sending html emails.... bug ...

2018-05-16 Thread António Ramos
Just found out that 3D is inserted all over the html tags in another emails
i get. So this should be normal.

So my problems is with base 64 images...

google does not display them correctly.

Any tweek in mail.send ???


2018-05-16 17:16 GMT+01:00 António Ramos :

> In fact its not an issue with images ,
>
> 
>
> any help?
>
> regards
>
> 2018-05-16 17:14 GMT+01:00 António Ramos :
>
>> Hello i´m sending html emails but some clients for example google have an
>> issue with images
>>
>> Google is showing this code for the original html email...
>>
>> https://www.iol.pt; target=*3D*"_blank">
>>
>> instead of
>> https://www.iol.pt; target="_blank">
>>
>> what could be the issue with *3D  ???*
>>
>> regards
>> António
>>
>>
>>
>>
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Martin Weissenboeck
That is ok:
form = SQLFORM.factory(
Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)),
)

This does not work:
form = SQLFORM.factory(
Field("auswahl", "list:string", length=15,
requires=IS_LENGTH(15,3)),
)


​Regards, Martin​

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Martin Weissenboeck
I understand that there is no DEFAULT VALIDATOR for 'list:string', but it
seems that is not possible to use IS_LENGTH at all.
Ok, I have used onvalidation.

Another problem:
form = SQLFORM.factory(
Field("auswahl", "list:string"),
)

If there is only one item in "auswahl" then the type of form.vars.auswahl
is string.
If there is more than one item, the type is list.

This is annoying, because: if I want to know how many items are in the list
"auswahl" I cannot use len(form.vars.auswahl). I have to write something
like
len(form.vars.auswahl) if isinstance(form.vars.auswahl, list) else 1
Not very pythonic.

Or did I miss something?

2018-05-16 19:13 GMT+02:00 Kiran Subbaraman :

> According to the documentation (http://www.web2py.com/books/
> default/chapter/29/06/the-database-abstraction-layer#Field-types),
> `list:string` does not have a validator. Maybe you can create your own?
>
>
> On 16-05-2018 22:26, Martin Weissenboeck wrote:
>
>
> That is ok:
> form = SQLFORM.factory(
> Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)),
> )
>
> This does not work:
> form = SQLFORM.factory(
> Field("auswahl", "list:string", length=15,
> requires=IS_LENGTH(15,3)),
> )
>
>
> ​Regards, Martin​
>
> --
> 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 received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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 received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Kiran Subbaraman
According to the documentation 
(http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types), 
`list:string` does not have a validator. Maybe you can create your own?


On 16-05-2018 22:26, Martin Weissenboeck wrote:


That is ok:
form = SQLFORM.factory(
        Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)),
        )

This does not work:
form = SQLFORM.factory(
        Field("auswahl", "list:string", length=15, 
requires=IS_LENGTH(15,3)),

        )


​Regards, Martin​

--
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 received this message because you are subscribed to the Google 
Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to web2py+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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 received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] IS_LENGTH does not work with "list:string"

2018-05-16 Thread Kiran Subbaraman

Yikes, I meant "default validators". My mistake.

On 16-05-2018 22:43, Kiran Subbaraman wrote:
According to the documentation 
(http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types), 
`list:string` does not have a validator. Maybe you can create your own?


On 16-05-2018 22:26, Martin Weissenboeck wrote:


That is ok:
form = SQLFORM.factory(
Field("auswahl", "string", length=15, requires=IS_LENGTH(15,3)),
        )

This does not work:
form = SQLFORM.factory(
Field("auswahl", "list:string", length=15, requires=IS_LENGTH(15,3)),
        )


​Regards, Martin​

--
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 received this message because you are subscribed to the Google 
Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to web2py+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.




--
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 received this message because you are subscribed to the Google Groups "web2py-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] New table fields don't show

2018-05-16 Thread Carlos Correia
Às 14:20 de 16-05-2018, Luís Guilherme F escreveu:
> Hello,
> I had a table with two fields. My app was fine.
> Then I added two more but web2py/appadmin doesn't show them.
> I used mysql tools to change it.
> Then I corrected my models/db.py, and ONLY then I ran appadmin.
> I've tried migrate=False (and True) and fake_migrate=True.
> 
> Original table:
> 
> db.define_table('mercado',
>     Field('cod_m',   type='integer'),
>     Field('nome',    type='string')
>     migrate=False)
> 
> Now:
> 
> db.define_table('mercado',
>     Field('cod_m',   type='integer'),
>     Field('nome',    type='string'),
>     Field('regiao',  type='integer'),
>     Field('tipo',    type='integer'),
>     fake_migrate=True)
> 
> Best regards,
> Luís
> 

I use to do DB migrations 'by hand', so that I can keep the full control of data
types and structure.

My 2cts


Com os melhores cumprimentos,

Carlos Correia
=
MEMÓRIA PERSISTENTE
GSM:  917 157 146
e-mail: ge...@memoriapersistente.pt
URL: http://www.memoriapersistente.pt
XMPP (Jabber): car...@memoriapersistente.pt (NOVO)
GnuPG: wwwkeys.eu.pgp.net
URL Suporte: https://t5.m16e.com/gps

-- 
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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


0x16146576.asc
Description: application/pgp-keys