Get the code¶
Installation is easy using
pip and the only requirement is a recent version of Django.
$ pip install django-activity-stream
or get it from source
$ pip install git+https://github.com/justquick/django-activity-stream.git#egg=actstream
Basic app configuration¶
Then to add the Django Activity Stream to your project add the app
django.contib.sites to your
INSTALLED_APPS and urlconf. In addition to, add the setting
SITE_ID = 1 below the installed apps.
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.sites', ... 'actstream' ) SITE_ID = 1
Add the activity urls to your urlconf
urlpatterns = [ ... ('^activity/', include('actstream.urls')), ... ]
The activity urls are not required for basic usage but provide activity Feeds and handle following, unfollowing and querying of followers.
Add extra data to actions¶
If you want to use custom data on your actions and are running Django < 3.1, then make sure you have django-jsonfield-backport installed.
$ pip install django-activity-stream[jsonfield]
You can learn more at Custom Action Data
The following Python/Django versions and database configurations are supported by django-activity-stream. Make sure to pick the version of Django and django-activity-stream that supports the environment you are using.
Python 3: 3.6 to 3.9
Django: 2.2+ only
django-activity-stream has been tested to work with the following databases but may work on other platforms (YMMV)