tangentlabs/django-oscar — pull request #438 by elbaschid (2012-12-27 23:53:50+00:00)
Title: Use reverse lookup for login URL in staff_member_required decorator

Oscar's decorator ``staff_member_required`` contains a hardcoded URL which brakes when the login URL is changed. This was pointed out in issue #437. I made the following changes to the decorator to make it work for any URL:

* Add ``reverse_lazy`` look up of the account login URL
* Switch all dashboard apps to use the ``oscar.views.decorators.staff_member_required`` rather than the one shipped with Django to redirect correctly to Oscar's login page.