Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Car(models.Model):
- id = models.UUIDField(primary_key=True, default=uuid.uuid4)
- create_date = models.DateTimeField('date added', auto_now_add=True)
- modify_date = models.DateTimeField('date modified', auto_now=True)
- ...
- def last_tracked_location(self):
- ...
- try:
- url = 'myurl'
- return requests.get(
- url,
- ).json()['location'])
- except:
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement