From 66556015d222cbe28e0cb6b0f7aa703c5ad8e1b5 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Tue, 8 Nov 2011 10:19:25 +0100 Subject: a simple activity stream for names --- coip/apps/activitystreams/managers.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 coip/apps/activitystreams/managers.py (limited to 'coip/apps/activitystreams/managers.py') diff --git a/coip/apps/activitystreams/managers.py b/coip/apps/activitystreams/managers.py new file mode 100644 index 0000000..aaa73f9 --- /dev/null +++ b/coip/apps/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