update de fou

This commit is contained in:
Adrien Audebert
2024-09-17 18:20:33 +02:00
parent 9fe444c65d
commit c9ca99605d
9 changed files with 36 additions and 49 deletions

View File

@@ -14,5 +14,6 @@ urlpatterns = [
path('web3/', views.read_data, name='read_data'),
path('api/match_list/', match_list_json, name='match_list_json'),
path('api/player_list/', player_list_json, name='player_list_json'),
path('api/tournoi_list/', tournoi_list_json, name='tournoi_list_json')
path('api/tournoi_list/', tournoi_list_json, name='tournoi_list_json'),
path('trigger-error/', views.trigger_error)
]

View File

@@ -9,10 +9,14 @@ from django.contrib.auth.models import User
from django.contrib.auth import authenticate
from django.views.decorators.csrf import csrf_exempt
from rest_framework import viewsets
from django.http import HttpResponse
import json
import uuid
def trigger_error(request):
raise ValueError("This is a test error to generate a 500 response.")
def index(request):
return render(request, 'index.html')
@@ -172,4 +176,4 @@ def write_data(request):
# # Attente de la confirmation de la transaction
# tx_receipt = web3.eth.wait_for_transaction_receipt(tx_hash)
# print("Transaction receipt:", tx_receipt)
print("-----------------------------")
print("-----------------------------")