Python django.core.files.storage.default_storage._wrapped() Examples

The following are 13 code examples of django.core.files.storage.default_storage._wrapped(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module django.core.files.storage.default_storage , or try the search function .
Example #1
Source File: signals.py    From GTDWeb with GNU General Public License v2.0 5 votes vote down vote up
def file_storage_changed(**kwargs):
    file_storage_settings = {
        'DEFAULT_FILE_STORAGE',
        'FILE_UPLOAD_DIRECTORY_PERMISSIONS',
        'FILE_UPLOAD_PERMISSIONS',
        'MEDIA_ROOT',
        'MEDIA_URL',
    }

    if kwargs['setting'] in file_storage_settings:
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #2
Source File: signals.py    From GTDWeb with GNU General Public License v2.0 5 votes vote down vote up
def static_storage_changed(**kwargs):
    if kwargs['setting'] in {
        'STATICFILES_STORAGE',
        'STATIC_ROOT',
        'STATIC_URL',
    }:
        from django.contrib.staticfiles.storage import staticfiles_storage
        staticfiles_storage._wrapped = empty 
Example #3
Source File: signals.py    From bioforum with MIT License 5 votes vote down vote up
def file_storage_changed(**kwargs):
    if kwargs['setting'] == 'DEFAULT_FILE_STORAGE':
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #4
Source File: signals.py    From bioforum with MIT License 5 votes vote down vote up
def static_storage_changed(**kwargs):
    if kwargs['setting'] in {
        'STATICFILES_STORAGE',
        'STATIC_ROOT',
        'STATIC_URL',
    }:
        from django.contrib.staticfiles.storage import staticfiles_storage
        staticfiles_storage._wrapped = empty 
Example #5
Source File: signals.py    From Hands-On-Application-Development-with-PyCharm with MIT License 5 votes vote down vote up
def file_storage_changed(**kwargs):
    if kwargs['setting'] == 'DEFAULT_FILE_STORAGE':
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #6
Source File: signals.py    From Hands-On-Application-Development-with-PyCharm with MIT License 5 votes vote down vote up
def static_storage_changed(**kwargs):
    if kwargs['setting'] in {
        'STATICFILES_STORAGE',
        'STATIC_ROOT',
        'STATIC_URL',
    }:
        from django.contrib.staticfiles.storage import staticfiles_storage
        staticfiles_storage._wrapped = empty 
Example #7
Source File: signals.py    From python with Apache License 2.0 5 votes vote down vote up
def file_storage_changed(**kwargs):
    if kwargs['setting'] == 'DEFAULT_FILE_STORAGE':
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #8
Source File: signals.py    From python with Apache License 2.0 5 votes vote down vote up
def static_storage_changed(**kwargs):
    if kwargs['setting'] in {
        'STATICFILES_STORAGE',
        'STATIC_ROOT',
        'STATIC_URL',
    }:
        from django.contrib.staticfiles.storage import staticfiles_storage
        staticfiles_storage._wrapped = empty 
Example #9
Source File: signals.py    From luscan-devel with GNU General Public License v2.0 5 votes vote down vote up
def file_storage_changed(**kwargs):
    if kwargs['setting'] in ('MEDIA_ROOT', 'DEFAULT_FILE_STORAGE'):
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #10
Source File: signals.py    From openhgsenti with Apache License 2.0 5 votes vote down vote up
def file_storage_changed(**kwargs):
    file_storage_settings = {
        'DEFAULT_FILE_STORAGE',
        'FILE_UPLOAD_DIRECTORY_PERMISSIONS',
        'FILE_UPLOAD_PERMISSIONS',
        'MEDIA_ROOT',
        'MEDIA_URL',
    }

    if kwargs['setting'] in file_storage_settings:
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #11
Source File: signals.py    From openhgsenti with Apache License 2.0 5 votes vote down vote up
def static_storage_changed(**kwargs):
    if kwargs['setting'] in {
        'STATICFILES_STORAGE',
        'STATIC_ROOT',
        'STATIC_URL',
    }:
        from django.contrib.staticfiles.storage import staticfiles_storage
        staticfiles_storage._wrapped = empty 
Example #12
Source File: signals.py    From python2017 with MIT License 5 votes vote down vote up
def file_storage_changed(**kwargs):
    if kwargs['setting'] == 'DEFAULT_FILE_STORAGE':
        from django.core.files.storage import default_storage
        default_storage._wrapped = empty 
Example #13
Source File: signals.py    From python2017 with MIT License 5 votes vote down vote up
def static_storage_changed(**kwargs):
    if kwargs['setting'] in {
        'STATICFILES_STORAGE',
        'STATIC_ROOT',
        'STATIC_URL',
    }:
        from django.contrib.staticfiles.storage import staticfiles_storage
        staticfiles_storage._wrapped = empty