{"id":21135,"library":"django-activity-stream","title":"django-activity-stream","description":"Generate generic activity streams from the actions on your site. Users can follow any actors' activities for personalized streams. Current version 2.0.0 supports Django 4.1+. Released in Apr 2023, with occasional updates.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/justquick/django-activity-stream","tags":["django","activity-stream","feed","following"],"install":[{"cmd":"pip install django-activity-stream","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required; compatible with 4.1+ as of v2.0.0","package":"Django","optional":false},{"reason":"Optional API serializers","package":"djangorestframework","optional":true}],"imports":[{"note":"Correct as shown; no common mistake.","wrong":"from actstream.models import Action","symbol":"Action","correct":"from actstream.models import Action"},{"note":"","wrong":"","symbol":"Follow","correct":"from actstream.models import Follow"},{"note":"action_handler is in actions module, not signals.","wrong":"from actstream.signals import action_handler","symbol":"action_handler","correct":"from actstream.actions import action_handler"},{"note":"follow function is in actions, not models.","wrong":"from actstream.models import follow","symbol":"follow","correct":"from actstream.actions import follow"}],"quickstart":{"code":"from actstream import action\nfrom actstream.models import Action, Follow\n\n# Record an action\nactor = request.user  # assuming request.user exists\naction.send(actor, verb='logged in')\n\n# Get actions for a user\nactions = Action.objects.filter(actor_object_id=actor.pk)[:10]","lang":"python","description":"Basic usage: record actions and retrieve them. Requires setting up actstream app and running migrations."},"warnings":[{"fix":"Run `python manage.py migrate actstream` and ensure data field is handled.","message":"Upgrading from 0.x to 1.x+ requires running new migrations due to schema changes (e.g., Action.data field removal).","severity":"breaking","affected_versions":"<1.0.0 to >=1.0.0"},{"fix":"Update URL references to use new pattern or check docs.","message":"The `actstream_unfollow_all` URL name was changed in 0.6.2; old usage may break.","severity":"deprecated","affected_versions":"<0.6.2"},{"fix":"Create new Action objects instead of modifying existing ones.","message":"Action objects are immutable after creation (no save()). Editing them directly may cause issues.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `python manage.py migrate actstream`","cause":"Migrations not applied for actstream app.","error":"django.db.utils.OperationalError: no such table: actstream_action"},{"fix":"Change to: `from actstream.actions import action`","cause":"Importing wrong symbol; action() is in actstream.actions.","error":"AttributeError: module 'actstream' has no attribute 'action'"},{"fix":"Use `action.send(request.user, verb='something')` with correct signature.","cause":"Accidentally passing both `action` and `verb` or misusing keyword arguments.","error":"TypeError: action() got multiple values for argument 'action'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}