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>
Use SettingsOverride(…) for cache test

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Test that pages appear in the tree in the current lang

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

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Switch for .format() for string interpolation

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
Avoid use of str()

Signed-off-by: Martin Koistinen <mkoistinen@gmail.com>
wrap response.content in str() for Python3

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