On Sat, 2008-11-15 at 21:36 -0800, Chuck22 wrote: > Because my application works fine with Django development server > (http://locahost:8000) on the same machine, I assume the problem does > not reside in my application code. Then it must be due to the > configuration of Apache.
Presumably that's a reply to my question about why you are suspecting your VirtualHost configuration? Or is it an answer to something else? > Do I need to modify my code to make it work > with Apache/mod_python? Not necessarily, but you'll see what the real error is and why Django is raising it. The error you posted the first time was Django reporting a different problem (that you're missing a 500.html template). Now that we can see the real error, it help narrow down whether it's a configuration issue, or a file permission issue (which could be one difference) or a database access issue (another difference), etc. In this case, seeing the error suggests almost immediately what the problem is likely to be: > > Here is the information after I set DEBUG=True. > > ********************************************* > ViewDoesNotExist at / > Could not import views. Error was: No module named viewsRequest > Method: GET > Request URL: http://www.domain.com/ > Exception Type: ViewDoesNotExist > Exception Value: Could not import views. Error was: No module named > views > Exception Location: C:\Python25\lib\site-packages\django\core > \urlresolvers.py in _get_callback, line 132 > Python Executable: C:\Program Files\Apache Software Foundation > \Apache2.2\bin\httpd.exe > Python Version: 2.5.2 > > > Traceback Switch to copy-and-paste view See that last line? In future, it will be better to click on that and use the cut-and-paste view when cutting and pasting. Makes things a lot easier to read. The view you pasted is good for viewing in a web browser, but it's obviously a bit verbose for an email message. Not to worry this time, since you've provided the information needed, but keep it in mind for the future. Trimming the next bunch of lines -- since they're important to know, but in this case just say the problem occurred when trying to resolve the initial URL -- we get to this: > Exception Value: Could not import views. Error was: No module named > views So it cannot import a particular file. This suggests one of two problems. Either your Python path isn't set correctly (how to set that is documented in Django's mod_python documentation) or Apache doesn't have permission to read the file or one of the directories leading to the file. Check your Python path to make sure it includes the parent directories of everything you import. If that's correct, check that Apache has permission to read the necessary files (I have absolutely no idea what permission setting/enforcement involves on a Windows system). Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---