Forum polls¶
The forum_polls
application handles all the polls that can be created in forum topics. It
provides forms and tools for creating polls and for voting in forum polls.
Abstract models¶
Forum polls abstract models¶
This module defines abstract models provided by the forum_polls
application.
-
class
machina.apps.forum_conversation.forum_polls.abstract_models.
AbstractTopicPoll
(*args, **kwargs)¶ Bases:
machina.models.abstract_models.DatedModel
Represents a poll embedded in a forum topic.
-
votes
¶ Returns all the votes related to this topic poll.
-
Views¶
Forum polls views¶
This module defines views provided by the forum_polls
application.
-
class
machina.apps.forum_conversation.forum_polls.views.
TopicPollVoteView
(**kwargs)¶ Bases:
machina.apps.forum_permission.viewmixins.PermissionRequiredMixin
,django.views.generic.edit.UpdateView
Allows to vote in polls.
-
form_class
¶ alias of
machina.apps.forum_conversation.forum_polls.forms.TopicPollVoteForm
-
form_invalid
(form)¶ Handles an invalid form.
-
form_valid
(form)¶ Handles a valid form.
-
get_controlled_object
()¶ Returns the controlled object.
-
get_form_kwargs
()¶ Returns the keyword arguments to provide tp the associated form.
-
get_success_url
()¶ Returns the success URL to redirect the user to.
-
model
¶ alias of
machina.core.db.models.TopicPoll
-
perform_permissions_check
(user, obj, perms)¶ Performs the permission check.
-