This documentation is for Dash Enterprise.
Dash Enterprise is the fastest way to write & deploy Dash apps and
10% of the Fortune 500 uses Dash Enterprise to productionize AI and
data science apps. Find out if your company is using Dash Enterprise
This page outlines how to configure a Django app for deployment to Dash Enterprise. For running and previewing a Django app in a Dash Enterprise workspace, see the Development App page.
Your Django app’s
manage.py file should be in your project’s root directory. To deploy a Django app to Dash Enterprise, you’ll also need to configure your Django project’s
The Django Admin site is not currently supported for Django apps on Dash Enterprise. To avoid possible issues, remove admin URLs from your project’s main
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("", include("polls.urls")), # path('admin/', admin.site.urls), ]
You’ll also need to add the name of the app initialized on Dash Enterprise as part of the URL in
See the initializing an app page for more details.
For example, here we initialize an app called
And we then add it to paths in our project’s main
from django.contrib import admin from django.urls import include, path urlpatterns = [ path("my-django-app/", include("polls.urls")), # path('admin/', admin.site.urls), ]
Ensure you have a path in your app that serves content at the root URL (what a user sees when they visit the app at
To configure the
Add your Dash Enterprise hostname to
ALLOWED_HOSTS. If you access the Dash Enterprise portal at
https://example-dash-enterprise-5-hostname.com/portal, the hostname would be
ALLOWED_HOSTS = [
INSTALLED_APPS. These are currently unsupported on Dash Enterprise.
INSTALLED_APPS = [
# 'django.contrib.admin', <-- This line should be removed or commented out
# 'django.contrib.auth', <-- This line should be removed or commented out
# 'django.contrib.sessions', <-- This line should be removed or commented out
MIDDLEWARE. This is currently unsupported on Dash Enterprise.
MIDDLEWARE = [
# 'django.contrib.auth.middleware.AuthenticationMiddleware', <-- This line should be removed or commented out
4. For a production app, set
DEBUG = False
For more details on
settings.py, see the Django documentation.
Describe your app’s Python dependencies in a
requirements.txt file if you want Dash Enterprise to use the pip buildpack, or describe them in an
environment.yml file if you want Dash Enterprise to use the Conda buildpack.
Note that adding both
environment.yml to your app currently causes Dash Enterprise to detect only the pip buildpack, so it is not possible to use both sets of features from these files in the same app.
Procfile is a required text file that tells Dash Enterprise which processes to run on
startup, like starting your app’s web server, scheduling jobs, and running background processes.
This file is always named
Procfile—with no file extension. It must be placed in your app’s root directory and uses the following format:
Django app Procfile example
A basic Procfile for a Django app looks like this.
web: gunicorn <your-django-app>.wsgi
For the Django app above called
mysite, this would look like this:
web: gunicorn mysite.wsgi
For more details on Django with Gunicorn see How to use Django with Gunicorn.
.gitignore is a text file that determines which files and folders are ignored by Git.
Files listed in the
.gitignore are not copied to the server when you deploy your app.
venv *.pyc .DS_Store .env
Aptfile can be used to install system-level packages via the APT package manager. It supports:
Aptfile is included in your project, an
apt-get update is triggered before installing the packages.
Packages from standard APT repositories
Packages from APT repositories might include database drivers that your app requires.
In the following example we are installing
Specific .deb files
You can also add links to specific
.deb files to be installed:
Custom APT repositories
Aptfile can also contain additional APT
:repo:deb <a href="https://apt.example.com/">https://apt.example.com/</a> example-distro main
Important: Dash Enterprise requires that custom APT repositories have a TLS/SSL certificate from a globally trusted certificate authority (CA).
To use APT packages in your apps when Dash Enterprise is internet-restricted, you need to specify a custom APT repository that Dash Enterprise has network access to. See an example in
Developing Apps when Dash Enterprise Is Internet-Restricted.