On Oct 18, 2011, at 12:52 AM, Manuele wrote:
> On 17/10/2011 23:14, Jonathan Lundell wrote:
>> Or import it from a module.
> but modules don't have direct access to the db...
True, but you can pass the db to your functions.
> maybe the two easiest ways are:
>
> 1. define it in a model file... a
Thank you!
On Tue, Oct 18, 2011 at 5:52 AM, Manuele wrote:
> On 17/10/2011 23:14, Jonathan Lundell wrote:
>
>> Or import it from a module.
>>
> but modules don't have direct access to the db... maybe the two easiest
> ways are:
>
> 1. define it in a model file... at least in a mylib.py file sepa
On 17/10/2011 23:14, Jonathan Lundell wrote:
Or import it from a module.
but modules don't have direct access to the db... maybe the two easiest
ways are:
1. define it in a model file... at least in a mylib.py file separeted to
the main db.py or other file you use to define models.
2. use t
On Oct 17, 2011, at 2:04 PM, Tito Garrido wrote:
> I have a function that will need to be used on at least 3 controllers... This
> function will need to have access to the database and doesn't need a view
> since it will just return True or False.
>
> What is the best way to implement it? My fi
Hi folks!
I have a function that will need to be used on at least 3 controllers...
This function will need to have access to the database and doesn't need a
view since it will just return True or False.
What is the best way to implement it? My first idea was to put this function
inside the model.
5 matches
Mail list logo