HOW TO Depoy Your Projectinto Github to PythonAnyWhere
$pwd
/home/venkatasivaramireddy
$ git clone https://github.com/venkatasivaramireddy/todayjobupdates
$ mkvirtualenv --python=python3.6 myproject
$ pip install -U django==2.2.5
$ ls
README.txt todayjobupdates
$ cd todayjobupdates
/todayjobupdates (master)$ ls
pagination
/todayjobupdates (master)$ cd pagination
/todayjobupdates/pagination (master)$ pwd
/home/venkatasivaramireddy/todayjobupdates/pagination
/todayjobupdates/pagination (master)$ python manage.py makemigrations
/todayjobupdates/pagination (master)$ python manage.py migrate
/todayjobupdates/pagination (master)$ python manage.py collectstatic
import sys
#
## assuming your django settings file is at '/home/venkatasivaramireddy/mysite/mysite/settings.py'
## and your manage.py is is at '/home/venkatasivaramireddy/mysite/manage.py'
path = '/home/venkatasivaramireddy/todayjobupdates/pagination'
if path not in sys.path:
sys.path.append(path)
#
os.environ['DJANGO_SETTINGS_MODULE'] = 'pagination.settings'
#
## then:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Finally we Load Our Static file into hosting
go to files
go to your folder and go to your projectfolder and go to your projectfile
go to settings and go to
add on bottom -
STATIC_ROOT='/home/venkatasivaramireddy/todayjobupdates/pagination/static'
if in case after runing again you get the error then added
ALLOWED_HOSTS = ['venkatasivaramireddy.pythonanywhere.com']
Referance: https://www.youtube.com/watch?v=Y4c4ickks2A
/home/venkatasivaramireddy
$ git clone https://github.com/venkatasivaramireddy/todayjobupdates
$ mkvirtualenv --python=python3.6 myproject
$ pip install -U django==2.2.5
$ ls
README.txt todayjobupdates
$ cd todayjobupdates
/todayjobupdates (master)$ ls
pagination
/todayjobupdates (master)$ cd pagination
/todayjobupdates/pagination (master)$ pwd
/home/venkatasivaramireddy/todayjobupdates/pagination
/todayjobupdates/pagination (master)$ python manage.py makemigrations
/todayjobupdates/pagination (master)$ python manage.py migrate
/todayjobupdates/pagination (master)$ python manage.py collectstatic
WSGI configuration file
import osimport sys
#
## assuming your django settings file is at '/home/venkatasivaramireddy/mysite/mysite/settings.py'
## and your manage.py is is at '/home/venkatasivaramireddy/mysite/manage.py'
path = '/home/venkatasivaramireddy/todayjobupdates/pagination'
if path not in sys.path:
sys.path.append(path)
#
os.environ['DJANGO_SETTINGS_MODULE'] = 'pagination.settings'
#
## then:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Finally we Load Our Static file into hosting
go to files
go to your folder and go to your projectfolder and go to your projectfile
go to settings and go to
add on bottom -
STATIC_ROOT='/home/venkatasivaramireddy/todayjobupdates/pagination/static'
if in case after runing again you get the error then added
ALLOWED_HOSTS = ['venkatasivaramireddy.pythonanywhere.com']
Referance: https://www.youtube.com/watch?v=Y4c4ickks2A
Comments
Post a Comment