mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2026-11-09 17:37:08 +01:00
Merge branch 'adrien' of github.com:AudebertAdrien/ft_transcendence into trash
This commit is contained in:
@@ -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)
|
||||
]
|
||||
|
||||
@@ -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("-----------------------------")
|
||||
|
||||
@@ -22,8 +22,13 @@ SECRET_KEY = '12345678'
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
ALLOWED_HOSTS = [
|
||||
'www.ft-transcendence.com',
|
||||
'ft-transcendence.com',
|
||||
'localhost',
|
||||
'127.0.0.1']
|
||||
|
||||
USE_X_FORWARDED_HOST = True
|
||||
|
||||
# Application definition
|
||||
|
||||
@@ -137,32 +142,6 @@ CHANNEL_LAYERS = {
|
||||
},
|
||||
}
|
||||
|
||||
LOGGING = {
|
||||
'version': 1, # Django requires this key
|
||||
'disable_existing_loggers': False, # Keep Django's default loggers
|
||||
'formatters': {
|
||||
'simple': {
|
||||
'format': '{levelname} {message}',
|
||||
'style': '{', # Allows to use Python's new style string formatting
|
||||
},
|
||||
},
|
||||
'handlers': {
|
||||
'console': { # Log to the console
|
||||
'level': 'DEBUG', # Minimum level of messages that should be handled
|
||||
'class': 'logging.StreamHandler',
|
||||
'formatter': 'simple', # Use the simple formatter defined above
|
||||
},
|
||||
},
|
||||
'loggers': {
|
||||
'django': { # The main logger for Django itself
|
||||
'handlers': ['console'],
|
||||
'level': 'DEBUG', # Minimum log level to be logged
|
||||
'propagate': False, # Prevents log propagation to other loggers
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
"""
|
||||
LOGGING = {
|
||||
'version': 1, # The version of the logging configuration schema
|
||||
'disable_existing_loggers': False, # Allows existing loggers to keep logging
|
||||
@@ -193,8 +172,7 @@ LOGGING = {
|
||||
'django': { # The Django logger catches all messages sent by the Django framework
|
||||
'handlers': ['file', 'console'], # Sends logs to both the file and the console
|
||||
'level': 'DEBUG', # Minimum log level to be logged
|
||||
'propagate': True, # If True, messages will be passed to the parent loggers as well
|
||||
'propagate': False, # If True, messages will be passed to the parent loggers as well
|
||||
},
|
||||
},
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user