Forum member¶
The forum_member application provides functionalities to forum members and defines forum profile
abstract models.
Abstract models¶
Forum member abstract models¶
This module defines abstract models provided by the forum_member application.
-
class
machina.apps.forum_member.abstract_models.AbstractForumProfile(*args, **kwargs)¶ Bases:
django.db.models.base.ModelRepresents the profile associated with each forum user.
-
get_avatar_upload_to(filename)¶ Returns the path to upload the associated avatar to.
-
-
machina.apps.forum_member.abstract_models.get_profile_avatar_upload_to(instance, filename)¶ Returns a valid upload path for the avatar associated with a forum profile.
Shortcuts¶
Views¶
Forum member views¶
This module defines views provided by the forum_member application.
-
class
machina.apps.forum_member.views.ForumProfileDetailView(**kwargs)¶ Bases:
django.views.generic.detail.DetailViewShows a user’s forum profile.
-
get_context_data(**kwargs)¶ Returns the context data to provide to the template.
-
get_object(queryset=None)¶ Returns the considered object.
-
get_queryset()¶ Returns the list of items for this view.
-
-
class
machina.apps.forum_member.views.ForumProfileUpdateView(**kwargs)¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.edit.UpdateViewAllows the current user to update its forum profile.
-
form_class¶ alias of
machina.apps.forum_member.forms.ForumProfileForm
-
form_valid(form)¶ Handles a valid form.
-
get_object(queryset=None)¶ Returns the considered object.
-
get_success_url()¶ Returns the success URL to redirect the user to.
-
-
class
machina.apps.forum_member.views.TopicSubscribeView(**kwargs)¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,machina.apps.forum_permission.viewmixins.PermissionRequiredMixin,django.views.generic.detail.SingleObjectTemplateResponseMixin,django.views.generic.detail.BaseDetailViewAllows a user to subscribe to a specific topic.
-
get_context_data(**kwargs)¶ Returns the context data to provide to the template.
-
get_success_url()¶ Returns the success URL to redirect the user to.
-
model¶ alias of
tests._testsite.apps.forum_conversation.models.Topic
-
perform_permissions_check(user, obj, perms)¶ Performs the permission check.
-
post(request, *args, **kwargs)¶ Handles POST requests.
-
subscribe(request, *args, **kwargs)¶ Performs the subscribe action.
-
-
class
machina.apps.forum_member.views.TopicSubscriptionListView(**kwargs)¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,django.views.generic.list.ListViewProvides a list of all topics to which the current user has subscribed.
-
get_queryset()¶ Returns the list of items for this view.
-
model¶ alias of
tests._testsite.apps.forum_conversation.models.Topic
-
-
class
machina.apps.forum_member.views.TopicUnsubscribeView(**kwargs)¶ Bases:
django.contrib.auth.mixins.LoginRequiredMixin,machina.apps.forum_permission.viewmixins.PermissionRequiredMixin,django.views.generic.detail.SingleObjectTemplateResponseMixin,django.views.generic.detail.BaseDetailViewAllows a user to unsubscribe from a specific topic.
-
get_context_data(**kwargs)¶ Returns the context data to provide to the template.
-
get_success_url()¶ Returns the success URL to redirect the user to.
-
model¶ alias of
tests._testsite.apps.forum_conversation.models.Topic
-
perform_permissions_check(user, obj, perms)¶ Performs the permission check.
-
post(request, *args, **kwargs)¶ Handles POST requests.
-
unsubscribe(request, *args, **kwargs)¶ Performs the unsubscribe action.
-
-
class
machina.apps.forum_member.views.UserPostsView(**kwargs)¶ Bases:
django.views.generic.list.ListViewProvides a list of all the posts submitted by a given a user.
-
get_context_data(**kwargs)¶ Returns the context data to provide to the template.
-
get_queryset()¶ Returns the list of items for this view.
-
poster¶ Returns the considered user.
-