🔧 Fix GPX Statistics and Docker Volume Mapping
Critical Fixes: 🗺️ GPX Statistics Processing: - Fixed Docker volume mapping from ./static/media to ./app/static/media - GPX files now properly accessible in container for statistics calculation - GPS route statistics (distance, elevation, track points) now display correctly - Added fix_gpx_statistics.py utility script for reprocessing existing GPX files 🐛 Template Fixes: - Fixed CSRF token undefined error in post_detail.html template - Resolved 500 errors when accessing community post pages - Template now uses form.csrf_token instead of csrf_token() function �� Docker Improvements: - Corrected volume mounting to ensure GPX file persistence - Fixed path resolution for media files in containerized environment - New posts will now properly save and process GPX files ✅ Verified Functionality: - Community post pages load successfully (200 OK) - GPS statistics display correctly (50.1 km distance, 2231 track points) - Future posts will automatically calculate and display GPX statistics - Docker container properly syncs with host filesystem This update ensures the motorcycle adventure platform's GPS tracking and route statistics work reliably in production.
This commit is contained in:
@@ -885,7 +885,7 @@ function toggleLike(postId) {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': '{{ csrf_token() }}'
|
||||
'X-CSRFToken': '{{ form.csrf_token.data }}'
|
||||
}
|
||||
})
|
||||
.then(response => response.json())
|
||||
|
||||
Reference in New Issue
Block a user