Created
January 26, 2021 06:01
-
-
Save devmahmud/01e49024ba049636b45fe04b6a52f184 to your computer and use it in GitHub Desktop.
Run django web application in Linux Shared Hosting CPanel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
# pymysql is an alternative for mysqlclient | |
# import pymysql | |
# set variables | |
sys.path.append(os.getcwd()) | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'your_project_name.settings' | |
# setup django application | |
import django.core.handlers.wsgi | |
from django.core.wsgi import get_wsgi_application | |
# Initialize pymysql | |
# pymysql.install_as_MySQLdb() | |
application = get_wsgi_application() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment