The common url action parameters in django-cms are for example: ?edit
to enter Edit-mode, ?toolbar_off
to disable/hide the toolbar.
Now I'd like to add a new action parameter e.g. ?logout
which just logs out the user no matter on which url he/she currently is. I'd tried to include this in the urls.py
with the following pattern:
url(r'^.*\?logout$', RedirectView.as_view(url='/admin/logout/')),
I read in another SO answer that you shouldn't catch URL Params with an url pattern...
Should I do this in a kind of middleware? Or where else?
Using django==1.11, django-cms==3.5.3