Django on HelioHost

Django on the Tommy and Johnny servers uses Python 3.10.

If you need to run Django on another version of Python, you'll need to get a VPS.

About Django

Django is a web development framework designed specifically for Python. As Ruby on Rails does for Ruby, Django aims to provide an MVC (Model-View-Controller) architecture for web application development as well as a large set of prebuilt libraries to simplify the development of common web app features. Django's modularity also allows easy scalability and enables the reuse of various code blocks, aligning to the DRY ("Don't Repeat Yourself") software development principle.


ServerDjango VersionPython VersionPython PathLoaderPython Modules Installed













Using the WSGI loader for a shared hosting environment is ideal because it conserves memory and enhances security.

Django changes can take up to 2 hours to appear consistently on your site because WSGI uses server side caching.

If you want site changes to take effect immediately, we offer a few options to work around caching.

Complete Django

We offer the complete, unadulterated Django package, including extensions to interface with MySQL, PostgreSQL, and SQLite database engines.

Additional Libraries

To request additional libraries, please raise a request in the Customer Service forum, making sure to provide your username, your server, and the libraries you need including any relevant version numbers for them.


Shell Access

We don't offer shell (command line) access to our users. Many Django tutorials and installation instructions assume that users have command line access, which may make working with Python & Django more difficult. Most people tend to develop on their home computer and then upload to their web server, which almost negates the need for this feature. Furthermore, most configuration done through the command line can be done through other methods, such as FTP and manual file editing.

WSGI Daemon Mode

There are two ways to configure Django to work with the mod_wsgi loader in Apache. You can either create a separate daemon for each Django process (daemon mode) or embed Django into the Apache daemon (embedded mode). While daemon mode tends to be the standard among Django admins because of the increased control it offers, we use embedded mode because it can be set up on a per-user basis without very much root-level configuration. Embedded mode is slightly harder to get working (see directions below), and might break compatibility with some Django tutorials. In most cases, it should not be a problem.

Getting started with Django 4.1 on HelioHost

This brief tutorial will guide you through setting up a Django test app without using the command line on your development system.

If you already have an existing Django app or prefer to use the command line, our tutorial on Converting an Existing Django App may better suit your needs.

1. Create a directory on your main domain called djangotest.

If you were transferred from the old cPanel, your main domain will be parked on the public_html directory.

If you created a new account on Plesk, your directory will be httpdocs.

2. Create an .htaccess file inside the djangotest directory with these contents:

Options +ExecCGI
RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(djangotest/dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ djangotest/djangotest/dispatch.wsgi/$1 [QSA,PT,L]

3. Create another djangotest directory within the first djangotest directory

This directory structure is standard for a Django project. Please note that you cannot name the project folder django, it will not work. This is why the name djangotest is being used in this example.

4. Create a dispatch.wsgi file inside the second djangotest directory with these contents:

import os, sys
# edit your path below
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangotest.settings')
application = get_wsgi_application()

Make sure you edit the path:

On Plesk, your path is /home/

If you were transferred from cPanel, your path is /home/

5. Create a file inside the second djangotest directory

This file should remain empty.

6. Create a file inside the second djangotest directory with these contents:

from django.contrib import admin
from django.urls import path
urlpatterns = [
#    path('admin/',,

7. Create a file inside the second djangotest directory with these contents:

from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-makeyoursecretbetterthanthis'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# Application definition
ROOT_URLCONF = 'djangotest.urls'
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
WSGI_APPLICATION = 'djangotest.wsgi.application'
# Database
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
# Password validation
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
# Internationalization
USE_I18N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
STATIC_URL = 'static/'
# Default primary key field type
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

8. Make sure your directory structure and files look like this:

├── djangotest
│   ├── dispatch.wsgi
│   ├──
│   ├──
│   └──
└── .htaccess
1 directory, 5 files

9. Visit Your Site

In your web browser, navigate to

If you did everything right it should look like this:


This tutorial is adapted from this post.

Last updated