Hi Kilian, On Thu, 2006-07-27 at 22:40 +0200, Kilian CAVALOTTI wrote: > On Thursday 27 July 2006 18:48, Malcolm Tredinnick wrote: > > Aargh! Can you make a ticket with these details so that we don't lose > > them, please (I have flagged this email to look at later, too). > > Sure. It's done as ticket #2438. > > > This -- > > the get_apps() and get_models() code -- is a slight hairy, > > :) > > > Thanks for doing the investigation you did, though. That helps narrow it > > down a *lot*. It will help when I get some time to look at this. This is > > exactly the information > > That's a pleasure to dig around in django code, as it's globally clear, and > well structured, it's not too difficult to identify where the problems are > located. But in that case, I'm banging my head against the fact that > hasattr() is a python core function, and I can't figure out why the > returned results depends on the server used. I'll try to investigate a > little more and post my findings here, if any.
I was looking at this problem a bit more today and I must admit that I'm a bit stumped at the moment. A few questions, though, which may help narrow down the cause a bit (I cannot repeat the problem over here, so hopefully you can test your failing case and we'll all be enlightened)... 1. In the original django-users thread on this, you said you were importing hostManage as dNA.hostManage, but in your example above, you are only importing it directly (using the fact that '.' is on the PYTHONPATH). Does the command- line test work if you import it using the same qualified path as in your INSTALLED_APPS tuple? 2. If you remove dNA.zoneConf from the INSTALLED_APPS list, or move it further down the list (if the former test isn't possible), does the problem still occur? 3. One difference between the standard mod_python setup and the environment that manage.py shell gives you is that the latter case puts the /var/www/dNA/ directory on the Python path, whereas I suspect your mod_python configuration will only have /var/www/ in your PythonPath? (plus the standard system paths). Is this correct (in your configuration)? Does the problem go away if you add / var/www/dNA/ to the Python path directive? 4. Are the permissions in /var/www/dNA/hostManage/ exactly the same as in dNA/zoneConf? In particular, does the webserver process have permission to read the models.py file? 5. Are you using a hostManage/models.py file, or hostManage/models/... files (in a directory)? I am suspecting that there is some interaction between the permissions on the files you have (*.py and/or *.pyc files) and the web server's permissions to read those files. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers -~----------~----~----~----~------~----~------~--~---