Skip to content

Commit

Permalink
Merge pull request #8 from evildmp/test-redirection-branch
Browse files Browse the repository at this point in the history
Updated notes on redirection
  • Loading branch information
yakky committed Mar 5, 2015
2 parents 7d47958 + f20bb9a commit 7f665f9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
54 changes: 30 additions & 24 deletions docs/user/reference/frontend.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,33 @@
Working with admin in the frontend
##################################

By clicking on the **Administration** item in the site menu, a left sideframe opens
on the current website Django admin.
This allows any kind of interaction with the "traditional" Django admin.


************
Redirections
************

When an object is created or edited while the user is on the website frontend,
a redirection occurs to redirect the user to the current address of the created
/ edited instance.

Redirections follow rules below:

* Anonymous user (for example during logoff) is always redirected to the
home page;
* When a model instance has changed (see :ref:`url_changes`) the frontend
is redirected to the instance URL; in case of django CMS pages, the publishing
state is taken into account: if the toolbar is in *Draft* mode the user is
redirected to the *draft* page URL, if in *Live* mode, the user is redirected
to the page if is published, otherwise it's switched in *Draft* mode and redirected
to the *draft* page URL;
* If the edited object or its URL can't be retrieved, no redirection occurs;
The *Administration...* item in the :ref:`site-menu`, opens the :ref:`side-frame <side-frame>`
containing the site's Django admin. This allows the usual interaction with the "traditional" Django
admin.

***********
Redirection
***********

When an object is created or edited while the user is on the website frontend, a redirection occurs
to redirect the user to the current address of the created/edited instance.

This redirection follows the rules below:

* an anonymous user (for example, after logging out) is always redirected to the home page
* when a model instance has changed (see :ref:`url_changes`) the frontend is redirected to the
instance URL, and:

* in case of django CMS pages, the publishing state is taken into account, and then

* if the toolbar is in *Draft* mode the user is redirected to the *draft* page URL
* if in *Live* mode:

* the user is redirected to the page if is published
* otherwise it's switched in *Draft* mode and redirected to the *draft* page URL

* if the edited object or its URL can't be retrieved, no redirection occurs

Yes, it's complex - but there is a logic to it, and it's actually easier to understand when you're
using it than by reading about it, so don't worry too much. The point is that django CMS always
tries to redirect you to the most sensible place when it has to.
2 changes: 2 additions & 0 deletions docs/user/reference/page_admin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ CMS.

Takes you back to home page of your site.

.. _site-menu:

*Site menu*
===========

Expand Down

0 comments on commit 7f665f9

Please sign in to comment.