Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
fc92c6b5
Kaydet (Commit)
fc92c6b5
authored
Eyl 29, 2016
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed unneeded no_settings_commands hardcoded list
Thanks Tim Graham for the review.
üst
79c91070
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
__init__.py
django/core/management/__init__.py
+0
-9
base.py
django/core/management/base.py
+6
-1
templates.py
django/core/management/templates.py
+2
-1
No files found.
django/core/management/__init__.py
Dosyayı görüntüle @
fc92c6b5
...
...
@@ -306,19 +306,10 @@ class ManagementUtility(object):
except
CommandError
:
pass
# Ignore any option errors at this point.
no_settings_commands
=
[
'help'
,
'version'
,
'--help'
,
'--version'
,
'-h'
,
'startapp'
,
'startproject'
,
'compilemessages'
,
]
try
:
settings
.
INSTALLED_APPS
except
ImproperlyConfigured
as
exc
:
self
.
settings_exception
=
exc
# A handful of built-in management commands work without settings.
# Load the default settings -- where INSTALLED_APPS is empty.
if
subcommand
in
no_settings_commands
:
settings
.
configure
()
if
settings
.
configured
:
# Start the auto-reloading dev server even if the code is broken.
...
...
django/core/management/base.py
Dosyayı görüntüle @
fc92c6b5
...
...
@@ -303,7 +303,12 @@ class BaseCommand(object):
self
.
stderr
.
write
(
'
%
s:
%
s'
%
(
e
.
__class__
.
__name__
,
e
))
sys
.
exit
(
1
)
finally
:
connections
.
close_all
()
try
:
connections
.
close_all
()
except
ImproperlyConfigured
:
# Ignore if connections aren't setup at this point (e.g. no
# configured settings).
pass
def
execute
(
self
,
*
args
,
**
options
):
"""
...
...
django/core/management/templates.py
Dosyayı görüntüle @
fc92c6b5
...
...
@@ -11,6 +11,7 @@ import tempfile
from
os
import
path
import
django
from
django.conf
import
settings
from
django.core.management.base
import
BaseCommand
,
CommandError
from
django.core.management.utils
import
handle_extensions
from
django.template
import
Context
,
Engine
...
...
@@ -119,9 +120,9 @@ class TemplateCommand(BaseCommand):
}),
autoescape
=
False
)
# Setup a stub settings environment for template rendering
from
django.conf
import
settings
if
not
settings
.
configured
:
settings
.
configure
()
django
.
setup
()
template_dir
=
self
.
handle_template
(
options
[
'template'
],
base_subdir
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment