toolkit.models – Toolkit models¶
-
class
toolkit.models.models.CCEAuditModel(*args, **kwargs)¶ Abstract model with fields for the user and timestamp of a row’s creation and last update.
Note
- Inherits from CCEModel
- Requires django-cuser package to determine current user
Tags: django-cuser
-
class
toolkit.models.models.CCEModel(*args, **kwargs)¶ Abstract base model with permissions mixin.
-
class
toolkit.models.mixins.ModelPermissionsMixin¶ Defines the permissions methods that most models need,
Raises: NotImplementedError – if they have not been overridden. -
classmethod
can_create(user_obj)¶ CreateView needs permissions at class (table) level. We’ll try it at instance level for a while and see how it goes.
-
can_delete(user_obj)¶ DeleteView needs permissions at instance (row) level.
-
can_update(user_obj)¶ UpdateView needs permissions at instance (row) level.
-
can_view(user_obj)¶ DetailView needs permissions at instance (row) level.
-
classmethod
can_view_list(user_obj)¶ ListView needs permissions at class (table) level. We’ll try it at instance level for a while and see how it goes.
-
classmethod