Compare commits

...
A pull request between these branches already exists: ereuse/devicehub-django#32

move logic to model and remove potential harmful code (avoid using del) #32