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
072e25ee
Kaydet (Commit)
072e25ee
authored
Ara 10, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved imports to the top of the defaultfilters module.
üst
a2814846
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
defaultfilters.py
django/template/defaultfilters.py
+6
-7
No files found.
django/template/defaultfilters.py
Dosyayı görüntüle @
072e25ee
...
...
@@ -13,14 +13,15 @@ from django.utils import formats
from
django.utils.dateformat
import
format
,
time_format
from
django.utils.encoding
import
force_text
,
iri_to_uri
from
django.utils.html
import
(
conditional_escape
,
escapejs
,
fix_ampersands
,
escape
,
urlize
as
urlize_impl
,
linebreaks
,
strip_tags
,
avoid_wrapping
)
escape
,
urlize
as
_urlize
,
linebreaks
,
strip_tags
,
avoid_wrapping
,
remove_tags
)
from
django.utils.http
import
urlquote
from
django.utils.text
import
Truncator
,
wrap
,
phone2numeric
from
django.utils.safestring
import
mark_safe
,
SafeData
,
mark_for_escaping
from
django.utils
import
six
from
django.utils.timesince
import
timesince
,
timeuntil
from
django.utils.translation
import
ugettext
,
ungettext
from
django.utils.text
import
normalize_newlines
from
django.utils.text
import
normalize_newlines
,
slugify
as
_slugify
register
=
Library
()
...
...
@@ -235,8 +236,7 @@ def slugify(value):
underscores) and converts spaces to hyphens. Also strips leading and
trailing whitespace.
"""
from
django.utils.text
import
slugify
return
slugify
(
value
)
return
_slugify
(
value
)
@register.filter
(
is_safe
=
True
)
...
...
@@ -341,7 +341,7 @@ def urlencode(value, safe=None):
@stringfilter
def
urlize
(
value
,
autoescape
=
None
):
"""Converts URLs in plain text into clickable links."""
return
mark_safe
(
urlize_impl
(
value
,
nofollow
=
True
,
autoescape
=
autoescape
))
return
mark_safe
(
_urlize
(
value
,
nofollow
=
True
,
autoescape
=
autoescape
))
@register.filter
(
is_safe
=
True
,
needs_autoescape
=
True
)
...
...
@@ -353,7 +353,7 @@ def urlizetrunc(value, limit, autoescape=None):
Argument: Length to truncate URLs to.
"""
return
mark_safe
(
urlize_impl
(
value
,
trim_url_limit
=
int
(
limit
),
nofollow
=
True
,
return
mark_safe
(
_urlize
(
value
,
trim_url_limit
=
int
(
limit
),
nofollow
=
True
,
autoescape
=
autoescape
))
...
...
@@ -490,7 +490,6 @@ def safeseq(value):
@stringfilter
def
removetags
(
value
,
tags
):
"""Removes a space separated list of [X]HTML tags from the output."""
from
django.utils.html
import
remove_tags
return
remove_tags
(
value
,
tags
)
...
...
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