On Jun 8, 6:27 am, eddie wrote:
> I've been considering some issues related to this. Where do people
> tend to locate their functions they are calling from controllers?
You can locate controller specific functions in your controller file;
>
> Obviously the simplest place is as a function defined
I've been considering some issues related to this. Where do people
tend to locate their functions they are calling from controllers?
Obviously the simplest place is as a function defined in the same
controller python file as where it is called from. But some down sides
to this are:
* You end up w
All functions defined in models are available to controllers and views
as anything you put in the models becomes part of the global namespace
that the controllers/views are executed in.
This leads to potential problems of namespace collision.
Make sure you do not overwrite the function elsewhere,
On Fri, Jun 4, 2010 at 9:11 AM, Yarko Tymciurak
wrote:
>
>
> On Jun 4, 10:58 am, Doug Warren wrote:
>> I don't believe I want to local_import my db.py file as it's already
>> set up by the environment correct?
>
> Correct - you do not want / need to import your db.py.
>
> As long as it is in your
On Jun 4, 10:58 am, Doug Warren wrote:
> I don't believe I want to local_import my db.py file as it's already
> set up by the environment correct?
Correct - you do not want / need to import your db.py.
As long as it is in your models folder (by default it is), it's
already in your request cont
I don't believe I want to local_import my db.py file as it's already
set up by the environment correct?
What I'm asking for is a way to keep all of the code that relates to
the model in one place and to invoke it from controllers. That is if
I define 5 tables for the model I'd expect to write hel
On Jun 4, 10:43 am, Doug Warren wrote:
> Traditionally when I've written MVC style applications, the model
> would contain not only the data representing the objects but also the
> data for manipulating the objects. I'm not sure how that same
> relation applies to web2py.
>
> If I have a model
7 matches
Mail list logo