Merge pull request 'add loader view' (#5) from RANDOMSEC-32 into master

Reviewed-on: #5
This commit is contained in:
Michał Najborowski 2022-01-30 15:27:37 +01:00
commit 5416298d8a
6 changed files with 28 additions and 9 deletions

View File

@ -126,7 +126,7 @@ STATICFILES_DIRS = (
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
LOGIN_REDIRECT_URL = 'home' LOGIN_REDIRECT_URL = 'loader'
LOGOUT_REDIRECT_URL = 'home' LOGOUT_REDIRECT_URL = 'home'
# Default primary key field type # Default primary key field type

View File

@ -25,9 +25,8 @@ urlpatterns = [
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
path('', include('django.contrib.auth.urls')), path('', include('django.contrib.auth.urls')),
path('signup/', SignUpView.as_view(), name='signup'), path('signup/', SignUpView.as_view(), name='signup'),
path('welcome/', TemplateView.as_view(template_name='home.html'), path('loader/', TemplateView.as_view(template_name='loader.html'), name='loader'),
name='home'), path('welcome/', TemplateView.as_view(template_name='home.html'), name='home'),
path('favicon.ico', RedirectView.as_view( path('favicon.ico', RedirectView.as_view(url=staticfiles_storage.url('images/favicon.ico'))),
url=staticfiles_storage.url('images/favicon.ico'))),
path('', views.home, name='home') path('', views.home, name='home')
] ]

View File

@ -1,6 +1,4 @@
from django.contrib.auth import logout
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import UserCreationForm
from django.http import JsonResponse
from django.shortcuts import redirect from django.shortcuts import redirect
from django.urls import reverse_lazy from django.urls import reverse_lazy
from django.views import generic from django.views import generic

Binary file not shown.

View File

@ -2,8 +2,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<meta charset="utf-8"> <meta charset="utf-8">
<title>{% block title %}MultiUserOpenRefine{% endblock %}</title> <title>{% block title %}MultiUserOpenRefine{% endblock %}</title>
</head> </head>
@ -25,5 +25,14 @@
</div> </div>
</div> </div>
</main> </main>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"
integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"
integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k"
crossorigin="anonymous"></script>
</body> </body>
</html> </html>

View File

@ -0,0 +1,13 @@
<!-- templates/loader.html -->
{% extends 'base.html' %}
{% block title %}Loader{% endblock %}
{% block content %}
<h3 style="text-align: center;">Your instance is getting ready. Please wait... </h3>
<div class="d-flex justify-content-center">
<div class="spinner-grow" style="width: 3rem; height: 3rem;" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
{% endblock %}