Some corrections in the Django side of the code