core.files.storage.Storage.get_valid_name()
  • References/Python/Django/API/File handling/File storage API

get_valid_name(name) [source] Returns a filename based on the name parameter

2025-01-10 15:47:30
core.files.storage.Storage.listdir()
  • References/Python/Django/API/File handling/File storage API

listdir(path) [source] Lists the contents of the specified path, returning a 2-tuple of lists;

2025-01-10 15:47:30
core.files.storage.FileSystemStorage.location
  • References/Python/Django/API/File handling/File storage API

location Absolute path to the directory that will hold the files. Defaults to the value of your MEDIA_ROOT setting

2025-01-10 15:47:30
core.files.storage.FileSystemStorage.base_url
  • References/Python/Django/API/File handling/File storage API

base_url URL that serves the files stored at this location. Defaults to the value of your MEDIA_URL setting.

2025-01-10 15:47:30
core.files.storage.Storage.open()
  • References/Python/Django/API/File handling/File storage API

open(name, mode='rb') [source] Opens the file given by name. Note that although

2025-01-10 15:47:30
core.files.storage.Storage.size()
  • References/Python/Django/API/File handling/File storage API

size(name) [source] Returns the total size, in bytes, of the file referenced by name

2025-01-10 15:47:30
core.files.storage.Storage.accessed_time()
  • References/Python/Django/API/File handling/File storage API

accessed_time(name) [source] Returns a naive datetime object containing the

2025-01-10 15:47:30
core.files.storage.Storage.generate_filename()
  • References/Python/Django/API/File handling/File storage API

generate_filename(filename) [source] New in Django

2025-01-10 15:47:30
core.files.storage.Storage.get_accessed_time()
  • References/Python/Django/API/File handling/File storage API

get_accessed_time(name) [source] New in Django

2025-01-10 15:47:30
core.files.storage.Storage.created_time()
  • References/Python/Django/API/File handling/File storage API

created_time(name) [source] Returns a naive datetime object containing the creation

2025-01-10 15:47:30