diff --git a/app/templates/error_403.html b/app/templates/error_403.html new file mode 100644 index 00000000..4b1cab0c --- /dev/null +++ b/app/templates/error_403.html @@ -0,0 +1,37 @@ +{% load static %} + + + + + + + + + + Error 403 + + +
+
+
+ Logo Morea +
+
+
+
+

+ Erro 403 +
+ Acesso Negado :( +

+

+ Seu cliente não tem permissão para obter URL do servidor; +
+ Clique No Botão Abaixo Para Voltar Para O Inicio +

+ + + +
+ + \ No newline at end of file diff --git a/app/templates/error_404.html b/app/templates/error_404.html new file mode 100644 index 00000000..30b1fcb5 --- /dev/null +++ b/app/templates/error_404.html @@ -0,0 +1,37 @@ +{% load static %} + + + + + + + + + + Erro 404 + + +
+
+
+ Logo Morea +
+
+
+
+

+ Erro 404 +
+ Pagina Não Encontrada +

+

+ Opa Não Encontramos A Pagina :( +
+ Clique No Botão Abaixo Para Voltar Para O Inicio +

+ + + +
+ + \ No newline at end of file diff --git a/app/templates/error_500.html b/app/templates/error_500.html new file mode 100644 index 00000000..8c920ef7 --- /dev/null +++ b/app/templates/error_500.html @@ -0,0 +1,38 @@ +{% load static %} + + + + + + + + + + Erro 500 + + +
+
+
+ Logo Morea +
+
+
+
+

+ Erro 500 +
+

+

+ Problemas De Processamento Com A Hospedagem Do Site :( +
+ A Versão HTTP Utilizada Na Requisição Não É Suportada Pelo Servidor +
+ Clique No Botão Abaixo Para Voltar Para O Inicio +

+ + + +
+ + \ No newline at end of file diff --git a/app/templates/error_503.html b/app/templates/error_503.html new file mode 100644 index 00000000..b3f9e121 --- /dev/null +++ b/app/templates/error_503.html @@ -0,0 +1,39 @@ +{% load static %} + + + + + + + + + + Erro 503 + + +
+
+
+ Logo Morea +
+
+
+
+

+ Erro 503 +
+ Servidor Indisponível +

+

+ Dificuldade De Processamento Do Servidor :( +
+ O Servidor Web Está Temporariamente Indisponível Ou Incapaz De Lidar Com A Solicitação Do Cliente. +
+ Clique No Botão Abaixo Para Voltar Para O Inicio +

+ + + +
+ + \ No newline at end of file diff --git a/app/views.py b/app/views.py index 6704aac0..8b35716b 100644 --- a/app/views.py +++ b/app/views.py @@ -133,3 +133,15 @@ def getDeviceData(request): return Response({'message': 'data received.'}, status=status.HTTP_200_OK) else: return Response({'message': 'data not received.'}, status=status.HTTP_400_BAD_REQUEST) + +def page_in_erro403(request, exception): + return render(request, 'error_403.html', status=403) + +def page_in_erro404(request, exception): + return render(request, 'error_404.html', status=404) + +def page_in_erro500(request): + return render(request, 'error_500.html', status=500) + +def page_in_erro503(request): + return render(request, 'error_503.html', status=503) \ No newline at end of file diff --git a/morea_ds/urls.py b/morea_ds/urls.py index a138e697..34ba1241 100644 --- a/morea_ds/urls.py +++ b/morea_ds/urls.py @@ -26,3 +26,8 @@ if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + +handler403 = 'app.views.page_in_erro403' +handler404 = 'app.views.page_in_erro404' +handler500 = 'app.views.page_in_erro500' +handler503 = 'app.views.page_in_erro503' \ No newline at end of file diff --git a/static/css/errors.css b/static/css/errors.css new file mode 100644 index 00000000..1395adf8 --- /dev/null +++ b/static/css/errors.css @@ -0,0 +1,182 @@ +@charset "UTF-8"; +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Roboto:wght@700&display=swap"); + + + /*Config Global*/ + + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + + + /*Celular*/ + + +@media (max-width: 460px) { + +body{ + background-color: #0e6afb; + font-family: "Roboto", sans-serif; +} + +.header{ + background-color: white; + height: 5em; + width: 100%; + display: flex; + justify-content: center; +} + +.header img{ + height: 85px; + width: 85px; +} + +.titleErro{ + color: white; + font-size: 30px; +} + +.centerkk{ + position: absolute; + top: 50%; + left: 50%; + transform: translateX(-50%) translateY(-50%); + text-align: center; +} + +.text { + color: white; + font-size: 15px; + padding-top: 3%; +} + +.botão{ + margin-top: 2em; + padding: 10px; + border-radius: 7px; + +} + +} + + + /*Pc/Laptop*/ + + +@media (min-width: 1000px){ + +body{ + + background-color: #0E6AFB; + font-family: 'Roboto' , sans-serif +} + +.header{ + background-color: white; + height: 5em; + display: flex; + justify-content: center; +} +.header img{ + height: 85px; + width: 85px; +} + +.pointerkk{ + position: absolute; + user-select:none +} + +.pointerkk img{ + pointer-events: none; +} + +.titleErro{ + color: white; + font-size: 45px; +} + +.centerkk{ + position: absolute; + top: 50%; + left: 50%; + transform: translateX(-50%) translateY(-50%); + text-align: center; +} + +.text{ + color: white; + font-size: 20px; + padding-top: 3%; +} + +.botão{ + margin-top: 2em; + padding: 10px; + border-radius: 7px; + +} + +} + + /*Tablet*/ + + +@media (min-width: 461px) and (max-width: 999px) { + + +body{ + background-color: #0E6AFB; + font-family: 'Roboto' , sans-serif +} + +.header{ + background-color: white; + height: 5em; + display: flex; + justify-content: center; +} +.header img{ + height: 85px; + width: 85px; +} + +.pointerkk{ + position: absolute; + user-select:none +} + +.pointerkk img{ + pointer-events: none; +} + +.titleErro{ + color: white; + font-size: 35px; +} + +.centerkk{ + position: absolute; + top: 50%; + left: 50%; + transform: translateX(-50%) translateY(-50%); + text-align: center; +} + +.text{ + color: white; + font-size: 15px; + padding-top: 3%; +} + +.botão{ + margin-top: 2em; + padding: 10px; + border-radius: 7px; +} +} +