On Mar 28, 5:13 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 3/27/07, walterbyrd <[EMAIL PROTECTED]> wrote:
>
> > Is that post correct? You have to restart the server whenever you make
> > a change to the django code?
>
> For templates, no. For changes to the actual Python code in use, generally 
> yes.
>
> The reason for this is that, under bothmod_pythonand FastCGI, the
> server process loads all the code into memory when it starts up, and
> keeps it there; it doesn't reload on every request. These server
> arrangements do so for performance reasons -- loading lots of code and
> libraries on every request (as would happen under normal CGI, for
> example) would impose a significant penalty.
>
> There are some workarounds:mod_python, for example, supports a
> "PythonAutoReload" directive which, if turned on, will tellmod_python
> to check the modification date of files and reload them. However, this
> again imposes a performance penalty.

The PythonAutoReload option has absolutely no affect when you are
using Django as the reload ability only applies to modules directly
imported by mod_python through its own module importing and caching
mechanism. Note that when mod_python can't find a module where it
looks and it falls back to using one on standard Python module search
path, those modules are not candidates for reloading and are treated
like any other normal Python module.

Thus in relation to Django, you shouldn't be suggesting
PythonAutoReload as a means of enabling module reloading as it doesn't
help for Django user application code modules.

Graham


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to