Django 1.5 compatibility.

Also, view inventory URLs take a part ID, instead of the DB primary key.