tangentlabs/django-oscar — pull request #317 by elbaschid (2012-09-26 06:52:23+00:00)
Title: make add basket success url work with absolute HTTP_REFERER urls

The URL in ``HTTP_REFERER`` is an absolute URL and always fails in ``resolve`` which expects a relative URL. The [Django docs](https://docs.djangoproject.com/en/dev/topics/http/urls/#resolve) suggest using ``urlparse`` to split the URL into its parts. The example is at the very end of the ``resolve`` section and has a mistake in it because the parsed result cannot be accessed using index 2.

I have added ``urlparse`` to get the actual path from the absolute URL. I hope this is a sensible solution.