On Mon, May 18, 2009 at 4:06 PM, zayatzz <alan.kesselm...@gmail.com> 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.py file and import it in your views.py > > > > How totally depends on what the function does, what is the block of code > > that comes back in every view? > > > > Thanks. The common info is like website language - which language is > visitor seeing and login info and such stuff. Basically it has to read > stuff from session data and to write some to it. > Thing that have to happen on (almost) every request, should usually be done in Middleware[1]. Tino [1] http://docs.djangoproject.com/en/dev/topics/http/middleware/#topics-http-middleware --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---