Django app for dealing with User activities (likes, tags, comments, etc.)
The full documentation is at https://django-user-activities.readthedocs.io.
Install Django User Activities:
pip install django-user-activities
Add it to your INSTALLED_APPS (along with DRF and django-filters):
INSTALLED_APPS = (
...
'rest_framework',
'django_filters',
...
'user_activities',
...
)
Add Django User Activities's URL patterns:
from user_activities import urls as user_activities_urls
urlpatterns = [
...
url(r'^', include(user_activities_urls, namespace='user_activities')),
...
]
Using Activity, Comment, or Review in your models:
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
class ExampleModel(models.Model):
...
comments = GenericRelation('user_activities.Comment')
user_activities = GenericRelation('user_activities.Activity')
- TODO
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Tools used in rendering this package: