1

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 Characterictic objects also add comments to objects.

For example:

1) User A add comment to Characterictic B in 11:45
2) User B edit Characterictic C in 11:00
3) User C create Characterictic А in 09:55.

models.py:

class Characteristic(models.Model):
    project = models.ForeignKey(Project, on_delete=models.CASCADE)
    symbol = models.CharField(_('Symbol'), max_length=250)
    description = models.TextField(_('Description'))
    comments = models.ManyToManyField("Comment")
    create_time = models.DateTimeField(_('Date of creation'), auto_now_add=True)
    revision_date = models.DateTimeField(_('Date of last update'), auto_now=True)

class Comment(models.Model):
    author = models.ForeignKey(User, on_delete=models.CASCADE)
    text = models.TextField()
    created = models.DateTimeField(auto_now_add=True)
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193

0 Answers0