topgeardavid Posted June 8, 2017 Posted June 8, 2017 (edited) How can I deploy my Django project to Tommy: https://github.com/davidbgeek/drEdsby?What I've done is I've just renamed my wsgi.py to dispatch.wsgi. Not sure what else I'm supposed to do. Edited June 8, 2017 by topgeardavid Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 Have you read http://wiki.helionet.org/Django#Getting_started_with_Django_1.10 ? Quote
topgeardavid Posted June 10, 2017 Author Posted June 10, 2017 I have. I keep getting a 500 error. Is there a way for me to see an error log? Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 What is the path to the django project on Tommy? Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 Here's your error[Fri Jun 09 20:20:12.124673 2017] [wsgi:error] [pid 1213] [client <krydos>:25350] ModuleNotFoundError: No module named 'drEdsby', referer: http://edsby.drte.ch/ Here's the sample dispatch.wsgi from the wikiimport os, sys # edit your username below sys.path.append("/home/username_on_heliohost/public_html") from django.core.wsgi import get_wsgi_application os.environ['DJANGO_SETTINGS_MODULE'] = 'hello.settings' application = get_wsgi_application() You don't add your django app to the path so it's not going to be able to find your modules, such as drEdsby. Quote
topgeardavid Posted June 10, 2017 Author Posted June 10, 2017 Thanks; added the app to the path. What's the error now? Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 Same error. It still can't find the drEdsby module. Quote
topgeardavid Posted June 10, 2017 Author Posted June 10, 2017 Shouldn't this be working? import os, sys from django.core.wsgi import get_wsgi_application sys.path.append('/home/dr/public_html/edsby') sys.path.append('/home/dr/public_html/edsby/drEdsby') sys.path.append('/home/dr/public_html/edsby/webapp') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drEdsby.settings") application = get_wsgi_application() Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 Yeah, it probably should be. The way I debug things is start really small and simple, and make sure that works. Then just keep adding small parts and making sure they all work as you add them. When I was experimenting I remember having trouble with this line os.environ.setdefault("DJANGO_SETTINGS_MODULE", "drEdsby.settings") which is the way startproject command writes it. I changed it to something more like os.environ['DJANGO_SETTINGS_MODULE'] = 'drEdsby.settings' and had better success. Does that work? Quote
topgeardavid Posted June 10, 2017 Author Posted June 10, 2017 Still having trouble, has the error changed now, perhaps? Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 Yep, you've got a new error now: [Sat Jun 10 04:18:38.747773 2017] [wsgi:error] [pid 26724] [client krydos:10325] RuntimeError: populate() isn't reentrant, referer: http://edsby.drte.ch/ Quote
topgeardavid Posted June 10, 2017 Author Posted June 10, 2017 I've tried the solution found here, but I'm still getting the error. Any ideas why this might be happening? Quote
Krydos Posted June 10, 2017 Posted June 10, 2017 I read through the logs some more and found this as well [Sat Jun 10 04:43:48.904414 2017] [wsgi:error] [pid 6587] [client krydos:10808] ModuleNotFoundError: No module named 'django_jinja', referer: http://edsby.drte.ch/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.