justquick/django-activity-stream — Issue #54: from actstream import action does not initialize the action_handler
Author: gdehaan
Created: 2011-12-20 15:43:21+00:00
State: open

I create Actions by doing action.send(user, 'add', target=otherobject) in my views and that works while running a django server. However when testing those views I noticed that no Action models were being created. After adding 'from actstream.actions import action' to my test it does work (this makes sense since the actions module connects the action_handler to that signal), so I guess that running the django server imports actions module through some other path.

Still, this extra import seems awkward for the tests, so I want to suggest to change __init__.py to import 'action' from actions (which imports it from signals) so that all the proper initialization will done in that case as well. What do you think?

Best regards,
Gijsbert