Update models.py

fixed for django 1.5