Hi,
Accidently I deleted my wsgi.py file. I had created a Django Project.
Does anyone know what is the code usually inside wsgi.py file?? Appreciate your help / suggestion !!
Thanks, San
Hi,
Accidently I deleted my wsgi.py file. I had created a Django Project.
Does anyone know what is the code usually inside wsgi.py file?? Appreciate your help / suggestion !!
Thanks, San
Oh I figured it out...
Anyway if someone in future deletes this... Please find the code below:-
# This file contains the WSGI configuration required to serve up your
# web application at http://xxx.pythonanywhere.com/
# It works by setting the variable 'application' to a WSGI handler of some
# description.
#
# The below has been auto-generated for your Django project
import os
import sys
# add your project directory to the sys.path
project_home = u'/home/xxx'
if project_home not in sys.path:
sys.path.append(project_home)
# set environment variable to tell django where your settings.py is
os.environ['DJANGO_SETTINGS_MODULE'] = 'xxx.settings'
# serve django via WSGI
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
~San !
Yup, that's the right one to use for Django.