|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/django/contrib/formtools/wizard/storage/ |
Upload File : |
from django.core.exceptions import ImproperlyConfigured
from django.utils.module_loading import import_by_path
from django.contrib.formtools.wizard.storage.base import BaseStorage
from django.contrib.formtools.wizard.storage.exceptions import (
MissingStorage, NoFileStorageConfigured)
def get_storage(path, *args, **kwargs):
try:
storage_class = import_by_path(path)
except ImproperlyConfigured as e:
raise MissingStorage('Error loading storage: %s' % e)
return storage_class(*args, **kwargs)