[web2py] Re: Basic models question

2010-12-09 Thread Anthony
On Monday, December 6, 2010 12:51:25 PM UTC-5, Anthony wrote: Also, the
model files are executed in alphabetical order, so
model_1.py will have access to things defined in model_0.py, but not
the other way around.


Note, I may have missed it, but I don't think this is actually
mentioned in the book anywhere -- might be useful to include.

[web2py] Re: Basic models question

2010-12-06 Thread Anthony
Also, the model files are executed in alphabetical order, so
model_1.py will have access to things defined in model_0.py, but not
the other way around.

Anthony

On Dec 6, 12:37 pm, Richard Vézina 
wrote:
> The model defined in
>
> model1.py or in db.py
>
> will be available in any controllers...
>
> I not sure but I think the only reason to devide your model in differents
> model file is for keep the file clean and understandable...
>
> For the controllers it is differents if you define a function in a
> particular controller it will be accessible only if you specify this
> controller in your URL.
>
> Richard
>
>
>
> On Mon, Dec 6, 2010 at 12:32 PM, Lorin Rivers  wrote:
> > If a model is defined in db.py, everything in that application has access
> > to it, correct?
>
> > The only reason to define a model in a different file is if you only need
> > to access that particular model in a similarly named controller, correct?
>
> > Thanks!
> > --
> > Lorin Rivers
> > Mosasaur: Killer Technical Marketing 
> > 
> > 512/203.3198 (m)- Hide quoted text -
>
> - Show quoted text -