Passing to Django 1.7

Modified behaviour in the purchase module to get the ID of the models
(ContentType).
Removed unused variables and modules.