Serving your own Django project

To serve your own Django project from your installed Django application:

1

Upload your Django project directory to the root of your application directory, for example /home/username/apps/appname.

2

Activate the application's Python environment:

cd ~/apps/appname
source env/bin/activate
3

Install your project's Python dependencies. See Installing Python Dependencies for your Django Project for more information.

4

Edit /home/username/apps/appname/uwsgi.ini and set the python-path, wsgi-file, and touch-reload options (at the end of the file) to point at your project.

For example, if your project name is "newsite":

# adjust the following to point to your project
python-path = /home/username/apps/appname/newsite
wsgi-file = /home/username/apps/appname/newsite/newsite/wsgi.py
touch-reload = {appdir}/newsite/newsite/wsgi.py
5

Run the following commands to restart your Django instance:

/home/username/apps/appname/stop
/home/username/apps/appname/start