Possible bug in runserver

16 views
Skip to first unread message

Matteo Sani

unread,
Nov 11, 2022, 1:38:44 PM11/11/22
to Django users
Hello,

I wanted to run Django runserver with custom settings defined in proj/mysettings.py. So I exported the env variable DJANGO_SETTINGS_MODULE to point to the custom settings file and then I ran manage.py runserver …

The printout was showing that Django was still using the default settings in proj/settings.py, it seems it is ignoring DJANGO_SETTINGS_MODULE.

Is it an intended behavior or a bug ?

What is the recommended way to do that ?

Below the commands I used to reproduce the issue:

$ export DJANGO_SETTINGS_MODULE=”proj.mysettings”
$ python manage.py runserver 0.0.0.0:7474
November 11, 2022 - 10:22:48
Django version 3.2.6, using settings 'proj.settings'
Starting development server at http://0.0.0.0:7474/
Quit the server with CONTROL-C.

Best regards,
Matteo

Mike Dewhirst

unread,
Nov 11, 2022, 7:04:09 PM11/11/22
to django...@googlegroups.com
Try using the inline argument --settings when executing runserver



--
(Unsigned mail from my phone)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/821066be-0877-4ab1-a98f-c6a18dd62931n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages