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
813ded77
Kaydet (Commit)
813ded77
authored
May 19, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #2682 from alimony/welcome_page_local_02
Fixed #22635 -- Make "It worked!" page localizable
üst
c7a4ae94
5f24cf97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
debug.py
django/views/debug.py
+17
-8
No files found.
django/views/debug.py
Dosyayı görüntüle @
813ded77
...
@@ -16,6 +16,7 @@ from django.utils.html import escape
...
@@ -16,6 +16,7 @@ from django.utils.html import escape
from
django.utils.encoding
import
force_bytes
,
smart_text
from
django.utils.encoding
import
force_bytes
,
smart_text
from
django.utils.module_loading
import
import_string
from
django.utils.module_loading
import
import_string
from
django.utils
import
six
from
django.utils
import
six
from
django.utils.translation
import
ugettext
as
_
HIDDEN_SETTINGS
=
re
.
compile
(
'API|TOKEN|KEY|SECRET|PASS|SIGNATURE'
)
HIDDEN_SETTINGS
=
re
.
compile
(
'API|TOKEN|KEY|SECRET|PASS|SIGNATURE'
)
...
@@ -511,7 +512,17 @@ def technical_404_response(request, exception):
...
@@ -511,7 +512,17 @@ def technical_404_response(request, exception):
def
default_urlconf
(
request
):
def
default_urlconf
(
request
):
"Create an empty URLconf 404 error response."
"Create an empty URLconf 404 error response."
t
=
Template
(
DEFAULT_URLCONF_TEMPLATE
,
name
=
'Default URLconf template'
)
t
=
Template
(
DEFAULT_URLCONF_TEMPLATE
,
name
=
'Default URLconf template'
)
c
=
Context
({})
c
=
Context
({
"title"
:
_
(
"Welcome to Django"
),
"heading"
:
_
(
"It worked!"
),
"subheading"
:
_
(
"Congratulations on your first Django-powered page."
),
"instructions"
:
_
(
"Of course, you haven't actually done any work yet. "
"Next, start your first app by running <code>python manage.py startapp [app_label]</code>."
),
"explanation"
:
_
(
"You're seeing this message because you have <code>DEBUG = True</code> in your "
"Django settings file and you haven't configured any URLs. Get to work!"
),
})
return
HttpResponse
(
t
.
render
(
c
),
content_type
=
'text/html'
)
return
HttpResponse
(
t
.
render
(
c
),
content_type
=
'text/html'
)
#
#
...
@@ -1121,7 +1132,7 @@ DEFAULT_URLCONF_TEMPLATE = """
...
@@ -1121,7 +1132,7 @@ DEFAULT_URLCONF_TEMPLATE = """
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en"><head>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="robots" content="NONE,NOARCHIVE"><title>
Welcome to Django
</title>
<meta name="robots" content="NONE,NOARCHIVE"><title>
{{ title }}
</title>
<style type="text/css">
<style type="text/css">
html * { padding:0; margin:0; }
html * { padding:0; margin:0; }
body * { padding:10px 20px; }
body * { padding:10px 20px; }
...
@@ -1147,21 +1158,19 @@ DEFAULT_URLCONF_TEMPLATE = """
...
@@ -1147,21 +1158,19 @@ DEFAULT_URLCONF_TEMPLATE = """
<body>
<body>
<div id="summary">
<div id="summary">
<h1>
It worked!
</h1>
<h1>
{{ heading }}
</h1>
<h2>
Congratulations on your first Django-powered page.
</h2>
<h2>
{{ subheading }}
</h2>
</div>
</div>
<div id="instructions">
<div id="instructions">
<p>
<p>
Of course, you haven't actually done any work yet.
{{ instructions }}
Next, start your first app by running <code>python manage.py startapp [app_label]</code>.
</p>
</p>
</div>
</div>
<div id="explanation">
<div id="explanation">
<p>
<p>
You're seeing this message because you have <code>DEBUG = True</code> in your
{{ explanation }}
Django settings file and you haven't configured any URLs. Get to work!
</p>
</p>
</div>
</div>
</body></html>
</body></html>
...
...
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