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
4ab071f4
Kaydet (Commit)
4ab071f4
authored
Eki 05, 2018
tarafından
Jon Dufresne
Kaydeden (comit)
Tim Graham
Eki 05, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27795 -- Removed force_bytes() usage in contrib/staticfiles/storage.py.
üst
b0b4aac5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
storage.py
django/contrib/staticfiles/storage.py
+2
-3
No files found.
django/contrib/staticfiles/storage.py
Dosyayı görüntüle @
4ab071f4
...
...
@@ -14,7 +14,6 @@ from django.core.cache import (
from
django.core.exceptions
import
ImproperlyConfigured
from
django.core.files.base
import
ContentFile
from
django.core.files.storage
import
FileSystemStorage
,
get_storage_class
from
django.utils.encoding
import
force_bytes
from
django.utils.functional
import
LazyObject
...
...
@@ -296,7 +295,7 @@ class HashedFilesMixin:
if
hashed_file_exists
:
self
.
delete
(
hashed_name
)
# then save the processed result
content_file
=
ContentFile
(
force_bytes
(
content
))
content_file
=
ContentFile
(
content
.
encode
(
))
# Save intermediate file for reference
saved_name
=
self
.
_save
(
hashed_name
,
content_file
)
hashed_name
=
self
.
hashed_name
(
name
,
content_file
)
...
...
@@ -466,7 +465,7 @@ class CachedFilesMixin(HashedFilesMixin):
self
.
hashed_files
=
_MappingCache
(
default_cache
)
def
hash_key
(
self
,
name
):
key
=
hashlib
.
md5
(
force_bytes
(
self
.
clean_name
(
name
)
))
.
hexdigest
()
key
=
hashlib
.
md5
(
self
.
clean_name
(
name
)
.
encode
(
))
.
hexdigest
()
return
'staticfiles:
%
s'
%
key
...
...
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