fix errors with django rest framework