Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore TupleLoad Str Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str If BoolOpOr UnaryOpNot NameLoad UnaryOpNot Call NameLoad ListComp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assert CompareEq NameLoad Str BinOpMod Str NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr If CompareIs NameLoad NameLoad body Return NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr Return CompareIsNot NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Return Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad attr If CompareIs NameLoad NameLoad body Return Num orelse Return Call NameLoad SubscriptLoad NameLoad Index Num decorator_list decorator_list
N/A django.conf settings django.core.files File django.core.exceptions ImproperlyConfigured storages.compat urlparse BytesIO Storage N/A N/A N/A pyodbc N/A N/A N/A ImportError N/A N/A N/A ImproperlyConfigured Could not load pyodbc dependency.    
See https://github.com/mkleehammer/pyodbc N/A REQUIRED_FIELDS N/A db_table fname_column blob_column size_column base_url DatabaseStorage N/A Storage N/A N/A 
    Class DatabaseStorage provides storing files in the database. 
     __init__ N/A N/A self option N/A N/A settings DB_FILES N/A N/A Constructor. 
        
        Constructs object using dictionary either specified in contucotr or
in settings.DB_FILES. 
        
        @param option dictionary with 'db_table', 'fname_column',
'blob_column', 'size_column', 'base_url'  keys. 
        
        option['db_table']
            Table to work with.
        option['fname_column']
            Column in the 'db_table' containing filenames (filenames can
contain pathes). Values should be the same as where FileField keeps
filenames. 
            It is used to map filename to blob_column. In sql it's simply
used in where clause. 
        option['blob_column']
            Blob column (for example 'image' type), created manually in the
'db_table', used to store image.
        option['size_column']
            Column to store file size. Used for optimization of size()
method (another way is to open file and get size)
        option['base_url']
            Url prefix used with filenames. Should be mapped to the view,
that returns an image as result. 
         N/A N/A N/A option N/A N/A all N/A N/A field option N/A field REQUIRED_FIELDS N/A N/A N/A ValueError You didn't specify required options N/A N/A self db_table N/A option N/A db_table N/A N/A self fname_column N/A option N/A fname_column N/A N/A self blob_column N/A option N/A blob_column N/A N/A self size_column N/A option N/A size_column N/A N/A self base_url N/A option N/A base_url N/A N/A self DATABASE_ODBC_DRIVER N/A settings DATABASE_ODBC_DRIVER N/A N/A self DATABASE_NAME N/A settings DATABASE_NAME N/A N/A self DATABASE_USER N/A settings DATABASE_USER N/A N/A self DATABASE_PASSWORD N/A settings DATABASE_PASSWORD N/A N/A self DATABASE_HOST N/A settings DATABASE_HOST N/A N/A self connection N/A N/A pyodbc connect N/A DRIVER=%s;SERVER=%s;DATABASE=%s;UID=%s;PWD=%s N/A N/A self DATABASE_ODBC_DRIVER N/A self DATABASE_HOST N/A self DATABASE_NAME N/A self DATABASE_USER N/A self DATABASE_PASSWORD N/A N/A self cursor N/A N/A N/A self connection cursor N/A _open N/A N/A self name mode N/A rb N/A N/A Open a file from database. 
        
        @param name filename or relative path to file based on base_url. path should contain only "/", but not "". Apache sends pathes with "/".
        If there is no such file in the db, returs None
         N/A N/A mode rb N/A You've tried to open binary file without specifying binary mode! You specified: %s mode N/A row N/A N/A N/A N/A N/A self cursor execute N/A SELECT %s from %s where %s = '%s' N/A N/A self blob_column N/A self db_table N/A self fname_column name fetchone N/A N/A row None N/A N/A None N/A inMemFile N/A BytesIO N/A row N/A 0 N/A N/A inMemFile name name N/A N/A inMemFile mode mode N/A retFile N/A File inMemFile N/A retFile N/A _save N/A N/A self name content N/A N/A N/A Save 'content' as file named 'name'.
        
        @note '' in path will be converted to '/'. 
         N/A name N/A N/A name replace \ / N/A binary N/A N/A pyodbc Binary N/A N/A content read N/A size N/A len binary N/A N/A N/A self exists name N/A N/A N/A N/A N/A self cursor execute N/A UPDATE %s SET %s = ?, %s = ? WHERE %s = '%s' N/A N/A self db_table N/A self blob_column N/A self size_column N/A self fname_column name N/A binary size N/A N/A N/A N/A N/A self cursor execute N/A INSERT INTO %s VALUES(?, ?, ?) N/A self db_table N/A name binary size N/A N/A N/A N/A self connection commit N/A name N/A exists N/A N/A self name N/A N/A N/A row N/A N/A N/A N/A N/A self cursor execute N/A SELECT %s from %s where %s = '%s' N/A N/A self fname_column N/A self db_table N/A self fname_column name fetchone N/A N/A row None N/A get_available_name N/A N/A self name max_length N/A None N/A N/A name N/A delete N/A N/A self name N/A N/A N/A N/A N/A self exists name N/A N/A N/A N/A N/A self cursor execute N/A DELETE FROM %s WHERE %s = '%s' N/A N/A self db_table N/A self fname_column name N/A N/A N/A N/A self connection commit N/A url N/A N/A self name N/A N/A N/A N/A N/A self base_url None N/A N/A N/A ValueError This file is not accessible via a URL. N/A N/A N/A N/A N/A urlparse urljoin N/A self base_url name replace \ / N/A size N/A N/A self name N/A N/A N/A row N/A N/A N/A N/A N/A self cursor execute N/A SELECT %s from %s where %s = '%s' N/A N/A self size_column N/A self db_table N/A self fname_column name fetchone N/A N/A row None N/A N/A 0 N/A N/A N/A int N/A row N/A 0 N/A N/A