On Apr 5, 3:11 pm, Tom Evans <tevans...@googlemail.com> wrote:
>
> OP: I have a couple of solutions. One of the first things the server
> does is import your settings, so if you load and parse your static
> data at that point, then you will have access to it from that point
> onwards.

Please dont. Settings are, well, settings, and should contain as few
executable code as possible.

A memoized function seems like the best solution here. Just for the
record, the usual way to have code executed at process startup is to
call this code from within one of your app's models.py - as theses
modules are garanteed to be imported by django at process startup (but
used to be executed twice when running anything from manage.py which
can be a PITA - this seems to have beed fixed the recent 1.4 release).

-- 
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.

Reply via email to