Interestingly, I am getting some strange errors when trying to output the interpreter ID to my error log. Attempting to do so generates an error in my logs:
[Thu Jun 21 20:00:23 2007] [error] [client 209.155.235.13] PythonHandler django.core.handlers.modpython: File "/djangosites/ atlantaice/settings.py", line 3, in ?\n apache.log_error("INTERPRETER %s" % apache.interpreter) [Thu Jun 21 20:00:23 2007] [error] [client 209.155.235.13] PythonHandler django.core.handlers.modpython: AttributeError: 'module' object has no attribute 'interpreter' atlantaice.urls doesn't reference AGDWeb in any way. urlpatterns = patterns('', (r'^$', 'atlantaice.web.views.homepage'), (r'^alliedpartners/$', 'atlantaice.web.views.allied_partners'), (r'^contact/$', 'atlantaice.web.views.contact'), (r'^contact/confirm/$', 'atlantaice.web.views.contact_confirm'), (r'^emergency/$', 'atlantaice.web.views.emergency'), (r'^employmentopp/$', 'atlantaice.web.views.list_jobs'), (r'^employmentopp/(?P<job_id>\d+)/$', 'atlantaice.web.views.show_job'), (r'^employmentopp/(?P<job_id>\d+)/apply/$', 'atlantaice.web.views.job_apply'), (r'^employmentopp/confirm/$', 'atlantaice.web.views.employment_confirm'), (r'^eventrentals/$', 'atlantaice.web.views.event_rentals'), (r'^eventrentals/popup/(?P<item>[0-9a-z\-]+)/$', 'atlantaice.web.views.show_popup'), (r'^faqs/$', 'atlantaice.web.views.faq'), (r'^iceestimator/$', 'atlantaice.web.views.ice_estimator'), (r'^icemachines/$', 'atlantaice.web.views.ice_machines'), (r'^pastevents/$', 'atlantaice.web.views.past_events'), (r'^popup_blockice/$', 'atlantaice.web.views.popup_blockice'), (r'^popup_dryice/$', 'atlantaice.web.views.popup_dryice'), (r'^products/$', 'atlantaice.web.views.products'), (r'^servicearea/$', 'atlantaice.web.views.service_area'), (r'^services/$', 'atlantaice.web.views.services'), (r'^testimonials/$', 'atlantaice.web.views.testimonials'), (r'^weeklyroute/$', 'atlantaice.web.views.weekly_route'), (r'^weeklyroute/confirm/$', 'atlantaice.web.views.weekly_route_confirm'), (r'^admin/', include('django.contrib.admin.urls')), On Jun 21, 7:12 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > What is in: > > atlantaice.urls > > If the details in the error page are to be believed, it would look > like one of the URL mapping rules is referencing the other site. > > I really wish the Django error page would show the interpreter name > when using mod_python. I guess another suggestion I should create a > ticket for when I can catch up with my list of things to do.. :-) > > Graham > > On Jun 21, 11:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > Error can be seen herehttp://beta.atlantaicecompany.com/ > > > AGDWeb is an app in a totally separate project under the same > > PythonPath. It has a separate settings file. > > > I am not using any Django cache, I am referring to some sort of > > internal caching thatmod_pythonis doing. > > > The settings file looks like this > > > <VirtualHost *> > > ServerName beta.atlantaicecompany.com > > ServerAdmin [EMAIL PROTECTED] > > DocumentRoot /djangosites/atlantaice/ > > <Location "/"> > > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > SetEnv DJANGO_SETTINGS_MODULE atlantaice.settings > > PythonPath "['/djangosites/'] + sys.path" > > PythonDebug Off > > </Location> > > <Location "/images"> > > SetHandler None > > </Location> > > <Location "/js"> > > SetHandler None > > </Location> > > <Location "/flash"> > > SetHandler None > > </Location> > > <Location "/admin-media"> > > SetHandler None > > </Location> > > > ErrorLog /var/log/apache2/beta.atlantaicecompany.com-error.log > > > # Possible values include: debug, info, notice, warn, error, > > crit, > > # alert, emerg. > > LogLevel warn > > > CustomLog /var/log/apache2/beta.atlantaicecompany.com- > > access.log combined > > ServerSignature Off > > </VirtualHost> > > > and > > > <VirtualHost *> > > ServerName agdweb.gtagd.org > > ServerAdmin [EMAIL PROTECTED] > > DocumentRoot /djangosites/AGD/ > > <Location "/"> > > SetHandler python-program > > PythonHandler django.core.handlers.modpython > > SetEnv DJANGO_SETTINGS_MODULE AGD.settings > > PythonPath "['/djangosites/'] + sys.path" > > PythonDebug Off > > </Location> > > <Location "/site-media"> > > SetHandler None > > </Location> > > <Location "/admin-media"> > > SetHandler None > > </Location> > > > ErrorLog /var/log/apache2/agdweb.gtagd.org-error.log > > > # Possible values include: debug, info, notice, warn, error, > > crit, > > # alert, emerg. > > LogLevel warn > > > CustomLog /var/log/apache2/agdweb.gtagd.org-access.log > > combined > > ServerSignature Off > > </VirtualHost> > > > On Jun 21, 5:45 am, Graham Dumpleton <[EMAIL PROTECTED]> > > wrote: > > > > On Jun 21, 5:46 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote > > > > > On 21-Jun-07, at 12:50 PM, [EMAIL PROTECTED] wrote: > > > > > > cache gets confused. But if I do that, the settings don't work > > > > > correctly and the site won't load. What am I doing wrong? > > > > > you need a pythonInterpretor line in each Location with a different > > > > name. It is in the documentation > > > > Not true if each is in its own VirtualHost as the default behaviour of > > >mod_pythonis to give each VirtualHost its own sub interpreter. You > > > should only need to set PythonInterpreter if you were running two > > > Django instances within the same VirtualHost at different mount > > > points. > > > > For completeness, it would help if OP posted both VirtualHost > > > configurations side by side in the same message, so one can see > > > properly the PythonPath setting for each and the > > > DJANGO_SETTINGS_MODULE setting. > > > > BTW, if using recentmod_python, to confirm that distinct Python sub > > > interpreters are being used one can use: > > > > frommod_pythonimport apache > > > apache.log_error("INTERPRETER %s" % apache.interpreter) > > > > Then check the Apache error log file. > > > > I would also suggest printing the value of sys.path to make sure it is > > > what you expect. > > > > More importantly, when you say "Django's cache is confusing the two > > > sites and is saying that one table from a project doesn't exist in the > > > other project's db", can you post the actual full message you are > > > getting, and state where you are getting it. If it has a traceback, > > > also include the traceback. > > > > 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 -~----------~----~----~----~------~----~------~--~---