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
1eca0e95
Kaydet (Commit)
1eca0e95
authored
Kas 28, 2014
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Added Django template backend.
üst
44de7218
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
0 deletions
+53
-0
base.py
django/template/backends/base.py
+3
-0
django.py
django/template/backends/django.py
+41
-0
dummy.py
django/template/backends/dummy.py
+3
-0
jinja2.py
django/template/backends/jinja2.py
+3
-0
utils.py
django/template/backends/utils.py
+3
-0
No files found.
django/template/backends/base.py
Dosyayı görüntüle @
1eca0e95
# Since this package contains a "django" module, this is required on Python 2.
from
__future__
import
absolute_import
from
django.core.exceptions
import
(
from
django.core.exceptions
import
(
ImproperlyConfigured
,
SuspiciousFileOperation
)
ImproperlyConfigured
,
SuspiciousFileOperation
)
from
django.template.utils
import
get_app_template_dirs
from
django.template.utils
import
get_app_template_dirs
...
...
django/template/backends/django.py
0 → 100644
Dosyayı görüntüle @
1eca0e95
# Since this package contains a "django" module, this is required on Python 2.
from
__future__
import
absolute_import
from
django.conf
import
settings
from
django.template.context
import
Context
,
RequestContext
from
django.template.engine
import
Engine
from
.base
import
BaseEngine
class
DjangoTemplates
(
BaseEngine
):
app_dirname
=
'templates'
def
__init__
(
self
,
params
):
params
=
params
.
copy
()
options
=
params
.
pop
(
'OPTIONS'
)
.
copy
()
options
.
setdefault
(
'debug'
,
settings
.
TEMPLATE_DEBUG
)
options
.
setdefault
(
'file_charset'
,
settings
.
FILE_CHARSET
)
super
(
DjangoTemplates
,
self
)
.
__init__
(
params
)
self
.
engine
=
Engine
(
self
.
dirs
,
self
.
app_dirs
,
**
options
)
def
from_string
(
self
,
template_code
):
return
Template
(
self
.
engine
.
from_string
(
template_code
))
def
get_template
(
self
,
template_name
):
return
Template
(
self
.
engine
.
get_template
(
template_name
))
class
Template
(
object
):
def
__init__
(
self
,
template
):
self
.
template
=
template
def
render
(
self
,
context
=
None
,
request
=
None
):
if
request
is
None
:
context
=
Context
(
context
)
else
:
context
=
RequestContext
(
request
,
context
)
return
self
.
template
.
render
(
context
)
django/template/backends/dummy.py
Dosyayı görüntüle @
1eca0e95
# Since this package contains a "django" module, this is required on Python 2.
from
__future__
import
absolute_import
import
io
import
io
import
string
import
string
...
...
django/template/backends/jinja2.py
Dosyayı görüntüle @
1eca0e95
# Since this package contains a "django" module, this is required on Python 2.
from
__future__
import
absolute_import
import
sys
import
sys
from
django.conf
import
settings
from
django.conf
import
settings
...
...
django/template/backends/utils.py
Dosyayı görüntüle @
1eca0e95
# Since this package contains a "django" module, this is required on Python 2.
from
__future__
import
absolute_import
from
django.middleware.csrf
import
get_token
from
django.middleware.csrf
import
get_token
from
django.utils.functional
import
lazy
from
django.utils.functional
import
lazy
from
django.utils.html
import
format_html
from
django.utils.html
import
format_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