AppConfig really need better description in the book.




Dne pátek 25. března 2016 3:07:18 UTC+1 Massimo Di Pierro napsal(a):
>
>
>
> On Thursday, 24 March 2016 20:15:13 UTC-5, 黄祥 wrote:
>>
>> the new configuration surely is different from previous one, i have some 
>> question about it (appconfig.ini and db.py)
>> 1. myconf.get() instead of myconf.take() is there any difference or the 
>> old one is drop?
>>
>
> Not the same. take is still there and backward compatible. get() also 
> makes a guess about type and parses it.
>  
>
>> 2. pool_size = myconf.get('db.pool_size'), i learned from anthony in the 
>> old version it have cast = int, e.g. pool_size = 
>> myconf.take('db.pool_size', cast = int), is the newest one can recognize 
>> int data type without defining cast = int?
>>
>
> yes
>  
>  3. is the new appconfig.ini now can support boolean field type (True or 
> False), if i'm not wrong the previous one can not support boolean field 
> type?
>
> yes
>
> 4. auth = Auth(db, host_names=myconf.get('host.names')) the old one just 
>> auth = Auth(db), so i assume the auth will only appear in the allowed host, 
>> right?
>>
>
> that prevents host injection attacks.
>  
>
>> 5. from gluon.tools import Auth, Service, PluginManager the old one have 
>> from gluon.tools import Auth, Crud, Service, PluginManager, prettydate is 
>> the crud and prettydate is drop in the new version or just unloaded in 
>> scaffolding app?
>>
>
> You can import them yourself. They are still there. Crud must die.
>
>  
>
>>
>> good works and good framewrok.
>> \(^o^)/
>>
>> 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.

Reply via email to