first commit
This commit is contained in:
0
Base/__init__.py
Normal file
0
Base/__init__.py
Normal file
BIN
Base/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
Base/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
Base/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/admin.cpython-312.pyc
Normal file
BIN
Base/__pycache__/admin.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/admin.cpython-313.pyc
Normal file
BIN
Base/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/apps.cpython-312.pyc
Normal file
BIN
Base/__pycache__/apps.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/apps.cpython-313.pyc
Normal file
BIN
Base/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/models.cpython-312.pyc
Normal file
BIN
Base/__pycache__/models.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/models.cpython-313.pyc
Normal file
BIN
Base/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/urls.cpython-312.pyc
Normal file
BIN
Base/__pycache__/urls.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/urls.cpython-313.pyc
Normal file
BIN
Base/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
Base/__pycache__/views.cpython-312.pyc
Normal file
BIN
Base/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
3
Base/admin.py
Normal file
3
Base/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
Base/apps.py
Normal file
6
Base/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class BaseConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'Base'
|
||||
0
Base/migrations/__init__.py
Normal file
0
Base/migrations/__init__.py
Normal file
BIN
Base/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
Base/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
Base/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
3
Base/models.py
Normal file
3
Base/models.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
11
Base/templates/Login/Dashboard.html
Normal file
11
Base/templates/Login/Dashboard.html
Normal 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 %}
|
||||
5
Base/templates/Login/Home.html
Normal file
5
Base/templates/Login/Home.html
Normal 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
3
Base/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
14
Base/urls.py
Normal file
14
Base/urls.py
Normal 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'),
|
||||
]
|
||||
BIN
Base/views/__pycache__/views.cpython-312.pyc
Normal file
BIN
Base/views/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Base/views/__pycache__/views.cpython-313.pyc
Normal file
BIN
Base/views/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
21
Base/views/views.py
Normal file
21
Base/views/views.py
Normal 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
|
||||
Reference in New Issue
Block a user