Re: ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

4,222 views
Skip to first unread message

Tom Evans

unread,
Apr 25, 2013, 10:22:16 AM4/25/13
to django...@googlegroups.com
On Thu, Apr 25, 2013 at 2:56 PM, Iftikhar Ali <iftikh...@gmail.com> wrote:
> when i am running the project it is running perfectly fine but when i am
> trying to open django-admin.py shell the error:

Don;t use django-admin to launch the shell, only use django-admin to
create projects¹. Once you have created your project using
django-admin.py, use the manage.py script it created inside your
project to interact in any with it - creating apps, running syncdb,
accessing the project shell.

See the docs here:

https://docs.djangoproject.com/en/1.5/ref/django-admin/#django-admin-py-and-manage-py

The reason you want to use manage.py over django-admin,py is that
manage.py can usually find your settings automatically - it
automatically sets the environment variable DJANGO_SETTINGS_MODULE to
the correct value.

Cheers

Tom

¹ Or standalone apps. For apps within the project, you use manage.py
startapp, like everything else in the project.

Iftikhar Ali

unread,
Apr 26, 2013, 12:16:13 AM4/26/13
to django...@googlegroups.com, teva...@googlemail.com

but while testing and pychecker i am getting this error how should i configure DJANGO_SETTINGS_MODULE....

hjwp

unread,
Nov 2, 2013, 1:26:15 PM11/2/13
to django...@googlegroups.com, teva...@googlemail.com
Weirdly I'm getting this error when I 'am' running manage.py.  I'm doing something slightly weird, in that I'm using Popen from inside another python process to run python manage.py.  Still, it worked a few weeks back and just started happening.  Any tips on where to look to debug it?
Reply all
Reply to author
Forward
0 new messages