|
location_schema = { # TODO remove backward compatibility - deprecation |
Rendered map.html template with feature flags and location schema
"""
# Prepare location schema for frontend dynamic forms
# Include full schema from Pydantic model for better type information
category_data = app.db.get_category_data()
categories = category_data.get("categories", {})
# Get full JSON schema from Pydantic model
model_json_schema = location_model.model_json_schema()
properties = model_json_schema.get("properties", {})
# Filter out uuid and position from properties for frontend form
form_fields = {
name: spec for name, spec in properties.items() if name not in ("uuid", "position")
}
location_schema = { # TODO remove backward compatibility - deprecation
"obligatory_fields": app.extensions["goodmap"][
"location_obligatory_fields"
], # Backward compatibility
"categories": categories, # Backward compatibility
"fields": form_fields,
}
return render_template(
goodmap/goodmap/goodmap.py
Line 134 in 612054c