Massimo,

Tried what you suggested, but got this error.


Python 3.6.8 (default, Aug 20 2019, 17:12:48)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from py4web import *                                                    
                                                                            
                      
>>> from apps.todo.models import db                                        
                                                                            
                       
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tecno2/py4web/apps/myapp/__init__.py", line 15, in <module>
    @action.uses(session)               # action needs a session object 
(read/write cookies)
  File "/home/tecno2/py4web/py4web/core.py", line 494, in __call__
    app_name = action.app_name
AttributeError: type object 'action' has no attribute 'app_name'
>>>


Something wrong here ??



On Wednesday, September 25, 2019 at 10:56:32 AM UTC-3, Marcello wrote:
>
> Great Massimo.
>
> Thank you.
>
>
> On Wednesday, September 25, 2019 at 1:08:42 AM UTC-3, Massimo Di Pierro 
> wrote:
>>
>> It does not need it. You can use a regular python shell and do:
>>
>> from py4web import *
>> from apps.myapp.models import db
>>
>> etc.
>>
>> py4web unlike web2py has not magic and apps are modules.
>>
>>
>> On Tuesday, 24 September 2019 19:49:09 UTC-7, Marcello wrote:
>>>
>>> Hello all,
>>>
>>> Does py4web already have a shell like web2py?
>>>
>>> Thanks 
>>>
>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/7ee6d8e5-1b20-4b60-984c-5ea07b38d11b%40googlegroups.com.

Reply via email to