$def with (course) $if course: $ id = str(course.id) $ name = course.name $ length = str(round(course.length)) if course.length is not None else "" $ climb = str(round(course.climb)) if course.climb is not None else "" $ controls = " - ".join(course.controls) $else: $ id = "" $ name = "" $ length = "" $ climb = "" $ controls = ""