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
27d16a3c
Kaydet (Commit)
27d16a3c
authored
Agu 15, 2012
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[py3] Fixed middleware_exceptions tests.
üst
24de85c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
base.py
django/core/handlers/base.py
+5
-4
No files found.
django/core/handlers/base.py
Dosyayı görüntüle @
27d16a3c
from
__future__
import
unicode_literals
import
sys
import
types
from
django
import
http
from
django.core
import
signals
...
...
@@ -125,10 +126,10 @@ class BaseHandler(object):
# Complain if the view returned None (a common error).
if
response
is
None
:
try
:
view_name
=
callback
.
func_name
# If it's a function
e
xcept
AttributeError
:
view_name
=
callback
.
__class__
.
__name__
+
'.__call__'
# If it's a class
if
isinstance
(
callback
,
types
.
FunctionType
):
# FBV
view_name
=
callback
.
__name__
e
lse
:
# CBV
view_name
=
callback
.
__class__
.
__name__
+
'.__call__'
raise
ValueError
(
"The view
%
s.
%
s didn't return an HttpResponse object."
%
(
callback
.
__module__
,
view_name
))
# If the response supports deferred rendering, apply template
...
...
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