implementing map on school card; adding more school details
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 59s
This commit is contained in:
@@ -65,11 +65,11 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware):
|
||||
# Content Security Policy
|
||||
response.headers["Content-Security-Policy"] = (
|
||||
"default-src 'self'; "
|
||||
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; "
|
||||
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net; "
|
||||
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://unpkg.com; "
|
||||
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net https://unpkg.com; "
|
||||
"font-src 'self' https://fonts.gstatic.com; "
|
||||
"img-src 'self' data:; "
|
||||
"connect-src 'self' https://cdn.jsdelivr.net; "
|
||||
"img-src 'self' data: https://*.tile.openstreetmap.org; "
|
||||
"connect-src 'self' https://cdn.jsdelivr.net https://*.tile.openstreetmap.org; "
|
||||
"frame-ancestors 'none'; "
|
||||
"base-uri 'self'; "
|
||||
"form-action 'self';"
|
||||
@@ -306,11 +306,8 @@ async def get_schools(
|
||||
end_idx = start_idx + page_size
|
||||
schools_df = schools_df.iloc[start_idx:end_idx]
|
||||
|
||||
# Remove internal columns before sending (keep distance if present)
|
||||
output_cols = [c for c in schools_df.columns if c not in ["latitude", "longitude"]]
|
||||
|
||||
return {
|
||||
"schools": clean_for_json(schools_df[output_cols]),
|
||||
"schools": clean_for_json(schools_df),
|
||||
"total": total,
|
||||
"page": page,
|
||||
"page_size": page_size,
|
||||
|
||||
@@ -405,6 +405,10 @@ SCHOOL_COLUMNS = [
|
||||
"address",
|
||||
"town",
|
||||
"postcode",
|
||||
"religious_denomination",
|
||||
"age_range",
|
||||
"latitude",
|
||||
"longitude",
|
||||
]
|
||||
|
||||
# Local Authority code to name mapping (for fallback when LANAME column missing)
|
||||
|
||||
Reference in New Issue
Block a user