#22949: django-admin.py startproject required settings
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: nobody
Type: Bug | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | 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):
Problem exist after commit 4865326f2200aa1c480526feef5428cf780ab3c6
commit 4865326f2200aa1c480526feef5428cf780ab3c6
Author: Aymeric Augustin <[email protected]>
Date: Tue May 27 18:57:53 2014 +0200
example:
bash-4.3# git checkout 4865326f2200aa1c480526feef5428cf780ab3c6
HEAD is now at 4865326... Fixed #22699 -- Configure default settings in
some management commands.
bash-4.3#
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 432, in
execute_from_command_line
utility.execute()
File "/usr/lib64/python2.7/site-
packages/django/core/management/__init__.py", line 401, 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.
Previous commit- all normal.
commit 2e613ea5c52d4d12e071987178af18c0371d6e2f
Author: Moayad Mardini <[email protected]>
Date: Mon May 26 23:09:17 2014 +0300
Example:
bash-4.3#
bash-4.3# git checkout 2e613ea5c52d4d12e071987178af18c0371d6e2f
Previous HEAD position was 4865326... Fixed #22699 -- Configure default
settings in some management commands.
HEAD is now at 2e613ea... Fixed #22675 -- makemigrations --dry-run to
output migrations to stdout.
bash-4.3#
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#
Thank you very much for your job. Django is great software.
--
Ticket URL: <https://code.djangoproject.com/ticket/22949#comment:8>
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.9c72218fa6c8cd64394d23138f1a6b4a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.