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

Warning

In Django versions older than 1.7, the app must be placed somewhere after all the apps that are going to be generating activities (eg django.contrib.auth). The safest thing to do is to have it as the last app in INSTALLED_APPS.

Add the activity urls to your urlconf

urlpatterns = patterns('',
    ...
    ('^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.

Migrations

As of Django 1.7 and later, the core ships with an integrated migrations framework based on South migrations.

Note

In django-activity-streams 0.6.0 and later the migrations have been re-initialized with the newer migrations framework and the south migrations have been deprecated.

If you still wish to use the south migrations there is a way. Install it as you would normally and then modify your settings to use the deprecated south migration modules in actstream.

SOUTH_MIGRATION_MODULES = {
    'actstream': 'actstream.south_migrations',
}

Add extra data to actions

If you want to use custom data on your actions, then make sure you have django-jsonfield installed

$ pip install django-jsonfield

You can learn more at Adding Custom Data to your Actions

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 2: 2.6 and 2.7
  • Python 3: 3.2, 3.3, 3.4, and 3.5
  • PyPy: 2 and 3

Django

  • Django: 1.3, 1.4, 1.5, 1.6, 1.7, 1.8 and 1.9

Databases

django-activity-stream has been tested to work with the following databases but may work on other platforms (YMMV)