feat: Introduce lists and reviews apps, refactor user list functionality from accounts, and add user profile fields.

This commit is contained in:
pacnpal
2025-12-26 09:27:44 -05:00
parent ed04b30469
commit cd8868a591
37 changed files with 5900 additions and 281 deletions

View File

@@ -274,6 +274,18 @@ class FindParksAlongRouteView(RoadTripViewMixin, View):
start_park, end_park, max_detour_km
)
# Return JSON if requested
if request.headers.get("Accept") == "application/json" or request.content_type == "application/json":
return JsonResponse({
"status": "success",
"data": {
"parks": [self._park_to_dict(p) for p in parks_along_route],
"start_park": self._park_to_dict(start_park),
"end_park": self._park_to_dict(end_park),
"count": len(parks_along_route)
}
})
return render(
request,
PARKS_ALONG_ROUTE_HTML,