Re: [web2py] web3py again....

2019-03-30 Thread Carlos Cesar Caballero Díaz
So far looks good, but I would prefer that the application include (or 
import) the framework instead of the framework include the application. 
With the first one, pip based deployments and CI/CD will be a lot easier.


I have being playing with bottle a lot recently, so if there is some 
web3py features list or guidelines, maybe I can give a hand.


Greetings.


El 28/3/19 a las 5:16 a.m., Massimo Di Pierro escribió:

I know this comes up once in a while but ...

    https://github.com/web2py/web3py

what do you think?

It is very preliminary but I will have an admin soon.
Backporting SQLFORM, grid and Auth, should not be that complicated, 
although I think we can do better.


Massimo

--
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] Re: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread Anthony
Need to see the code that generated the KeyError, as well as the full 
traceback, and details about how/when the error was generated.

On Saturday, March 30, 2019 at 3:31:41 PM UTC-4, João Matos wrote:
>
> This is my code
> form = SQLFORM.factory(
> Field('equipment_id',
>   label=T('Equipment'),
>   requires=IS_IN_SET({wo.equipment_id: db.equipment(wo.
> equipment_id).name},
>  zero=None),
> ),
> Field('sn',
>   label=T('SN'),
>   widget=lambda field, value: (
> SQLFORM.widgets.string.widget(field, value, _readonly=True
> )),
> ),
> Field('code',
>   label=T('WO'),
>   requires=IS_EMPTY_OR(IS_IN_DB(db(query), 'wo.code', distinct
> =True)),
> ),
> Field('client_id',
>   label=T('Client'),
>   requires=IS_IN_DB(db, 'client.id', '%(name)s', zero=T('Choose 
> one...')),
> ),
> Field('manual_lang_id',
>   label=T('Manual language'),
>   requires=IS_IN_DB(db,
> 'manual_lang.id',
> '%(name)s',
> zero=T('Choose one...'),
>   ),
> ),
> Field('co_code', default='', label=T('Customer order')),
> Field('so_code', default='', label=T('Supplier order')),
> Field('export', 'boolean', default=False, label=T('Export')),
> Field('notes', default='', label=T('Notes')),
> Field('observations', default='', label=T('Observations')),
> Field('est_finish',
>   'date',
>   label=T('Estimated finish'),
>   notnull=True,
>   required=True,
>   requires=IS_DATE_IN_RANGE(  # format=T('%Y-%m-%d'),
> minimum=request.now.date() + 
> timedelta(days=1),
> # maximum=request.now.date() + ,
> error_message=T('Must be a future 
> date.')
>   )
> ),
> *factory_fields,
> )
>
>
> sábado, 30 de Março de 2019 às 19:03:40 UTC, Anthony escreveu:
>>
>> Hard to say without seeing your code, but it definitely works for me.
>>
>> On Saturday, March 30, 2019 at 2:37:27 PM UTC-4, João Matos wrote:
>>>
>>> How can I use the fields argument without a db?
>>> I tried
>>> fields=['sn']
>>> but it returns an KeyError.
>>>
>>>
>>> sábado, 30 de Março de 2019 às 18:27:11 UTC, Anthony escreveu:

 I don't see any advantage in using the fields parameter because the 
> change I found
> form.element('#no_table_sn')['_readonly'] = 'readonly' 
> and the suggestion you made
> widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True
> )
> only change 1 line, and using the fields would make me change all the 
> Fields lines (if I'm not mistaken).
>

 No, "fields" is an argument of SQLFORM:

 form = SQLFORM.factory(..., fields=['field1', 'field2', ...])

 Anyway, setting the _readonly attribute of the input widget and setting 
 writable=False in the Field() definition do two different things. The 
 former makes the input element read-only in the UI but is less secure 
 because it does not prevent writes on the server. The latter does not use 
 an input element to display the data in the UI, and it also prevents 
 writes 
 on the server.

 Anthony

>>>

-- 
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: web3py again....

2019-03-30 Thread 黄祥
*step*
rm -rf ~/learn/python/web3py
cd ~/learn/python
git clone https://github.com/web2py/web3py
cd web3py
cp -r applications/todo applications/todoo
python web3py.py applications/

*result on browser*
Error: 404 Not Found

Sorry, the requested URL 'http://localhost:8000/todoo' caused an error:

Not found: '/todoo'


*result on terminal*

127.0.0.1 - - [31/Mar/2019 09:47:52] "GET /todoo HTTP/1.1" 404 730

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.


Re: [web2py] Re: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread João Matos
No, it doesn't.
It simply doesn't show the field.


sábado, 30 de Março de 2019 às 19:43:46 UTC, Jim S escreveu:
>
> Just change it to
>
> Field('sn', label=T('SN'), writable=False)
>
> Doesn't that work?
>
>
> Jim
>
>
>
>
> On Sat, Mar 30, 2019, 2:31 PM João Matos > 
> wrote:
>
>> This is my code
>> form = SQLFORM.factory(
>> Field('equipment_id',
>>   label=T('Equipment'),
>>   requires=IS_IN_SET({wo.equipment_id: db.equipment(wo.
>> equipment_id).name},
>>  zero=None),
>> ),
>> Field('sn',
>>   label=T('SN'),
>>   widget=lambda field, value: (
>> SQLFORM.widgets.string.widget(field, value, _readonly=
>> True)),
>> ),
>> Field('code',
>>   label=T('WO'),
>>   requires=IS_EMPTY_OR(IS_IN_DB(db(query), 'wo.code', 
>> distinct=True)),
>> ),
>> Field('client_id',
>>   label=T('Client'),
>>   requires=IS_IN_DB(db, 'client.id', '%(name)s', zero=T('Choose 
>> one...')),
>> ),
>> Field('manual_lang_id',
>>   label=T('Manual language'),
>>   requires=IS_IN_DB(db,
>> 'manual_lang.id',
>> '%(name)s',
>> zero=T('Choose one...'),
>>   ),
>> ),
>> Field('co_code', default='', label=T('Customer order')),
>> Field('so_code', default='', label=T('Supplier order')),
>> Field('export', 'boolean', default=False, label=T('Export')),
>> Field('notes', default='', label=T('Notes')),
>> Field('observations', default='', label=T('Observations')),
>> Field('est_finish',
>>   'date',
>>   label=T('Estimated finish'),
>>   notnull=True,
>>   required=True,
>>   requires=IS_DATE_IN_RANGE(  # format=T('%Y-%m-%d'),
>> minimum=request.now.date() + 
>> timedelta(days=1),
>> # maximum=request.now.date() + ,
>> error_message=T('Must be a 
>> future date.')
>>   )
>> ),
>> *factory_fields,
>> )
>>
>>
>> sábado, 30 de Março de 2019 às 19:03:40 UTC, Anthony escreveu:
>>>
>>> Hard to say without seeing your code, but it definitely works for me.
>>>
>>> On Saturday, March 30, 2019 at 2:37:27 PM UTC-4, João Matos wrote:

 How can I use the fields argument without a db?
 I tried
 fields=['sn']
 but it returns an KeyError.


 sábado, 30 de Março de 2019 às 18:27:11 UTC, Anthony escreveu:
>
> I don't see any advantage in using the fields parameter because the 
>> change I found
>> form.element('#no_table_sn')['_readonly'] = 'readonly' 
>> and the suggestion you made
>> widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=
>> True)
>> only change 1 line, and using the fields would make me change all the 
>> Fields lines (if I'm not mistaken).
>>
>
> No, "fields" is an argument of SQLFORM:
>
> form = SQLFORM.factory(..., fields=['field1', 'field2', ...])
>
> Anyway, setting the _readonly attribute of the input widget and 
> setting writable=False in the Field() definition do two different things. 
> The former makes the input element read-only in the UI but is less secure 
> because it does not prevent writes on the server. The latter does not use 
> an input element to display the data in the UI, and it also prevents 
> writes 
> on the server.
>
> Anthony
>
 -- 
>> 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/U7zQi02p2MY/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web...@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] Re: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread Jim Steil
Just change it to

Field('sn', label=T('SN'), writable=False)

Doesn't that work?


Jim




On Sat, Mar 30, 2019, 2:31 PM João Matos  wrote:

> This is my code
> form = SQLFORM.factory(
> Field('equipment_id',
>   label=T('Equipment'),
>   requires=IS_IN_SET({wo.equipment_id: db.equipment(wo.
> equipment_id).name},
>  zero=None),
> ),
> Field('sn',
>   label=T('SN'),
>   widget=lambda field, value: (
> SQLFORM.widgets.string.widget(field, value, _readonly=True
> )),
> ),
> Field('code',
>   label=T('WO'),
>   requires=IS_EMPTY_OR(IS_IN_DB(db(query), 'wo.code', distinct
> =True)),
> ),
> Field('client_id',
>   label=T('Client'),
>   requires=IS_IN_DB(db, 'client.id', '%(name)s', zero=T('Choose
> one...')),
> ),
> Field('manual_lang_id',
>   label=T('Manual language'),
>   requires=IS_IN_DB(db,
> 'manual_lang.id',
> '%(name)s',
> zero=T('Choose one...'),
>   ),
> ),
> Field('co_code', default='', label=T('Customer order')),
> Field('so_code', default='', label=T('Supplier order')),
> Field('export', 'boolean', default=False, label=T('Export')),
> Field('notes', default='', label=T('Notes')),
> Field('observations', default='', label=T('Observations')),
> Field('est_finish',
>   'date',
>   label=T('Estimated finish'),
>   notnull=True,
>   required=True,
>   requires=IS_DATE_IN_RANGE(  # format=T('%Y-%m-%d'),
> minimum=request.now.date() +
> timedelta(days=1),
> # maximum=request.now.date() + ,
> error_message=T('Must be a future
> date.')
>   )
> ),
> *factory_fields,
> )
>
>
> sábado, 30 de Março de 2019 às 19:03:40 UTC, Anthony escreveu:
>>
>> Hard to say without seeing your code, but it definitely works for me.
>>
>> On Saturday, March 30, 2019 at 2:37:27 PM UTC-4, João Matos wrote:
>>>
>>> How can I use the fields argument without a db?
>>> I tried
>>> fields=['sn']
>>> but it returns an KeyError.
>>>
>>>
>>> sábado, 30 de Março de 2019 às 18:27:11 UTC, Anthony escreveu:

 I don't see any advantage in using the fields parameter because the
> change I found
> form.element('#no_table_sn')['_readonly'] = 'readonly'
> and the suggestion you made
> widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True
> )
> only change 1 line, and using the fields would make me change all the
> Fields lines (if I'm not mistaken).
>

 No, "fields" is an argument of SQLFORM:

 form = SQLFORM.factory(..., fields=['field1', 'field2', ...])

 Anyway, setting the _readonly attribute of the input widget and setting
 writable=False in the Field() definition do two different things. The
 former makes the input element read-only in the UI but is less secure
 because it does not prevent writes on the server. The latter does not use
 an input element to display the data in the UI, and it also prevents writes
 on the server.

 Anthony

>>> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/U7zQi02p2MY/unsubscribe.
> To unsubscribe from this group and all its topics, 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] Re: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread João Matos
This is my code
form = SQLFORM.factory(
Field('equipment_id',
  label=T('Equipment'),
  requires=IS_IN_SET({wo.equipment_id: db.equipment(wo.
equipment_id).name},
 zero=None),
),
Field('sn',
  label=T('SN'),
  widget=lambda field, value: (
SQLFORM.widgets.string.widget(field, value, _readonly=True
)),
),
Field('code',
  label=T('WO'),
  requires=IS_EMPTY_OR(IS_IN_DB(db(query), 'wo.code', distinct=
True)),
),
Field('client_id',
  label=T('Client'),
  requires=IS_IN_DB(db, 'client.id', '%(name)s', zero=T('Choose 
one...')),
),
Field('manual_lang_id',
  label=T('Manual language'),
  requires=IS_IN_DB(db,
'manual_lang.id',
'%(name)s',
zero=T('Choose one...'),
  ),
),
Field('co_code', default='', label=T('Customer order')),
Field('so_code', default='', label=T('Supplier order')),
Field('export', 'boolean', default=False, label=T('Export')),
Field('notes', default='', label=T('Notes')),
Field('observations', default='', label=T('Observations')),
Field('est_finish',
  'date',
  label=T('Estimated finish'),
  notnull=True,
  required=True,
  requires=IS_DATE_IN_RANGE(  # format=T('%Y-%m-%d'),
minimum=request.now.date() + 
timedelta(days=1),
# maximum=request.now.date() + ,
error_message=T('Must be a future 
date.')
  )
),
*factory_fields,
)


sábado, 30 de Março de 2019 às 19:03:40 UTC, Anthony escreveu:
>
> Hard to say without seeing your code, but it definitely works for me.
>
> On Saturday, March 30, 2019 at 2:37:27 PM UTC-4, João Matos wrote:
>>
>> How can I use the fields argument without a db?
>> I tried
>> fields=['sn']
>> but it returns an KeyError.
>>
>>
>> sábado, 30 de Março de 2019 às 18:27:11 UTC, Anthony escreveu:
>>>
>>> I don't see any advantage in using the fields parameter because the 
 change I found
 form.element('#no_table_sn')['_readonly'] = 'readonly' 
 and the suggestion you made
 widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True)
 only change 1 line, and using the fields would make me change all the 
 Fields lines (if I'm not mistaken).

>>>
>>> No, "fields" is an argument of SQLFORM:
>>>
>>> form = SQLFORM.factory(..., fields=['field1', 'field2', ...])
>>>
>>> Anyway, setting the _readonly attribute of the input widget and setting 
>>> writable=False in the Field() definition do two different things. The 
>>> former makes the input element read-only in the UI but is less secure 
>>> because it does not prevent writes on the server. The latter does not use 
>>> an input element to display the data in the UI, and it also prevents writes 
>>> on the server.
>>>
>>> Anthony
>>>
>>

-- 
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] Anyone has web2py running with Python 3.7 and IIS 8? I'm unable to make it work.

2019-03-30 Thread João Matos
Hello,

Anyone has web2py running with Python 3.7 and IIS 8? I'm unable to make it 
work.

Thanks,

JM

-- 
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: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread Anthony
Hard to say without seeing your code, but it definitely works for me.

On Saturday, March 30, 2019 at 2:37:27 PM UTC-4, João Matos wrote:
>
> How can I use the fields argument without a db?
> I tried
> fields=['sn']
> but it returns an KeyError.
>
>
> sábado, 30 de Março de 2019 às 18:27:11 UTC, Anthony escreveu:
>>
>> I don't see any advantage in using the fields parameter because the 
>>> change I found
>>> form.element('#no_table_sn')['_readonly'] = 'readonly' 
>>> and the suggestion you made
>>> widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True)
>>> only change 1 line, and using the fields would make me change all the 
>>> Fields lines (if I'm not mistaken).
>>>
>>
>> No, "fields" is an argument of SQLFORM:
>>
>> form = SQLFORM.factory(..., fields=['field1', 'field2', ...])
>>
>> Anyway, setting the _readonly attribute of the input widget and setting 
>> writable=False in the Field() definition do two different things. The 
>> former makes the input element read-only in the UI but is less secure 
>> because it does not prevent writes on the server. The latter does not use 
>> an input element to display the data in the UI, and it also prevents writes 
>> on the server.
>>
>> Anthony
>>
>

-- 
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: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread João Matos
How can I use the fields argument without a db?
I tried
fields=['sn']
but it returns an KeyError.


sábado, 30 de Março de 2019 às 18:27:11 UTC, Anthony escreveu:
>
> I don't see any advantage in using the fields parameter because the change 
>> I found
>> form.element('#no_table_sn')['_readonly'] = 'readonly' 
>> and the suggestion you made
>> widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True)
>> only change 1 line, and using the fields would make me change all the 
>> Fields lines (if I'm not mistaken).
>>
>
> No, "fields" is an argument of SQLFORM:
>
> form = SQLFORM.factory(..., fields=['field1', 'field2', ...])
>
> Anyway, setting the _readonly attribute of the input widget and setting 
> writable=False in the Field() definition do two different things. The 
> former makes the input element read-only in the UI but is less secure 
> because it does not prevent writes on the server. The latter does not use 
> an input element to display the data in the UI, and it also prevents writes 
> on the server.
>
> Anthony
>

-- 
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: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread Anthony

>
> I don't see any advantage in using the fields parameter because the change 
> I found
> form.element('#no_table_sn')['_readonly'] = 'readonly' 
> and the suggestion you made
> widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True)
> only change 1 line, and using the fields would make me change all the 
> Fields lines (if I'm not mistaken).
>

No, "fields" is an argument of SQLFORM:

form = SQLFORM.factory(..., fields=['field1', 'field2', ...])

Anyway, setting the _readonly attribute of the input widget and setting 
writable=False in the Field() definition do two different things. The 
former makes the input element read-only in the UI but is less secure 
because it does not prevent writes on the server. The latter does not use 
an input element to display the data in the UI, and it also prevents writes 
on the server.

Anthony

-- 
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: How to add a read-only field to a SQLFORM.factory

2019-03-30 Thread João Matos
I used your
widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True)
suggestion.

I don't see any advantage in using the fields parameter because the change 
I found
form.element('#no_table_sn')['_readonly'] = 'readonly' 
and the suggestion you made
widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _readonly=True)
only change 1 line, and using the fields would make me change all the 
Fields lines (if I'm not mistaken).

Thanks.


sábado, 30 de Março de 2019 às 03:01:27 UTC, Anthony escreveu:
>
> On Friday, March 29, 2019 at 5:42:10 PM UTC-4, João Matos wrote:
>>
>> Found a solution (more like a kludge) :)
>>
>> form.element('#no_table_sn')['_readonly'] = 'readonly' 
>>
> I even tried adding 
>>
>> _readonly='readonly'
>>
>> to the Field, but didn't work.
>>
>> Only works after the form exists.
>>
>
> Field('sn', widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, 
> _readonly=True))
>
>
>> Is there a better way?
>>
>
> As noted earlier, you can use the "fields" argument.
>
> Anthony
>

-- 
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: web3py again....

2019-03-30 Thread 黄祥
on github :

   - request, response objects are from bottle (
   https://bottlepy.org/docs/dev/)

what is different web2py and bottle in terms of request and response ? plus 
minus between it?

   - unlike web2py, web3py does not use custom import or eval

is custom import is same like import from modules folders in web2py app ?
is eval same like in python ?
ref:
http://web2py.com/books/default/chapter/29/02/the-python-language#exec-eval

   - dynamic module reloading is only partially supported

then what about dynamic module reload in this term ?

thanks 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.