Merge branch 'master' of https://moriya.zapto.org/gitsokyo/PDBA/PDMI
This commit is contained in:
commit
a9030ac398
1
.gitignore
vendored
1
.gitignore
vendored
@ -119,3 +119,4 @@ dmypy.json
|
||||
.pyre/
|
||||
|
||||
# End of https://www.gitignore.io/api/django
|
||||
.idea/
|
@ -19,6 +19,7 @@ import store, front, doc
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
path('', include('front.urls'), name='front'),
|
||||
path('store/', include('store.urls'), name='store'),
|
||||
path('doc/', include('doc.urls'), name='doc'),
|
||||
|
@ -20,8 +20,8 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', TemplateView.as_view(template_name='store/index.html'), name='store_front_page'),
|
||||
path('login/', views.CustomLoginView.as_view(), name='login'),
|
||||
path('signup/', views.SignUpView.as_view(), name='signup'),
|
||||
path('logout/', LogoutView.as_view(), name='logout'),
|
||||
path('login/', views.CustomLoginView.as_view(), name='login_modal'),
|
||||
path('signup/', views.SignUpView.as_view(), name='signup_modal'),
|
||||
#path('logout/', LogoutView.as_view(), name='logout'),
|
||||
path('upload/', views.UploadView.as_view(), name='upload'),
|
||||
]
|
||||
|
@ -43,6 +43,8 @@
|
||||
</nav>
|
||||
{% block body %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
{% block footer %}
|
||||
{% include "base/legal.html" %}
|
||||
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
|
||||
<script src="{% static 'js/jquery.bootstrap.modal.forms.min.js' %}"></script>
|
||||
|
55
PDMI/templates/registration/login.html
Normal file
55
PDMI/templates/registration/login.html
Normal file
@ -0,0 +1,55 @@
|
||||
{% extends 'base/base.html' %}
|
||||
|
||||
{% block extra_static %}
|
||||
<style>
|
||||
body {
|
||||
margin: 50px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="row justify-content-center align-items-center">
|
||||
<div class="card col-md-4">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Login</h4>
|
||||
{% if form.errors %}
|
||||
<p>Your username and password didn't match. Please try again.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if next %}
|
||||
{% if user.is_authenticated %}
|
||||
<p>Your account doesn't have access to this page. To proceed,
|
||||
please login with an account that has access.</p>
|
||||
{% else %}
|
||||
<p>Please login to see this page.</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% url 'login' %}">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="{{ form.username.id_for_label }}">{{ form.username.label }}:</label>
|
||||
<input id="{{ form.username.id_for_label }}" type="text" class="form-control"
|
||||
name="{{ form.username.name }}" autofocus autocapitalize="none" autocomplete="username"
|
||||
required
|
||||
placeholder="Username">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="{{ form.password.id_for_label }}">{{ form.password.label }}:</label>
|
||||
<input id="{{ form.password.id_for_label }}" type="password" class="form-control"
|
||||
name="{{ form.password.name }}" required autocomplete="password"
|
||||
placeholder="Password">
|
||||
<a class="float-right" href="{% url 'password_reset' %}">Forgot?</a>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-primary" value="login">
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user