Ticket #10497: storage-stat.2.diff
File storage-stat.2.diff, 874 bytes (added by , 16 years ago) |
---|
-
django/core/files/storage.py
116 116 """ 117 117 raise NotImplementedError() 118 118 119 def stat(self, name): 120 """ 121 Returns a os.stat like result. 122 """ 123 raise NotImplementedError() 124 119 125 class FileSystemStorage(Storage): 120 126 """ 121 127 Standard filesystem storage … … 212 218 raise ValueError("This file is not accessible via a URL.") 213 219 return urlparse.urljoin(self.base_url, name).replace('\\', '/') 214 220 221 def stat(self, name): 222 """ 223 Returns a os.stat like result. 224 """ 225 return os.stat(self.path(name)) 226 215 227 def get_storage_class(import_path): 216 228 try: 217 229 dot = import_path.rindex('.')