From baf5f96d25c5f378169ac910f9535d29a9546e3e Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 8 Nov 2011 14:10:17 +0100 Subject: produce a basic group-oriented activity stream --- coip/apps/opensocial/activitystreams/managers.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 coip/apps/opensocial/activitystreams/managers.py (limited to 'coip/apps/opensocial/activitystreams/managers.py') diff --git a/coip/apps/opensocial/activitystreams/managers.py b/coip/apps/opensocial/activitystreams/managers.py new file mode 100644 index 0000000..aaa73f9 --- /dev/null +++ b/coip/apps/opensocial/activitystreams/managers.py @@ -0,0 +1,17 @@ +''' +Created on Nov 8, 2011 + +@author: leifj +''' +from actstream.models import ActionManager +from actstream.views import stream +from datetime import datetime + + +class NameActionManager(ActionManager): + + @stream + def name_activities(self, name, time=None): + if time is None: + time = datetime.now() + return name.actor_actions.filter(timestamp__lte = time) \ No newline at end of file -- cgit v1.1