Changed pages in django cms

June 30, 2016, 1: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!

Author of Article

The right to use content on this page http://vivazzi.ru/en/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: Maltsev Artem
Link to article: <a href="http://vivazzi.ru/en/it/find-dirty-pages/">http://vivazzi.ru/en/it/find-dirty-pages/</a>

More: Terms of site usage

Comments: 0

You can leave a comment as an unregistered user. But by registering, you will be able to receive notifications of replies, and also have access to your personal account to view your comments.

To comment in one's own name you should log in or sign up in the usual way or through social networks:

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