Re: Theory - where & how to handle common functions & views

2009-05-18 Thread TiNo
On Mon, May 18, 2009 at 4:06 PM, zayatzz wrote: > > > Where is not such a big deal. You could write a function in view that you > > reuse multiple times (maybe start its name with an _ to show that it is > not > > a public function cq just a helper function), or you could put it into a > > util.p

Re: Theory - where & how to handle common functions & views

2009-05-18 Thread zayatzz
> Where is not such a big deal. You could write a function in view that you > reuse multiple times (maybe start its name with an _ to show that it is not > a public function cq just a helper function), or you could put it into a > util.py file and import it in your views.py > > How totally depends

Re: Theory - where & how to handle common functions & views

2009-05-18 Thread TiNo
On Sat, May 16, 2009 at 10:59 AM, zayatzz wrote: > > Hello > > I have several views that pass same info into templates. If i want to > change information that gets passed into template then i have to > change several views to get system up to date and this is not good. > Its common sense to repla

Re: Theory - where & how to handle common functions & views

2009-05-18 Thread zayatzz
Since i did not get answer ill explain my problem bit more. in first case (views). my current views work like that: They take request data, read session info and generate content related to that. I understand, that i could write function that takes request as argument. But since it has to return

Theory - where & how to handle common functions & views

2009-05-16 Thread zayatzz
Hello I have several views that pass same info into templates. If i want to change information that gets passed into template then i have to change several views to get system up to date and this is not good. Its common sense to replace them with one function instead. Where and how should i writ