Deploying Django Project at Pythonanywhere

By: summonagus ● at July 21, 2017, 6:46 p.m. ● and modified at July 21, 2017, 8:44 p.m.
Posted under: #Django, #APP, #Project, #News ● Your ip address: ● views: 77 times.

AD Space Available, Book Now!

PythonAnywhere is an online Integrated Development Environment (IDE) and Web hosting service based on the Python programming language. It provides in-browser access to server-based Python and Bash Command-line interfaces, along with a code editor with Syntax highlighting. Program files can be transferred to and from the service using the user's browser. Web applications hosted by the service can be written using any WSGI-based application framework. (wikipedia)

Makesure you created an account and logged in first, before doing this tutorial.

1. Go to, and create new Django.

Create new Django project at Pythonanywhere

2. Create your virtualenv

$ mkvirtualenv env-mysite

Create virtualenv in Pythonanywhere

3. Take your django project

You can use SSH, git, or other else to take your django project into pythonanywhere. In this case, I clone my Django project via git for easilier.

$ git clone

Cloning django project

4. Sync the virtualenv

Go to, and change to your virtualenv that you created before.

Virtualenv Setting

5. Edit file

Don't miss to change common settings inside your file, such as:

# default static files settings for PythonAnywhere. # see for more info MEDIA_ROOT = u'/home/yourusername/swotproject/media' MEDIA_URL = '/media/' STATIC_ROOT = u'/home/yourusername/swotproject/static'
STATIC_URL = '/static/'

6. Reload your web app

Reload your web app and then check at your site..

Reload app



Python Developer, Linux Enthusiast, and Senior writer at
blog comments powered by Disqus