add login page

This commit is contained in:
Alejandro Diaz 2023-09-11 01:59:25 -06:00
parent c4f9788d37
commit 8110371a94
7 changed files with 44 additions and 15 deletions

View file

@ -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
View file

@ -0,0 +1,7 @@
from django.urls import path
from .views import home
urlpatterns = [
path('', home, name='home'),
]

View file

@ -1,3 +1,7 @@
from django.shortcuts import render
# Create your views here.
def home(request):
return render(request, 'home.html')