Remove manual course creation; import-only with per-tee stroke indices
Courses can now only be added via Golf Course API import, which provides the full data model: per-tee slope/rating/gender/SI (stroke_indices JSON) and front/back split ratings. Manual creation required admins to enter SI by hand and didn't match the API model. Changes: - Remove GET/POST /admin/courses/new routes and new_course.html - Remove _parse_hole_form helper (no longer needed) - Edit course: par-only editing; stroke_index preserved from import, not exposed or overwritten in the admin form - courses.html: replace "+ New course" with "+ Import course" button - course_search.html: remove "+ Manual" shortcut - edit_course.html: remove SI column from hole grid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -58,12 +58,6 @@
|
||||
<option value="4" {% if h.par == 4 %}selected{% endif %}>4</option>
|
||||
<option value="5" {% if h.par == 5 %}selected{% endif %}>5</option>
|
||||
</select>
|
||||
<select name="si_{{ h.hole_number }}" class="hole-par-select">
|
||||
<option value="">—</option>
|
||||
{% for s in range(1, course.holes + 1) %}
|
||||
<option value="{{ s }}" {% if h.stroke_index == s %}selected{% endif %}>{{ s }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user