On May 31, 2:12 pm, dxLogan <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm a new Django user and looks forward to it. I'm still playing with
> it and met some unexplained results. Hopefully masters here may shed
> some insight into the problem.
>
> So I set up the apache with mod_python as taught on the documentation,
> and set up some basic site to try. Say the path is  
> :http://192.168.1.100/py/p1/time/
> . I'm in chapter 6. I restarted apache.
>
> When I refresh it, it will show me this error :
>
> ImproperlyConfigured at /py/p1/time/
> ImportError p1.books: No module named p1
> Request Method:         GET
> Request URL:    http://192.168.1.100/py/p1/time/
> Exception Type:         ImproperlyConfigured
> Exception Value:        ImportError p1.books: No module named p1
> Exception Location:     /usr/local/lib/python2.5/site-packages/django/
> template/loaders/app_directories.py in , line 22
>
> Then, refresh, it's ok. Then I refresh, fail again, refresh, fail,
> refresh, ok, refresh fail.
>
> Ok the problem is either it should fail 100%, or pass 100%, but for
> some reason, in 50 refreshes, about some 30~60% fails ( it doesn't
> matter ) . This is rather eerie to me to have such indeterministic
> behaviour. I can't rely on it if this problem persists, could anyone?
> =(
>
> Is this a known issue or having a known fix?

You can get this sort of behaviour because Apache is a multi process
web server, thus different requests are going to different processes.
If you are making changes on the fly to your code, or are trying to
host multiple Django instances and have stuffed up your configuration,
each process could have a slightly different view of the world and
results can thus be unpredictable.

For mod_python, rule 1 is that you must restart Apache every time you
make code and/or configuration changes.

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