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
5d428908
Kaydet (Commit)
5d428908
authored
Haz 10, 2015
tarafından
Markus Holtermann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24950 -- Added unicode_literals to models.py in app template
Thanks Tim Graham for the patch
üst
339c01fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
models.py
django/conf/app_template/models.py
+1
-1
templates.py
django/core/management/templates.py
+2
-1
tests.py
tests/admin_scripts/tests.py
+8
-1
No files found.
django/conf/app_template/models.py
Dosyayı görüntüle @
5d428908
from
django.db
import
models
{{
unicode_literals
}}
from
django.db
import
models
# Create your models here.
django/core/management/templates.py
Dosyayı görüntüle @
5d428908
...
...
@@ -14,7 +14,7 @@ import django
from
django.core.management.base
import
BaseCommand
,
CommandError
from
django.core.management.utils
import
handle_extensions
from
django.template
import
Context
,
Engine
from
django.utils
import
archive
from
django.utils
import
archive
,
six
from
django.utils.six.moves.urllib.request
import
urlretrieve
from
django.utils.version
import
get_docs_version
...
...
@@ -104,6 +104,7 @@ class TemplateCommand(BaseCommand):
base_directory
:
top_dir
,
'docs_version'
:
get_docs_version
(),
'django_version'
:
django
.
__version__
,
'unicode_literals'
:
''
if
six
.
PY3
else
'from __future__ import unicode_literals
\n\n
'
,
}),
autoescape
=
False
)
# Setup a stub settings environment for template rendering
...
...
tests/admin_scripts/tests.py
Dosyayı görüntüle @
5d428908
...
...
@@ -31,7 +31,7 @@ from django.test import (
from
django.test.runner
import
DiscoverRunner
from
django.utils._os
import
npath
,
upath
from
django.utils.encoding
import
force_text
from
django.utils.six
import
StringIO
from
django.utils.six
import
PY3
,
StringIO
test_dir
=
os
.
path
.
realpath
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
'test_project'
))
if
not
os
.
path
.
exists
(
test_dir
):
...
...
@@ -592,6 +592,13 @@ class DjangoAdminSettingsDirectory(AdminScriptTestCase):
self
.
addCleanup
(
shutil
.
rmtree
,
app_path
)
self
.
assertNoOutput
(
err
)
self
.
assertTrue
(
os
.
path
.
exists
(
app_path
))
if
not
PY3
:
with
open
(
os
.
path
.
join
(
app_path
,
'models.py'
),
'r'
)
as
fp
:
content
=
fp
.
read
()
self
.
assertIn
(
"from __future__ import unicode_literals
\n
"
,
content
,
)
def
test_setup_environ_custom_template
(
self
):
"directory: startapp creates the correct directory with a custom 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