Forum tracking¶
The forum_tracking
application allows to determine which forums or topics have been read by a given user. It provides mechanisms allowing users to mark forums or topics as read and to browse unread forums or topics.
Handler¶
-
class
machina.apps.forum_tracking.handler.
TrackingHandler
(request=None)¶ Bases:
object
The TrackingHandler allows to filter list of forums and list of topics in order to get only the forums which contain unread topics or the unread topics.
-
get_unread_forums
(forums, user)¶ Returns a list of unread forums for the given user from a given set of forums.
-
get_unread_topics
(topics, user)¶ Returns a list of unread topics for the given user from a given set of topics.
-
mark_forums_read
(forums, user)¶ Marks a list of forums as read.
-
mark_topic_read
(topic, user)¶ Marks a topic as read.
-
Views¶
-
class
machina.apps.forum_tracking.views.
MarkForumsReadView
(**kwargs)¶ Bases:
django.views.generic.base.View
Marks a set of forums as read.
-
class
machina.apps.forum_tracking.views.
MarkTopicsReadView
(**kwargs)¶ Bases:
machina.apps.forum_permission.viewmixins.PermissionRequiredMixin
,django.views.generic.base.View
Marks a set of topics as read.
-
get_controlled_object
()¶ Return the considered forum in order to allow permission checks.
-
-
class
machina.apps.forum_tracking.views.
UnreadTopicsView
(**kwargs)¶ Bases:
django.views.generic.list.ListView
Displays unread topics for the current user.