TEXT   285
class MyStaticFilesStorage
Guest on 2nd December 2024 07:16:02 AM


  1. from django.contrib.staticfiles import storage
  2.  
  3.     class MyStaticFilesStorage(storage.StaticFilesStorage):
  4.         def __init__(self, *args, **kwargs):
  5.             kwargs['file_permissions_mode'] = 0o640
  6.             kwargs['directory_permissions_mode'] = 0o760
  7.             super(CustomStaticFilesStorage, self).__init__(*args, **kwargs)

Raw Paste

Login or Register to edit or fork this paste. It's free.