Django CMS - DIVIO LogEntry add instance / Latest files added to the CMS

Viewed 98

I need to show at my Homepage a list with all the files added/changed as Bootstrap Filer plugin to my Django CMS project. I was using the LogEntry model, but it doesn't save Add actions to LogEntry instances. What I need is something like that:

Latest Changes:

  • May 30, 2017 - Test.pdf
  • May 28, 2017 - Application Form.pdf
  • May 26, 2017 - Brooker.pdf

My problem is that the Add's actions are not saved at LogEntry model... Every time I add, for example, Bootstrap Filer Plugin and add a PDF it doesn't save a new Entry instance of it, only when I delete it. How do I change the default behavior to save Plugin's Add Actions (specially Bootstrap Filer File) at LogEntry Models?

The website is a platform to help insurance brokers to sell. The prices of different companies changes on monthly basis. And every time a new Price table change I need to show in a Latest changes / updates section.

My models.py

poll = list(LogEntry.objects.all())

    def __unicode__(self):
        return unicode(self.poll)

My template:

    <ul>
    {% for poll in instance.poll %}
      {% if poll.content_type_id == 54 %} <!-- Bootstrap Files Plugin Content Type -->
        <li>
          {{poll.action_time.date }} - {{ poll.object_repr }} - {{ poll.object_repr }}
        </li>
      {% endif %}
    {% endfor %}
   </ul>

What's the best way to do that?

1 Answers
Related