Compare commits

...

6 Commits

Author SHA1 Message Date
Lilian937342 839c318f1c Merge branch 'master' of https://forge.chapril.org/lilianrock/Generateurv2 2022-07-28 11:08:15 +02:00
Lilian937342 ebfb3ac492 websocket 2022-07-28 11:07:03 +02:00
root 2e45cd6006 test 2022-06-25 00:27:55 +02:00
root 48c6d51c4d change port in producution 2022-06-25 00:26:52 +02:00
root 3b0a63aae8 Merge branch 'master' of https://gittea.dev/Lilian937342/Generateur_v2 2022-06-24 20:12:16 +02:00
root b2b28d1fa4 yy 2022-06-24 20:11:29 +02:00
29 changed files with 3904 additions and 120 deletions

View File

@ -24,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = 'django-insecure-*9shuddjs^!i00=go!8a=^8bmdje*ex3dbj7hv2(((m^u3$lap'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
DEBUG = True
ALLOWED_HOSTS = ['192.168.1.18', 'localhost', '127.0.0.1', '141.136.42.178']
@ -81,6 +81,9 @@ MIDDLEWARE = [
#SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
# CORS
CORS_ALLOW_ALL_ORIGINS=True
CORS_ALLOWED_ORIGINS = ['http://localhost:8000', 'http://141.136.42.178:8001', 'http://141.136.42.178:8002', 'http://141.136.42.178:80', 'http://lilandco42.com',
'http://127.0.0.1:8002', 'http://localhost:8001', 'http://192.168.1.18:8000']
CSRF_TRUSTED_ORIGINS = ['http://localhost:8000', 'http://141.136.42.178:8001', 'http://141.136.42.178:8002', 'http://141.136.42.178:80', 'http://lilandco42.com',
@ -214,6 +217,7 @@ ACCOUNT_UNIQUE_USERNAME = True
OLD_PASSWORD_FIELD_ENABLED = False
LOGOUT_ON_PASSWORD_CHANGE = False
LOGIN_URL = '/login'
REST_FRAMEWORK = {
'DATETIME_FORMAT': "%m/%d/%Y %I:%M%P", 'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.TokenAuthentication',
@ -223,3 +227,31 @@ REST_FRAMEWORK = {
'PAGE_SIZE': 20
}
"""LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
'loggers': {
'django': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
'propagate': False,
},
},
}"""

Binary file not shown.

View File

@ -432,7 +432,7 @@ def pdfGen(request):
check=True,
cwd=direct)
except TexError:
raise TexError(log=log, source=latex,
raise TexError(log="./logs.txt", source=latex,
template_name='test.tex')
try:
subprocess.run(command, shell=True,
@ -441,7 +441,7 @@ def pdfGen(request):
check=True,
cwd=direct)
except TexError:
raise TexError(log=log, source=latex,
raise TexError(log='./logs.txt', source=latex,
template_name='test.tex')
with open(os.path.join(direct, 'tmp.pdf'), 'rb') as out:

View File

@ -22,9 +22,8 @@ class RoomConsumer(AsyncWebsocketConsumer):
await self.accept()
await self.send(json.dumps({'type': 'connect', "clientId": self.clientId}))
except:
print('test')
await self.close()
async def receive(self, text_data):

View File

@ -1,10 +0,0 @@
import random
"""
Fonction main() qui doit renvoyer un objet avec:
calcul: le calcul a afficher
result: la correction du calcul (pas de correction -> mettre None)
"""
def main():
return {"calcul": "", "result": None}

View File

@ -1,10 +0,0 @@
import random
"""
Fonction main() qui doit renvoyer un objet avec:
calcul: le calcul a afficher
result: la correction du calcul (pas de correction -> mettre None)
"""
def main():
return {"calcul": "", "result": None}

View File

@ -1,10 +0,0 @@
import random
"""
Fonction main() qui doit renvoyer un objet avec:
calcul: le calcul a afficher
result: la correction du calcul (pas de correction -> mettre None)
"""
def main():
return {"calcul": "", "result": None}

View File

@ -1,10 +0,0 @@
import random
"""
Fonction main() qui doit renvoyer un objet avec:
calcul: le calcul a afficher
result: la correction du calcul (pas de correction -> mettre None)
"""
def main():
return {"calcul": "", "result": None}

View File

@ -1,10 +0,0 @@
import random
"""
Fonction main() qui doit renvoyer un objet avec:
calcul: le calcul a afficher
result: la correction du calcul (pas de correction -> mettre None)
"""
def main():
return {"calcul": "", "result": None}

View File

@ -1,10 +0,0 @@
import random
"""
Fonction main() qui doit renvoyer un objet avec:
calcul: le calcul a afficher
result: la correction du calcul (pas de correction -> mettre None)
"""
def main():
return {"calcul": "", "result": None}

View File

@ -1,3 +1,3 @@
NEXT_PUBLIC_HOSTNAME=192.168.1.18
NEXT_PUBLIC_HOSTNAME=141.136.42.178
NEXT_PUBLIC_PORT=80
NEXT_PUBLIC_HOST=http://$NEXT_PUBLIC_HOSTNAME:$NEXT_PUBLIC_PORT

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,8 @@
"moment": "^2.29.1",
"next": "^12.0.8",
"node-fetch": "^3.2.0",
"package.json": "^2.0.1",
"pm2": "^5.2.0",
"react": "17.0.2",
"react-ace": "^9.5.0",
"react-chartjs-2": "^4.2.0",