django-manage: use django.conf.settings in _applist

This commit is contained in:
Daniel Hahler 2015-05-17 23:37:28 +02:00
parent aade0a773f
commit c70a89a626
1 changed files with 3 additions and 2 deletions

View File

@ -224,10 +224,11 @@ _managepy-commands() {
_applist() {
local line
local -a apps
_call_program help-command "python -c \"import os.path as op, re, settings, sys;\\
# NOTE: this could use "$_managepy_cmd diffsettings --all", but that's slower.
_call_program help-command "python -c \"import os.path as op, re, django.conf, sys;\\
bn=op.basename(op.abspath(op.curdir));[sys\\
.stdout.write(str(re.sub(r'^%s\.(.*?)$' %
bn, r'\1', i)) + '\n') for i in settings.\\
bn, r'\1', i)) + '\n') for i in django.conf.settings.\\
INSTALLED_APPS if re.match(r'^%s' % bn, i)]\"" \
| while read -A line; do apps=($line $apps) done
_values 'Application' $apps && ret=0