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
0fb11855
Kaydet (Commit)
0fb11855
authored
Ock 28, 2016
tarafından
Harry
Kaydeden (comit)
Tim Graham
Şub 01, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #26152 -- Documented how to avoid django.setup() deadlock in standalone scripts.
üst
ecd502cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
settings.txt
docs/topics/settings.txt
+11
-0
No files found.
docs/topics/settings.txt
Dosyayı görüntüle @
0fb11855
...
...
@@ -291,6 +291,17 @@ Note that calling ``django.setup()`` is only necessary if your code is truly
standalone. When invoked by your Web server, or through :doc:`django-admin
</ref/django-admin>`, Django will handle this for you.
.. admonition:: ``django.setup()`` may only be called once.
Therefore, avoid putting reusable application logic in standalone scripts
so that you have to import from the script elsewhere in your application.
If you can't avoid that, put the call to ``django.setup()`` inside an
``if`` block::
if __name__ == '__main__':
import django
django.setup()
.. seealso::
:doc:`The Settings Reference </ref/settings>`
...
...
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