Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. class Car(models.Model):
  2. id = models.UUIDField(primary_key=True, default=uuid.uuid4)
  3. create_date = models.DateTimeField('date added', auto_now_add=True)
  4. modify_date = models.DateTimeField('date modified', auto_now=True)
  5. ...
  6.  
  7. def last_tracked_location(self):
  8. ...
  9. try:
  10. url = 'myurl'
  11. return requests.get(
  12. url,
  13. ).json()['location'])
  14. except:
  15. return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement