Updated page_url tag to follow design decision

The agreed upon logic is that using the tag without the 'as' breakpoint, uses the backwards compatible logic that will raise a Page.DoesNotExist exception when the page cannot be found AND when settings.DEBUG=True.

Using the tag with the 'as' breakpoint will always suppress the Page.DoesNotExist exception regardless of the settings.DEBUG value.

Also, to do this cleanly, Ojii has updated django-classy-tags to expose an overridable get_value_for_context() method on AsTag. This bumps up the version required to 0.5 for django-cms.  setup.py and test-requirements/* have been updated to reflect this.

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Fix test requirements =/

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Double change preview_language
Allow page permission checks against provided user object
Whitespace and PEP-8
Add on_success to AjaxItem toolbar item
Redirect user to home page when logging out from the toolbar on restricted pages
Add tests for toolbar logout redirect
Updated page_url tag to follow design decision

The agreed upon logic is that using the tag without the 'as' breakpoint, uses the backwards compatible logic that will raise a Page.DoesNotExist exception when the page cannot be found AND when settings.DEBUG=True.

Using the tag with the 'as' breakpoint will always suppress the Page.DoesNotExist exception regardless of the settings.DEBUG value.

Also, to do this cleanly, Ojii has updated django-classy-tags to expose an overridable get_value_for_context() method on AsTag. This bumps up the version required to 0.5 for django-cms.  setup.py and test-requirements/* have been updated to reflect this.

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Fix test requirements =/

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Merge branch 'page_url_as_tag' of https://github.com/mkoistinen/django-cms into page_url_as_tag
Convert all assertEquals to assertEqual

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Use SettingsOverride(…)

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Remove unused imports

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Shame on me, remove leftover print
Merge pull request #2774 from yakky/feature/fix_leftover

Shame on me, remove leftover print
Merge pull request #2770 from yakky/feature/fix_2124

Redirect to home when logging out on a view restricted page
Merge pull request #2771 from mkoistinen/assertequal_fixes

Convert all assertEquals to assertEqual
Update page_url_as_tag to reflect design decision.

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Merge branch 'page_url_as_tag' of https://github.com/mkoistinen/django-cms into page_url_as_tag