Views
CanCreateMixin
¶
Bases: View
Protect any child view that would create an object.
Raises:
Type | Description |
---|---|
PermissionDenied
|
If the user has not the necessary permission to create the object of the view. |
CanEditMixin
¶
Bases: GenericContentPermissionMixinBuilder
Ensure the user has permission to edit this view's object.
Raises:
Type | Description |
---|---|
PermissionDenied
|
if the user cannot edit this view's object. |
CanEditPropMixin
¶
Bases: GenericContentPermissionMixinBuilder
Ensure the user has owner permissions on the child view object.
In other word, you can make a view with this view as parent,
and it will be retricted to the users that are in the
object's owner_group or that pass the obj.can_be_viewed_by
test.
Raises:
Type | Description |
---|---|
PermissionDenied
|
If the user cannot see the object |
CanViewMixin
¶
Bases: GenericContentPermissionMixinBuilder
Ensure the user has permission to view this view's object.
Raises:
Type | Description |
---|---|
PermissionDenied
|
if the user cannot edit this view's object. |
Forum
¶
Bases: Model
The Forum class, made as a tree to allow nice tidy organization.
owner_club allows club members to moderate there own topics edit_groups allows to put any group as a forum admin view_groups allows some groups to view a forum
ForumMessage
¶
Bases: Model
A message in the forum (thx Cpt. Obvious.).
ForumMessageMeta
¶
Bases: Model
ForumTopic
¶
Bases: Model
ForumSearchView
¶
Bases: ListView
ForumMainView
¶
Bases: ListView
ForumMarkAllAsRead
¶
Bases: RedirectView
ForumFavoriteTopics
¶
Bases: ListView
ForumLastUnread
¶
Bases: ListView
ForumNameField
¶
Bases: ModelChoiceField
ForumForm
¶
Bases: ModelForm
ForumCreateView
¶
Bases: CanCreateMixin
, CreateView
ForumEditForm
¶
Bases: ForumForm
ForumEditView
¶
Bases: CanEditPropMixin
, UpdateView
ForumDeleteView
¶
Bases: CanEditPropMixin
, DeleteView
ForumDetailView
¶
Bases: CanViewMixin
, DetailView
TopicForm
¶
Bases: ModelForm
ForumTopicCreateView
¶
Bases: CanCreateMixin
, CreateView
ForumTopicEditView
¶
Bases: CanEditMixin
, UpdateView
ForumTopicSubscribeView
¶
Bases: LoginRequiredMixin
, CanViewMixin
, SingleObjectMixin
, RedirectView
ForumTopicDetailView
¶
Bases: CanViewMixin
, DetailView
ForumMessageView
¶
Bases: SingleObjectMixin
, RedirectView
ForumMessageEditView
¶
Bases: CanEditMixin
, UpdateView
ForumMessageDeleteView
¶
Bases: SingleObjectMixin
, RedirectView
ForumMessageUndeleteView
¶
Bases: SingleObjectMixin
, RedirectView
ForumMessageCreateView
¶
Bases: CanCreateMixin
, CreateView
can_view(obj, user)
¶
Can the user see the object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj
|
Any
|
Object to test for permission |
required |
user
|
User
|
core.models.User to test permissions against |
required |
Returns:
Type | Description |
---|---|
bool
|
True if user is authorized to see object else False |
Examples: