add login page
This commit is contained in:
parent
c4f9788d37
commit
8110371a94
7 changed files with 44 additions and 15 deletions
|
@ -1,8 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
{% block title %} Scholar Clubs {% endblock title%}
|
||||
{% block title %} Home Manager {% endblock title%}
|
||||
{% block content %}
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-4">Welcome</h1>
|
||||
</div>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
<div class="jumbotron">
|
||||
<h1 class="display-4">Welcome {{ user.username }}</h1>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'login' %}">Log In</a>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
7
ui/main/urls.py
Normal file
7
ui/main/urls.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from django.urls import path
|
||||
|
||||
from .views import home
|
||||
|
||||
urlpatterns = [
|
||||
path('', home, name='home'),
|
||||
]
|
|
@ -1,3 +1,7 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def home(request):
|
||||
return render(request, 'home.html')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue