File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from os .path import join , getatime , getctime , getmtime
2- from datetime import datetime
2+ from datetime import datetime , timezone
33from io import StringIO
44
55from django import VERSION as DJANGO_VERSION
1414 def datetime_from_timestamp (ts ):
1515 # src: django.core.files.storage.FileSystemStorage._datetime_from_timestamp
1616 if settings .USE_TZ :
17- return datetime .utcfromtimestamp (ts ).replace (tzinfo = datetime . timezone .utc )
17+ return datetime .utcfromtimestamp (ts ).replace (tzinfo = timezone .utc )
1818 return datetime .fromtimestamp (ts )
1919else :
2020 datetime_from_timestamp = datetime .fromtimestamp
@@ -23,7 +23,7 @@ def datetime_from_timestamp(ts):
2323class VirtualStorage (Storage ):
2424 def __init__ (self ):
2525 map_ = settings .RENDERED_STATIC_FILES
26- # RODO : raise configuration error
26+ # TODO : raise configuration error
2727 if isinstance (map_ , dict ):
2828 map_ = map_ .items ()
2929 self ._map = {k : (v [0 ] if isinstance (v , (list , tuple )) else v ) for k , v in map_ }
You can’t perform that action at this time.
0 commit comments