genui.utils package
Subpackages
- genui.utils.extensions package
- Subpackages
- genui.utils.extensions.tasks package
- Subpackages
- Submodules
- genui.utils.extensions.tasks.admin module
- genui.utils.extensions.tasks.apps module
- genui.utils.extensions.tasks.genuisetup module
- genui.utils.extensions.tasks.models module
- genui.utils.extensions.tasks.progress module
- genui.utils.extensions.tasks.serializers module
- genui.utils.extensions.tasks.tasks module
- genui.utils.extensions.tasks.tests module
- genui.utils.extensions.tasks.urls module
- genui.utils.extensions.tasks.utils module
- genui.utils.extensions.tasks.views module
- Module contents
- genui.utils.extensions.tasks package
- Module contents
- Subpackages
- genui.utils.migrations package
Submodules
genui.utils.admin module
genui.utils.apps module
genui.utils.exceptions module
exceptions
Created by: Martin Sicho On: 7/23/20, 10:08 AM
- exception genui.utils.exceptions.GenUIException(original, *args, **kwargs)[source]
Bases:
GenUIExceptionMixIn
,Exception
- exception genui.utils.exceptions.GenUIWarning(original, *args, **kwargs)[source]
Bases:
GenUIExceptionMixIn
,Warning
genui.utils.genuisetup module
genuisetup
Created by: Martin Sicho On: 4/28/20, 4:33 PM
genui.utils.gpu module
gpu
Created by: Martin Sicho On: 6/2/20, 9:11 AM
genui.utils.init module
init
Created by: Martin Sicho On: 4/30/20, 7:16 PM
genui.utils.inspection module
inspection
Created by: Martin Sicho On: 4/30/20, 8:55 AM
- genui.utils.inspection.findSubclassByID(base, module, id_attr: str, id_attr_val: str)[source]
Function to fetch a given class from a certain module. It is identified by both its base class and a value of a specific identifying attribute of the class.
- Parameters
base – The base class of the class we are looking for.
module – Module containing the class of interest.
id_attr – The name of the identifying attribute on the class.
id_attr_val – The value of the searched attribute.
- Returns
- genui.utils.inspection.getSubclasses(cls)[source]
Fetch all existing subclasses of a class.
- Parameters
cls –
- Returns
genui.utils.models module
models
Created by: Martin Sicho On: 1/12/20, 3:16 PM
- genui.utils.models.NON_POLYMORPHIC_CASCADE(collector, field, sub_objs, using)[source]
This is a special cascade implementation to fix some delete errors when cascading polymorphic models.
See: https://github.com/django-polymorphic/django-polymorphic/issues/229#issuecomment-398434412
- Parameters
collector –
field –
sub_objs –
using –
- Returns
- class genui.utils.models.OverwriteStorage(*args, **kwargs)[source]
Bases:
FileSystemStorage
- get_available_name(name, **kwargs)[source]
Returns a filename that’s free on the target storage system, and available for new content to be written to.
Found at http://djangosnippets.org/snippets/976/
This file storage solves overwrite on upload problem. Another proposed solution was to override the save method on the model like so (from https://code.djangoproject.com/ticket/11663):
genui.utils.pagination module
pagination
Created by: Martin Sicho On: 5/6/20, 10:55 AM
genui.utils.serializers module
serializers
Created by: Martin Sicho On: 12/22/19, 6:26 PM
genui.utils.tests module
genui.utils.urls module
urls
Created by: Martin Sicho On: 5/3/20, 5:34 PM