Questions tagged [django-activity-stream]

Django Activity Stream is a module to generate JSON feeds of activities such as "justquick (actor) closed (verb) issue 2 (object) on django-activity-stream (target) 12 hours ago" in Activity Streams format.

Here is a simple, minimal example of a JSON serialized activity:

  {
    "published": "2011-02-10T15:04:55Z",
    "actor": {
      "url": "http://example.org/martin",
      "objectType" : "person",
      "id": "tag:example.org,2011:martin",
      "image": {
        "url": "http://example.org/martin/image",
        "width": 250,
        "height": 250
      },
      "displayName": "Martin Smith"
    },
    "verb": "post",
    "object" : {
      "url": "http://example.org/blog/2011/02/entry",
      "id": "tag:example.org,2011:abc123/xyz"
    },
    "target" : {
      "url": "http://example.org/blog/",
      "objectType": "blog",
      "id": "tag:example.org,2011:abc123",
      "displayName": "Martin's Blog"
    }
  }

A single activity consists of an actor (required), a verb (required), an an object (optional), and a target (optional). In Django Activity Stream each of those noun components might be any properly registered Django Model.

There are some pre-defined streams such as User streams (what the given user did) or Target streams (what happened to the given target) and you can create your own custom ones.

GitHub with the source is located at https://github.com/justquick/django-activity-stream and official documentation is at http://django-activity-stream.readthedocs.io/en/latest/

18 questions
6
votes
0 answers

Django Activity Stream vs Feedly

We are building django based REST APIs, where one of the features is News feed. After some googling I could see the following 2 options: Django Activity Stream (will have to use Redis on top of this) Stream Framework (previously called…
Saurabh Verma
  • 6,328
  • 12
  • 52
  • 84
3
votes
0 answers

How to override Django many to many field add() and remove() methods

I am trying to set up a Facebook-like activity notification system using Django-Activity-Stream. The library provides a special action signal for creating the actions. According to the documentation, to trigger this action, You can do it through…
2
votes
1 answer

django-activity-stream with aggregation

I'm using django-activity-stream to create a feed of goals. A simplified version of Goal object is as follows: class Goal(models.Model): user = models.ForeignKey(User, related_name="goals", on_delete=models.CASCADE) liked_by =…
Original BBQ Sauce
  • 527
  • 1
  • 11
  • 24
2
votes
0 answers

Override settings doesn't work in unit tests when dynamic import a Class from django settings

The things are little complicated, let me show you a minimal example. In my app, I dynamic import a Class from django settings: my_settings.py from django.conf import settings SETTINGS = getattr(settings, 'ACTSTREAM_SETTINGS', {}) def…
You Gakukou
  • 643
  • 7
  • 16
2
votes
0 answers

How to use django-activity-stream to Create Notificications

I would like to use django-activity-stream in order to present notifications to users, but I am having a hard time doing so. From the looks of the documentation, you can only display generic actions to users, such as all that actions performed on a…
Hybrid
  • 6,741
  • 3
  • 25
  • 45
2
votes
1 answer

Should I use django-activity-stream combined with django-notifications?

I'm discovering django-activity-stream, I would like to use it on our website for showing a news feed based on follow relationships (like Twitter) and a profile feed. It seems perfect for doing this. However, it doesn't seem really great for…
Ambroise Collon
  • 3,839
  • 3
  • 18
  • 37
2
votes
0 answers

Django Activity Stream with Multiple Databases

Django Activity Stream uses the concept of Generic Foreign Keys. However, Django doesn’t currently provide any support for foreign key or many-to-many relationships spanning multiple databases. So, is it possible to use Django Activity Stream where…
Saurabh Verma
  • 6,328
  • 12
  • 52
  • 84
2
votes
1 answer

The difference between action object and target in django-activity-stream

With django-activity-stream one can create activity streams (what were the latest things done?) like in Facebook, Twitter, or any other social network. What is the difference and what are the use cases of action object and target there?
Aidas Bendoraitis
  • 3,965
  • 1
  • 30
  • 45
1
vote
0 answers

How to show user activity in modal by django-activity-stream app?

Can someone who worked with app django-activity-stream say me how to use it correctly by example? I am really comfused after reading the documentation. I need to show last 10 activity which was in my modal Characterictic. User can edit…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
0 answers

Need help saving action object using django-activity stream

I am trying to create a newsfeed using django activity stream. I am making a target stream but action object is not saved if it is a comment it does not save "id": 14, "actor": { "id": 1, "email":…
1
vote
1 answer

Django activity stream filter Actions by foreignkey in target model

I would like to filter Actions for particular queryset. To this moment I was grabbing data by generating a model stream on desired model. model_stream(FillingSystem) I would like to extend this functionality and have something like…
Efrin
  • 2,323
  • 3
  • 25
  • 45
0
votes
0 answers

'property' object has no attribute '_meta' while using django-activity-stream package

I am using the django-activity-stream package to show activity stream. Everything worked fine, but I couldn't assign user as an actor. This is my signals.py file. from actstream import action from django.db.models.signals import post_save from…
0
votes
0 answers

GenericRelation: You might need to add explicit type casts

I have a model Link: class Link(models.Model): tags = TaggableManager(through=LinkTag) actions = GenericRelation( Action, related_query_name='link', content_type_field='action_object_content_type', …
4m1nh4j1
  • 4,289
  • 16
  • 62
  • 104
0
votes
0 answers

Access related model fields from ModelAdmin actions for exporting to excel

I am desperately waiting for someone attention to get my question answered.... please help.. ModelAdmin model has to export to Excel action method. I need to access related model fields in action method. That means I can not pass any arguments…
0
votes
1 answer

Modify model generated by django-activity-stream

I am creating a project which needs an audit in the database about all kind of actions performed by the user. For this objective, I m using 'Django-activity-stream' which creates its model properly. I want to change the type of one parameter in the…
JaiAG
  • 1
  • 3
1
2