Updated API to work with djmange