> In DAL it can be done like one single command:
> db.define_table('my_items',
> Field('name', 'string', length=100),
> Field('description', 'string', length=400),
> Field('priority', 'integer'),
> Field('creator_id', 'reference user'),
> Field('dept_i
On Tuesday, December 23, 2014 1:16:52 PM UTC-2, Alan Evangelista wrote:
>
>
> It might be easier if you provide a concrete example of what you are
>> trying to achieve (perhaps using the syntax of an existing ORM or using
>> pseudo-code) and explain how the DAL fall
> It might be easier if you provide a concrete example of what you are
> trying to achieve (perhaps using the syntax of an existing ORM or using
> pseudo-code) and explain how the DAL falls short.
>
Using SQLAlchemy as data mapper below.
MyItem class (models.myitem):
class MyItem(object):
Simple is a relative term, I should not have associated it with web2py DAL.
What I meant is that I want to make my application logic completely
independent from persistent data storage. The only method I know to
implement this is using the data mapper design pattern
(http://en.wikipedia.org/wik
pylint checks fail on web2py controllers and models because web2py
automatically imports several modules/classes/variables at runtime. I
assume this is a known issue and there is no workaround?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py
Most of my application code is running in Python modules in the modules
directory. In the modules directory, I have a few singletons which are
implemented as variables defined in the main body of a globals module.
However, it seems that web2py runs my modules and the controller in
different pro
Where should I put code that should run only once at web server startup
(not once per http request) (eg application initialization) ?
Thanks in advance!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.goog
Hi.
I'd like to use the domain model pattern and keep database access code
outside models. It seems to me that using a simple database abstraction
layer such as web2py DAL better fits to transaction script (no domain
models or anemic domain model - models reflect tables) or active records
(mod
8 matches
Mail list logo