Installation¶
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 actstream
and 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
Supported Environments¶
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.
Note
For Django compatibility details, read the Django docs. For django-activity-stream compatibility details, see the Changelog.
Python¶
Python 3: 3.6 to 3.9
PyPy: 3
Django¶
Django: 2.2+ only
Databases¶
django-activity-stream has been tested to work with the following databases but may work on other platforms (YMMV)
Sqlite: 3
- PostgreSQL: 9.3+
Python: psycopg2
PyPy: psycopg2cffi
- MySQL: 5.5 and 5.6+
Python/PyPy: MySQL-python
Python 3: PyMySQL