Reputation: 31
I'm new at this and stuck. What would cause Django to run without error when I do python manage.py runserver but then throw Internal Server Error when I try to access it through the web? I have another project giving the Congratulations on your first Django-powered page, and I got the same result with the same .wsgi file initially with this project.
It wasn't until I tried to install this script in massivecoupon project that I got Internal Server Error:
http://github.com/coulix/Massive-Coupon---Open-source-groupon-clone
UPDATE:
I set Debug to True in settings.py and now I am getting the django error:
ViewDoesNotExist at / Could not import massivecoupon.engine.views. Error was: No module named libs
Upvotes: 2
Views: 43027
Reputation: 139
You can use in command line
[user]$ python manage.py check
Regards
Upvotes: 13
Reputation: 58523
First off check the Apache error log. If there is nothing in Apache error log, due to it being an internal error to your code or Django while handling a request, set DEBUG to True in Django site settings file and restart Apache so details of error display in the browser.
Upvotes: 0
Reputation: 7726
Quick answer: check your apache/tomcat access.log and error.log
Next, the other (not really dup) question I quoted above may be a different situation, but I recommend looking into the same things:
Your
PYTHONPATH
may not contain your project directory, or yourDJANGO_SETTINGS_MODULE
may not contain 'mysite.website', at least from apache's point of view. Whatever user apache runs as for your website needs to have that set up for it, like in its.profile
. Or if you're usingmod_python
, they need to be set up in the.htaccess
or apache'shttpd.conf
. Or if you're usingmod_wsgi
, it needs to be in the wsgi setup file --passenger_wsgi.py
or the like -- whatever apache's module will be looking for.
Next:
SITE_ID=1
setUpvotes: 7