Default manager for Actions, accessed through Action.objects
Stream of most recent actions where obj is the action_object. Keyword arguments will be passed to Action.objects.filter
Stream of most recent actions where obj is the actor. Keyword arguments will be passed to Action.objects.filter
Stream of most recent actions where obj is the actor OR target OR action_object.
Stream of most recent actions by any particular model
Manager for Follow model.
Returns a list of User objects who are following the given actor (eg my followers).
Responds to the request with the given response code. If next is in the form, it will redirect instead.
Creates or deletes the follow relationship between request.user and the actor defined by content_type_id, object_id.
Index page for authenticated user’s activity stream. (Eg: Your feed at github.com)
Creates a listing of User``s that follow the actor defined by ``content_type_id, object_id.
Returns a list of actors that the user identified by user_id is following (eg who im following).
User focused activity stream. (Eg: Profile page twitter.com/justquick)
Action detail view (pretty boring, mainly used for get_absolute_url)
Abstract base class for all stream rendering. Supports hooks for fetching streams and formatting actions.
Returns a formatted dictionary for the action object of the action.
Returns a formatted dictionary for an individual item based on the action and item_type.
Returns an RFC3987 IRI ID for the given object, action and date.
Compatible with Atom Activity Streams 1.0 spec
Atom feed of Activity for a given user (where actions are those that the given user follows).
Compatible with JSON Activity Streams 1.0 spec
Atom feed of Activity for a given user (where actions are those that the given user follows).
Atom feed of Activity for a given model (where actions involve the given model as any of the entities).
Atom feed of Activity for a given object (where actions involve the given object as any of the entities).
Creates a relationship allowing the object’s activities to appear in the user’s stream.
Returns the created Follow instance.
If send_action is True (the default) then a <user> started following <object> action signal is sent. Extra keyword arguments are passed to the action.send call.
If actor_only is True (the default) then only actions where the object is the actor will appear in the user’s activity stream. Set to False to also include actions where this object is the action_object or the target.
Example:
follow(request.user, group, actor_only=False)
Removes a “follow” relationship.
Set send_action to True (False is default) to also send a ``<user> stopped following <object> action signal.
Example:
unfollow(request.user, other_user)
Start off your templates by adding:
{% load activity_tags %}
Renders an activity stream as a list into the template’s context. Streams loaded by stream_type can be the default ones (eg user, actor, etc.) or a user defined stream. Extra args/kwargs are passed into the stream call.
{% activity_stream 'actor' user %}
{% for action in stream %}
{% display_action action %}
{% endfor %}
Returns true if the given user is following the actor
{% if request.user|is_following:another_user %}
You are already following {{ another_user }}
{% endif %}
Renders the template for the action description
{% display_action action %}
Renders the URL of the follow view for a particular actor instance
<a href="{% follow_url other_user %}">
{% if request.user|is_following:other_user %}
stop following
{% else %}
follow
{% endif %}
</a>
Renders the URL to follow an object as both actor and target
<a href="{% follow_all_url other_user %}">
{% if request.user|is_following:other_user %}
stop following
{% else %}
follow
{% endif %}
</a>
Renders the URL for a particular actor instance
<a href="{% actor_url request.user %}">View your actions</a>
<a href="{% actor_url another_user %}">{{ another_user }}'s actions</a>