On Sun, Jun 8, 2014 at 8:18 AM, Ahmad Khayyat akhay...@gmail.com wrote:
There is one issue with the current approach. The exception message is
shown using Django messages, which displays the message at the top of the
page. If the page tree is scrolled down, the user will see that the illegal
Pull request implementing can_move during page moves only:
https://bitbucket.org/stephenmcd/mezzanine/pull-request/64/
- Interface: can_move(request, new_parent)
. Raises a PageMoveException if permission is denied. Does not return
anything.
- Docs included.
- Not called during page creation,
Looks great Ahmad, thanks a lot for putting up with all my feedback.
I'll try and merge this in before the next release which I hope to get out
over the next day or so.
On Sun, Jun 8, 2014 at 12:35 AM, Ahmad Khayyat akhay...@gmail.com wrote:
Pull request implementing can_move during page
There is one issue with the current approach. The exception message is
shown using Django messages, which displays the message at the top of the
page. If the page tree is scrolled down, the user will see that the illegal
move move was reverted, but will not see the message, which is unsettling!
I'm for it given a few outstanding things:
- If this only occurs in the move view now, I don't think we need the
three-tuple return from can_move. Let's just have the api be raising a
PageMoveException that can include the error message in it.
- Need to document this (there's already a Page