tangentlabs/django-oscar — pull request #206 by elbaschid (2012-06-01 06:10:43+00:00)
Title: added redirect URL to staff_member_required decorator

Trying to access the dashboard index page directly used to redirect the user that are not logged in to the '/admin/' login page instead of the Oscar login.

I implemented a new decorator ``staff_member_required`` that is based on the one provided in ``django.contrib.admin`` and the ``redirect_to_login`` decorator in ``dango.contrib.auth``. It redirects the user to the '/accounts/login/' page an uses the ``next`` GET parameter to redirect the user back to the dashboard index page after successful redirect.