Changed pages in django cms

June 30, 2016, 5:02 a.m.

For finding of changed pages (or dirty pages) you can use Title model:

dirty_titles = Title.objects.filter(publisher_is_draft=True, publisher_state=PUBLISHER_STATE_DIRTY)

Result can displayed as like:

{% if dirty_titles %}
    <p style="font-weight: bold;">Dirty pages:</p>
    {% for title in dirty_titles %}
        <p class="changelink"><a target="_blank" href="{{ title.page.get_absolute_url }}">{{ title.page.get_title }}</a></p>
    {% endfor %}
{% endif %}

If you have multilanguage site, then you need provide group by languages (this property is in instance of Title class). Or you can display your result as like page structure in django cms.

I use my solution for display in information block "Notification" to notify about unpublished changes on pages.

Rate this article

0 from 5 (total 0 ratings)

You can send feedback, suggestions or comments on this article using this form:

Fields marked by star ( * ) is required.

Thank you for yor feedback!

After clicking the "Send" button, your message will be delivered to me on the mail.

Author of Article

Artem Maltsev

Web-developer, having the knowlenge of programming language - Python, framework - Django, content management system - Django CMS, platform of e-commerce site - Django Shop and many other applications, using this technologies.

The right to use content on this page https://vivazzi.pro/it/find-dirty-pages/:

Permission is granted to copy an content with its author and reference to the original without using the parameter rel="nofollow" in tag <a>. Usage:

Author of Article: Artem Maltsev
Link to article: <a href="https://vivazzi.pro/it/find-dirty-pages/">https://vivazzi.pro/it/find-dirty-pages/</a>

More: Terms of site usage

Comments: 0

You can leave a comment as an unregistered user.

But if you sing up, you can:

  • receive notifications
  • view your comments
  • be able to use all the functions of the developed services

To comment in one's own name you should log in or sign up on Vuspace website

Send

There is no search on this site, so I offer to use usual search engine, for example, Google, adding "vivazzi" after your request.

Try it

Select currency for displaying monetary values