Skip to content

Commit

Permalink
fix: Update WSGI configuration to properly initialize Django
Browse files Browse the repository at this point in the history
  • Loading branch information
Anon23261 committed Nov 15, 2024
1 parent ff05c99 commit 08bafd1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pythonanywhere_wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
sys.path.insert(0, project_home)

# Set Django settings module
os.environ['DJANGO_SETTINGS_MODULE'] = 'ghostsec.settings.pythonanywhere'
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ghostsec.settings.pythonanywhere')

# Set up Django
import django
django.setup()

# Import Django WSGI handler
from django.core.wsgi import get_wsgi_application
Expand Down

0 comments on commit 08bafd1

Please sign in to comment.