Thanks for the response.
Great!

On Mon, 3 Sep 2018, 10:24 Lovedie JC <lbjc1...@gmail.com> wrote:

> Had to clean up cache, restart web2py. It's OK now.
>
> On Sun, 2 Sep 2018, 20:16 Maurice Waka <mauricew...@gmail.com> wrote:
>
>> rows = db(db.definitions.definitions).select()
>>  File "/usr/local/lib/python2.7/dist-packages/pydal/base.py", line 669, in 
>> __getattr__
>>  return BasicStorage.__getattribute__(self, key)
>> AttributeError: 'DAL' object has no attribute 'definitions'
>>
>> I am getting the above error with my code.
>>
>> I am using a function in the models that imports several functions like this 
>> below:
>>
>> def definitions(): db = current.db rows = 
>> db(db.definitions.definitions).select() for row in rows: return 
>> row.definitions
>>
>> The model code is this:
>>
>> db = DAL('sqlite://storage.sqlite', pool_size=1000000, folder=None,
>> db_codec='UTF-8', check_reserved=None, migrate=False, fake_migrate=False
>> ,))
>> db.define_table('definitions', Field('definitions', 'text', length=
>> 1000000, default="", notnull=True))
>>
>>
>>
>>
>> What could be wrong with my code? and how do I correct it.
>>
>> Regards
>>
>> --
>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/fVTULlaSNzQ/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.

Reply via email to