#22949: django-admin.py startproject required settings
-------------------------------------+-------------------------------------
     Reporter:  anonymous            |                    Owner:  aaugustin
         Type:  Bug                  |                   Status:  assigned
    Component:  Core (Management     |                  Version:  1.7-rc-1
  commands)                          |               Resolution:
     Severity:  Release blocker      |             Triage Stage:
     Keywords:  django-admin         |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by anonymous):

 No. In /sites/test_dj i don't have any contents, only symlink to django-
 admin.py
 But I confirm, then in virtualenv not have problem.
 Now try in standard place of django-admin.py in django tree. Same
 situation
 You may see output.

 bash-4.3# ls
 django-2to3.py  django-admin.py  profiling  unique-messages.py
 bash-4.3# git checkout master
 Already on 'master'
 bash-4.3# ./django-admin.py
 Traceback (most recent call last):
   File "./django-admin.py", line 5, in <module>
     management.execute_from_command_line()
   File "/usr/lib64/python2.7/site-
 packages/django/core/management/__init__.py", line 330, in
 execute_from_command_line
     utility.execute()
   File "/usr/lib64/python2.7/site-
 packages/django/core/management/__init__.py", line 304, in execute
     django.setup()
   File "/usr/lib64/python2.7/site-packages/django/__init__.py", line 20,
 in setup
     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
   File "/usr/lib64/python2.7/site-
 packages/django/django/conf/__init__.py", line 46, in __getattr__
     self._setup(name)
   File "/usr/lib64/python2.7/site-
 packages/django/django/conf/__init__.py", line 40, in _setup
     % (desc, ENVIRONMENT_VARIABLE))
 django.core.exceptions.ImproperlyConfigured: Requested setting
 LOGGING_CONFIG, but settings are not configured. You must either define
 the environment variable DJANGO_SETTINGS_MODULE or call
 settings.configure() before accessing settings.
 bash-4.3# git checkout 2e613ea5c52d4d12e071987178af18c0371d6e2f
 Note: checking out '2e613ea5c52d4d12e071987178af18c0371d6e2f'.

 You are in 'detached HEAD' state. You can look around, make experimental
 changes and commit them, and you can discard any commits you make in this
 state without impacting any branches by performing another checkout.

 If you want to create a new branch to retain commits you create, you may
 do so (now or later) by using -b with the checkout command again. Example:

   git checkout -b new_branch_name

 HEAD is now at 2e613ea... Fixed #22675 -- makemigrations --dry-run to
 output migrations to stdout.
 bash-4.3# ./django-admin.py
 Usage: django-admin.py subcommand [options] [args]

 Options:
   -v VERBOSITY, --verbosity=VERBOSITY
                         Verbosity level; 0=minimal output, 1=normal
 output,
                         2=verbose output, 3=very verbose output
   --settings=SETTINGS   The Python path to a settings module, e.g.
                         "myproject.settings.main". If this isn't provided,
 the
                         DJANGO_SETTINGS_MODULE environment variable will
 be
                         used.
   --pythonpath=PYTHONPATH
                         A directory to add to the Python path, e.g.
                         "/home/djangoprojects/myproject".
   --traceback           Raise on exception
   --no-color            Don't colorize the command output.
   --version             show program's version number and exit
   -h, --help            show this help message and exit

 Type 'django-admin.py help <subcommand>' for help on a specific
 subcommand.

 Available subcommands:

 [django]
     check
     compilemessages
     createcachetable
     dbshell
     diffsettings
     dumpdata
     flush
     inspectdb
     loaddata
     makemessages
     makemigrations
     migrate
     runfcgi
     runserver
     shell
     sql
     sqlall
     sqlclear
     sqlcustom
     sqldropindexes
     sqlflush
     sqlindexes
     sqlmigrate
     sqlsequencereset
     squashmigrations
     startapp
     startproject
     syncdb
     test
     testserver
     validate
 Note that only Django core commands are listed as settings are not
 properly configured (error: Requested setting INSTALLED_APPS, but settings
 are not configured. You must either define the environment variable
 DJANGO_SETTINGS_MODULE or call settings.configure() before accessing
 settings.).
 bash-4.3#

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22949#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b51bc0bf113fdecd6fd6afe7fa3bd1cc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to