put things in proper order
This commit is contained in:
parent
9f213f3c1f
commit
3e9a9fee4d
@ -33,5 +33,4 @@ class Command(BaseCommand):
|
|||||||
gpx = dict(xmltodict.parse(fd.read()))['gpx']
|
gpx = dict(xmltodict.parse(fd.read()))['gpx']
|
||||||
user = self.user
|
user = self.user
|
||||||
|
|
||||||
created, track = Track.objects.get_or_create_from_gpx(gpx, user)
|
Track.objects.get_or_create_from_gpx(gpx, user)
|
||||||
print track
|
|
||||||
|
@ -36,7 +36,7 @@ class TrackManager(models.Manager):
|
|||||||
time=pt['time'],
|
time=pt['time'],
|
||||||
elevation=pt['ele'],
|
elevation=pt['ele'],
|
||||||
point=geos.Point(lon, lat))
|
point=geos.Point(lon, lat))
|
||||||
return created, track
|
return track, created
|
||||||
|
|
||||||
|
|
||||||
class Track(models.Model):
|
class Track(models.Model):
|
||||||
|
Loading…
Reference in New Issue
Block a user