Search code examples
djangowebdjango-modelsfeed

Packages for implementing following system and newsfeed like pinterest?


I am currently developing an app in which I must be able to implement follow and followers system and also notifications and newsfeed.I came across various django packages,like for followers and following relations : django-relationships,django-follow,etc and for newsfeed : StreamFramework,django-notifier,django-notifications,etc. So which are the best for implementing them together ? Which are the packages for getting both relations and newsfeed in my app ? Thanks!


Solution

  • You might want to have a look at getstream.io, an hosted API service that makes it really easy to build newsfeeds and notification feeds (with support for realtime updates). It comes with a Django integration library that makes it really easy to add feeds to existing applications.

    This is what it takes to keep a model in sync with user feeds for example:

    from stream_django.activity import Activity
    
    
    class Pin(models.Model, Activity):
        created_at = models.DateTimeField(auto_now_add=True)
        author = models.ForeignKey(settings.AUTH_USER_MODEL)
    

    There is a Pinterest clone app built with django_stream here: https://github.com/GetStream/Stream-Example-Py

    Disclaimer: I am one of the founders of getstream.io and contributor of StreamFramework.