Deployment failing after switching to ASGI_APPLICATION from WSGI_APPLICATION

producttraceHOBBY

6 months ago

This is the error I am getting :

context: fea4d327ff87ceb51732999dc6691ed8
Nixpacks build failed
Error: Failed to find your WSGI_APPLICATION django setting. Add this to
continue.

This is my settings.py :

"""
Django settings for Backend project.

Generated by 'django-admin startproject' using Django 5.0.6.

For more information on this file, see
https://docs.djangoproject.com/en/5.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""

from pathlib import Path
import environ
from datetime import timedelta
from dotenv import load_dotenv
import os

load_dotenv()

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 https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

SECURITY WARNING: keep the secret key used in production secret!

SECRETKEY = 'django-insecure-zk6ehhwy4p-3$926b_f#c1ecnfq$mi!ip9)zz9u!2tr3@fxcz'

SECURITY WARNING: don't run with debug turned on in production!

DEBUG = True

ALLOWED_HOSTS = ['*']

Application definition

INSTALLEDAPPS = [ 'ptlcore', 'corsheaders', 'ninjajwt',
'ninjaextra', 'djangoextensions',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'daphne',
'django.contrib.staticfiles',
'django_eventstream',
]

ASGI_APPLICATION = 'Backend.asgi.application'

EVENTSTREAMSTORAGECLASS = 'django_eventstream.storage.DjangoModelStorage'

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

0 Replies

Deployment failing after switching to ASGI_APPLICATION from WSGI_APPLICATION - Railway Help Station