Update models.py

made it usable with django-rest-framework