beta v.1.1

This commit is contained in:
2025-10-12 10:03:31 -03:00
parent c476b0171f
commit 4c05c3b6af
39 changed files with 410 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,11 @@
{% extends "BaseLogin.html" %}
{% block title %} Dashboard {% endblock %}
{% block content %}
<div class="row">
<div class="col-12">
<h1> {{ Day }} </h1>
</div>
</div>
<br>
{% endblock %}

View File

@@ -0,0 +1,5 @@
{% extends "Base.html" %}
{% block title %} Home {% endblock %}
{% block content %}
<p class="text-center"> Home </p>
{% endblock %}

14
Base/urls.py Normal file
View File

@@ -0,0 +1,14 @@
from django.urls import path
from django.contrib.auth import views as auth_views
from Base.views import (
views,
)
urlpatterns = [
# base das URLs
path('', views.Home, name='Home'),
path('login/', auth_views.LoginView.as_view(), name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
path('dashboard', views.Dashboard.as_view(), name='Dashboard'),
]

View File

@@ -1,3 +0,0 @@
from django.shortcuts import render
# Create your views here.

Binary file not shown.

21
Base/views/views.py Normal file
View File

@@ -0,0 +1,21 @@
from django.shortcuts import render
from django.views.generic import TemplateView
from django.contrib.auth.mixins import LoginRequiredMixin #, PermissionRequiredMixin
from django.utils import timezone
# Create your views here.
def Home(request):
context = { 'ok':'ok', }
return render(request,'Login/Home.html',context )
class Dashboard(LoginRequiredMixin, TemplateView):
template_name = 'Login/Dashboard.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
Day = timezone.localtime(timezone.now())
context['User'] = self.request.user.username.capitalize()
context['Day'] = Day
return context