Bug 1094793

Summary: [abrt] python-django: __init__.py:47:_setup: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.
Product: [Fedora] Fedora Reporter: hlx98007
Component: python-djangoAssignee: Matthias Runge <mrunge>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: bkabrda, jdornak, mhroncok, michel, mrunge
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/5a042e8bd8cc9d5d2d4a70af993bb5204ec711fe
Whiteboard: abrt_hash:dd441d9dadb567ad9c2b9c14de4cb4c05e312698
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-06 18:41:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description hlx98007 2014-05-06 13:50:14 UTC
Description of problem:
django-admin startapp mysite
cd mysite
django-admin runserver

booom

Version-Release number of selected component:
python-django-1.6.3-1.fc20

Additional info:
reporter:       libreport-2.2.2
cmdline:        /usr/bin/python /usr/bin/django-admin runserver
executable:     /usr/bin/django-admin
kernel:         3.14.2-200.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
__init__.py:47:_setup: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.

Traceback (most recent call last):
  File "/usr/bin/django-admin", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 279, in execute
    saved_locale = translation.get_language()
  File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 154, in get_language
    return _trans.get_language()
  File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 52, in __getattr__
    if settings.USE_I18N:
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 47, in _setup
    % (desc, ENVIRONMENT_VARIABLE))
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.

Local variables in innermost frame:
self: <django.conf.LazySettings object at 0x26eb390>
name: 'USE_I18N'
desc: 'setting USE_I18N'

Comment 1 hlx98007 2014-05-06 13:50:19 UTC
Created attachment 892883 [details]
File: backtrace

Comment 2 hlx98007 2014-05-06 13:50:21 UTC
Created attachment 892884 [details]
File: environ

Comment 3 Matthias Runge 2014-05-06 18:37:40 UTC
*** Bug 1094797 has been marked as a duplicate of this bug. ***

Comment 4 Matthias Runge 2014-05-06 18:41:42 UTC
You need to create a config to use runserver.

Most probably you want to use django-admin startproject and then 
django-admin startapp.

https://docs.djangoproject.com/en/1.6/ref/django-admin/#startproject-projectname-destination