part1 is done in django rest framework