Django 1.7 fixes

I took the first commit without changes from the 0.8 branch, anticipating its merge into master.

The rest of the code changes were needed, or I stumbled upon, when porting over our software to oscar 0.8 and django 1.7. fb3eae3 also fixes #1485.