xmlcreate by courses
This commit is contained in:
@@ -142,7 +142,6 @@ def kmltocourse(f):
|
|||||||
|
|
||||||
if not courses:
|
if not courses:
|
||||||
courses = doc.findall('.//opengis:Placemark',ns)
|
courses = doc.findall('.//opengis:Placemark',ns)
|
||||||
|
|
||||||
|
|
||||||
if courses:
|
if courses:
|
||||||
return crewnerdcourse(courses)
|
return crewnerdcourse(courses)
|
||||||
@@ -156,7 +155,7 @@ def kmltocourse(f):
|
|||||||
|
|
||||||
def createcourse(
|
def createcourse(
|
||||||
manager,name,polygons,notes=''):
|
manager,name,polygons,notes=''):
|
||||||
|
|
||||||
c = GeoCourse(manager=manager,name=name,notes=notes)
|
c = GeoCourse(manager=manager,name=name,notes=notes)
|
||||||
c.save()
|
c.save()
|
||||||
|
|
||||||
@@ -192,7 +191,7 @@ def createcourse(
|
|||||||
|
|
||||||
c.distance = int(course_length(c))
|
c.distance = int(course_length(c))
|
||||||
c.save()
|
c.save()
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user