Just started Django - please help clarify web site configuration strategy
I could formulate my question differently - is there such thing as an
application context in Django? Basically, the question is - when a web
application starts there is a number of things that needs to be
available any time any request. Some of them are really static in
nature - for example, pagination parameters; some of them are more
dynamic - for example, menu options.
Things get more interesting when such data are read from the database.
So far what I see is that all that stuff should be places in the
request context (hopefully cached). It can be done more elegantly if
custom context processor(s) are created. But we are still rely on
request contexts. Unless I am missing something?
It seems that although request contexts combined with caching can
help, it is way too complex for the purposes of initializing the
application.
Which leads me to another question - is there any callback mechanism
when Django application starts? I guess what I am looking is a place
to make one-time queries, store data in a static member - and viola, I
have my application context.
Please bear with me,
Serge
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home