Skip to content

Knowledgebase

Preparing and deploying a Django application on eligible hosting

development

Django hosting requires a compatible Python environment and a production WSGI or ASGI deployment method. Confirm what your Nabtech plan supports before uploading the project. A Python selector does not automatically provide every system dependency, database or background worker your application may require.

01 Prepare a production configuration

Record supported Python and Django versions, dependency requirements, database engine and any task queue or cache service. Separate production secrets from source code. Plan file uploads, backups and a controlled database migration before switching a live application.

  1. Create the supported Python application environment in the panel, or agree the deployment method for an authorised server.
  2. Upload the application and dependency file. Install packages in that environment rather than changing the server's system Python.
  3. Configure the supported WSGI or ASGI entry point. Use the server integration's documented method; Django's development server is not the production hosting service.
  4. Set DEBUG=False, a private production SECRET_KEY and the appropriate ALLOWED_HOSTS. Configure the correct database and other environment values.
  5. Back up the database before running required migrations. Run manage.py check --deploy against the actual production settings and investigate relevant findings.
  6. Collect and serve static files through the approved web-server arrangement. Keep user-uploaded media separate from application code and prevent uploaded files from executing as scripts.
  7. Start or restart the app using the supported manager and test through HTTPS.

02 Verify the complete application

Check login, forms, database writes, static assets, uploads and outbound email. Test any background tasks separately. Confirm that error pages do not expose settings, source or tracebacks to visitors.

What causes common Django deployment failures?

A missing package, wrong environment, incorrect entry point or unavailable database can stop startup. A DisallowedHost error points to hostname configuration, while missing CSS often points to static-file handling. Review the relevant logs instead of turning production debugging on for everyone.

If the application requires a service unavailable in the selected plan, discuss a suitable VPS or managed deployment with us. Keep the previous working release and compatible database recovery plan until the new deployment is verified.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support