mbdungo Posted January 25, 2014 Posted January 25, 2014 I guest I've followed How do I use Python/Django? perfectly, exept the sentence:If it is your wish to develop on-site you will need to manually create a blank __init__.py file, a settings.py file, and a urls.py file.And after that, after following the guide, my specified subdirectory is now have an 500 Internal Server Error.. Do I need to install the Django web development framework manually before it'll work?Please help..
Byron Posted January 25, 2014 Posted January 25, 2014 Here's a zip file of a working example of django. http://area52.heliohost.org/djangotest.zip After you unzip the files, you'll see this file here: dispatch.wsgi You'll need to edit these two lines to match your site plus create the directory mentioned: import os, sys sys.path.append("/home1/area52/public_html/djangotest"); ### EDIT LINE ABOVE TO YOUR SITE ### os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' os.environ['PYTHON_EGG_CACHE'] = '/home1/area52/.python_egg_cache' ### YOU NEED TO CREATE THE DIRECTORY ABOVE WITH PERMISSIONS 777 ### If you've succeeded you'll see this: http://area52.heliohost.org/djangotest/ 1
mbdungo Posted January 25, 2014 Author Posted January 25, 2014 Thank you! I didn't have "__init__.py" file, a "settings.py" file, and a "urls.py" file..And it's now working on my account! Can you tell me some web tutorials for that files?
Krydos Posted January 27, 2014 Posted January 27, 2014 LMGTFY: https://docs.djangoproject.com/en/1.3/intro/tutorial01/
Recommended Posts