add some debug tools for gathering fft data

apikeys
Razmig Sarkissian 4 months ago
parent 81ea23395b
commit ff1fbde52b
  1. 9
      padelclub_backend/urls.py
  2. 1739
      tournaments/admin_utils.py
  3. 1057
      tournaments/management/commands/analyze_rankings.py
  4. 13
      tournaments/templates/admin/tournaments/index.html

@ -17,6 +17,7 @@ from django.contrib import admin
from django.urls import include, path from django.urls import include, path
from django.conf import settings from django.conf import settings
from django.conf.urls.static import static from django.conf.urls.static import static
from tournaments.admin_utils import download_french_padel_rankings, debug_tools_page, test_player_details_apis, explore_fft_api_endpoints, get_player_license_info, bulk_license_lookup, search_player_by_name, enrich_rankings_with_licenses
urlpatterns = [ urlpatterns = [
@ -24,6 +25,14 @@ urlpatterns = [
path('shop/', include('shop.urls')), path('shop/', include('shop.urls')),
# path("crm/", include("crm.urls")), # path("crm/", include("crm.urls")),
path('roads/', include("api.urls")), path('roads/', include("api.urls")),
path('kingdom/debug/', debug_tools_page, name='debug_tools'),
path('kingdom/debug/enrich-rankings-with-licenses/', enrich_rankings_with_licenses, name='enrich_rankings_with_licenses'),
path('kingdom/debug/search-player-by-name/', search_player_by_name, name='search_player_by_name'),
path('kingdom/debug/download-french-padel-rankings/', download_french_padel_rankings, name='download_french_padel_rankings'),
path('kingdom/debug/test-player-apis/', test_player_details_apis, name='test_player_apis'),
path('kingdom/debug/player-license-lookup/', get_player_license_info, name='player_license_lookup'),
path('kingdom/debug/bulk-license-lookup/', bulk_license_lookup, name='bulk_license_lookup'),
path('kingdom/debug/explore-api-endpoints/', explore_fft_api_endpoints, name='explore_api_endpoints'),
path('kingdom/', admin.site.urls), path('kingdom/', admin.site.urls),
path('api-auth/', include('rest_framework.urls')), path('api-auth/', include('rest_framework.urls')),
path('dj-auth/', include('django.contrib.auth.urls')), path('dj-auth/', include('django.contrib.auth.urls')),

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,13 @@
{% extends "admin/index.html" %}
{% block content %}
<div style="background: #e8f4f8; padding: 15px; margin-bottom: 20px; border-radius: 5px; border-left: 4px solid #79aec8;">
<h3 style="margin-top: 0; color: #333;">🛠 Debug Tools</h3>
<p style="margin-bottom: 10px;">Quick access to development and debugging utilities:</p>
<a href="{% url 'debug_tools' %}" style="background-color: #79aec8; color: white; padding: 8px 16px; text-decoration: none; border-radius: 4px; font-weight: bold;">
🏓 Debug Tools Dashboard
</a>
</div>
{{ block.super }}
{% endblock %}
Loading…
Cancel
Save