first commit

This commit is contained in:
2025-10-12 14:45:18 +00:00
commit 6e7348359f
183 changed files with 32396 additions and 0 deletions

0
Base/__init__.py Normal file
View File

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

3
Base/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
Base/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class BaseConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'Base'

View File

Binary file not shown.

Binary file not shown.

3
Base/models.py Normal file
View File

@@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

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 %}

3
Base/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

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'),
]

Binary file not shown.

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