​Any comments?
Any additional information required?

Here is an example that uses this feature to disallow pages of type
MyPageto be top-level pages:

from mezzanine.pages.signals import pre_page_move
@receiver(pre_page_move, sender=MyPage)def my_move_constraints(sender,
page, new_parent, **kwargs):
    if new_parent is None:
        return "Pages of type MyPage cannot be top-level pages"

​If a user drags a MyPage to a top-level position in the page tree in
Mezzanine admin, the page will be moved back to its original position, and
an error message will be displayed using Django messages. The text of the
error message is the returned string: “Pages of type MyPage cannot be
top-level pages”. A subsequent valid move will remove the error message.​
​

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to