diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6b02e10
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+# created by virtualenv automatically
+.venv
+venv
+.idea
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..13566b8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/WevertonOrg.iml b/.idea/WevertonOrg.iml
new file mode 100644
index 0000000..7be685c
--- /dev/null
+++ b/.idea/WevertonOrg.iml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..9275f25
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..b1cb7be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Base/__pycache__/__init__.cpython-312.pyc b/Base/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..16f5411
Binary files /dev/null and b/Base/__pycache__/__init__.cpython-312.pyc differ
diff --git a/Base/__pycache__/admin.cpython-312.pyc b/Base/__pycache__/admin.cpython-312.pyc
new file mode 100644
index 0000000..bb4ed3c
Binary files /dev/null and b/Base/__pycache__/admin.cpython-312.pyc differ
diff --git a/Base/__pycache__/apps.cpython-312.pyc b/Base/__pycache__/apps.cpython-312.pyc
new file mode 100644
index 0000000..67b8ec2
Binary files /dev/null and b/Base/__pycache__/apps.cpython-312.pyc differ
diff --git a/Base/__pycache__/models.cpython-312.pyc b/Base/__pycache__/models.cpython-312.pyc
new file mode 100644
index 0000000..513c703
Binary files /dev/null and b/Base/__pycache__/models.cpython-312.pyc differ
diff --git a/Base/__pycache__/urls.cpython-312.pyc b/Base/__pycache__/urls.cpython-312.pyc
new file mode 100644
index 0000000..fc156ad
Binary files /dev/null and b/Base/__pycache__/urls.cpython-312.pyc differ
diff --git a/Base/__pycache__/views.cpython-312.pyc b/Base/__pycache__/views.cpython-312.pyc
new file mode 100644
index 0000000..2801d29
Binary files /dev/null and b/Base/__pycache__/views.cpython-312.pyc differ
diff --git a/Base/migrations/__pycache__/__init__.cpython-312.pyc b/Base/migrations/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..fcf7171
Binary files /dev/null and b/Base/migrations/__pycache__/__init__.cpython-312.pyc differ
diff --git a/Base/templates/Login/Dashboard.html b/Base/templates/Login/Dashboard.html
new file mode 100644
index 0000000..12cf799
--- /dev/null
+++ b/Base/templates/Login/Dashboard.html
@@ -0,0 +1,11 @@
+{% extends "BaseLogin.html" %}
+{% block title %} Dashboard {% endblock %}
+{% block content %}
+
+
+
+{% endblock %}
diff --git a/Base/templates/Login/Home.html b/Base/templates/Login/Home.html
new file mode 100644
index 0000000..7f7eb87
--- /dev/null
+++ b/Base/templates/Login/Home.html
@@ -0,0 +1,5 @@
+{% extends "Base.html" %}
+{% block title %} Home {% endblock %}
+{% block content %}
+ Home
+{% endblock %}
\ No newline at end of file
diff --git a/Base/urls.py b/Base/urls.py
new file mode 100644
index 0000000..e43ef49
--- /dev/null
+++ b/Base/urls.py
@@ -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'),
+]
\ No newline at end of file
diff --git a/Base/views.py b/Base/views.py
deleted file mode 100644
index 91ea44a..0000000
--- a/Base/views.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.shortcuts import render
-
-# Create your views here.
diff --git a/Base/views/__pycache__/views.cpython-312.pyc b/Base/views/__pycache__/views.cpython-312.pyc
new file mode 100644
index 0000000..a2ff4f7
Binary files /dev/null and b/Base/views/__pycache__/views.cpython-312.pyc differ
diff --git a/Base/views/views.py b/Base/views/views.py
new file mode 100644
index 0000000..8c4181b
--- /dev/null
+++ b/Base/views/views.py
@@ -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
diff --git a/Setup/__pycache__/__init__.cpython-312.pyc b/Setup/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000..94b147d
Binary files /dev/null and b/Setup/__pycache__/__init__.cpython-312.pyc differ
diff --git a/Setup/__pycache__/settings.cpython-312.pyc b/Setup/__pycache__/settings.cpython-312.pyc
new file mode 100644
index 0000000..c0acffe
Binary files /dev/null and b/Setup/__pycache__/settings.cpython-312.pyc differ
diff --git a/Setup/__pycache__/urls.cpython-312.pyc b/Setup/__pycache__/urls.cpython-312.pyc
new file mode 100644
index 0000000..b3db99d
Binary files /dev/null and b/Setup/__pycache__/urls.cpython-312.pyc differ
diff --git a/Setup/__pycache__/wsgi.cpython-312.pyc b/Setup/__pycache__/wsgi.cpython-312.pyc
new file mode 100644
index 0000000..1a42bec
Binary files /dev/null and b/Setup/__pycache__/wsgi.cpython-312.pyc differ
diff --git a/Setup/settings.py b/Setup/settings.py
index a4eb51e..0c0b4a4 100644
--- a/Setup/settings.py
+++ b/Setup/settings.py
@@ -25,7 +25,7 @@ SECRET_KEY = 'django-insecure-as6)9knap6(+0)#l=h&aq8j&dyjb9w0ao_uv(&q4epoccp6c&0
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
-ALLOWED_HOSTS = ['192.168.0.201','weverton.org']
+ALLOWED_HOSTS = ['127.0.0.1','192.168.0.201','weverton.org']
# Application definition
@@ -37,6 +37,8 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+ #Apps
+ 'Base',
]
MIDDLEWARE = [
@@ -54,7 +56,7 @@ ROOT_URLCONF = 'Setup.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
+ 'DIRS': ['Templates'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -102,9 +104,9 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/5.2/topics/i18n/
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'pt-br'
-TIME_ZONE = 'UTC'
+TIME_ZONE = 'America/Sao_Paulo'
USE_I18N = True
@@ -115,12 +117,16 @@ USE_TZ = True
# https://docs.djangoproject.com/en/5.2/howto/static-files/
STATIC_URL = 'static/'
+STATIC_ROOT = BASE_DIR / 'static'
+MEDIA_URL = '/media/'
+MEDIA_ROOT = BASE_DIR / 'media'
# Default primary key field type
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
-STATIC_ROOT = BASE_DIR / 'static'
-MEDIA_URL = '/media/'
-MEDIA_ROOT = BASE_DIR / 'media'
+#Login
+LOGIN_URL = 'login'
+LOGIN_REDIRECT_URL = '/dashboard'
+LOGOUT_REDIRECT_URL = '/login'
\ No newline at end of file
diff --git a/Setup/urls.py b/Setup/urls.py
index 7c55304..9c10547 100644
--- a/Setup/urls.py
+++ b/Setup/urls.py
@@ -15,8 +15,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
-from django.urls import path
+from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
+ path('', include('Base.urls')),
]
diff --git a/Templates/403.html b/Templates/403.html
new file mode 100644
index 0000000..964234f
--- /dev/null
+++ b/Templates/403.html
@@ -0,0 +1,7 @@
+{% extends "BaseLogin.html" %}
+{% block title %} Dashboard {% endblock %}
+{% block content %}
+
+ Erro 403
+
+{% endblock %}
\ No newline at end of file
diff --git a/Templates/404.html b/Templates/404.html
new file mode 100644
index 0000000..fab86fa
--- /dev/null
+++ b/Templates/404.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Não Encontrado
+
+
+ Algo deu ruim ai .
+ Home
+
+
\ No newline at end of file
diff --git a/Templates/Base.html b/Templates/Base.html
new file mode 100644
index 0000000..e627969
--- /dev/null
+++ b/Templates/Base.html
@@ -0,0 +1,25 @@
+
+
+
+
+ {% block title %} {% endblock %}
+
+
+
+
+
+
+ {% include 'components/_header.html' %}
+
+ {% block content %}
+ {% endblock %}
+
+ {% include 'components/_footer.html' %}
+
+
+
+
\ No newline at end of file
diff --git a/Templates/BaseLogin.html b/Templates/BaseLogin.html
new file mode 100644
index 0000000..b62ebc9
--- /dev/null
+++ b/Templates/BaseLogin.html
@@ -0,0 +1,43 @@
+
+
+
+
+ {% block title %} {% endblock %}
+
+
+
+
+
+
+ {% include 'components/_header.html' %}
+
+
+ {% include 'components/_sidebar.html' %}
+
+{# {% include 'components/_sidebar_admin.html' %}#}
+
+
+
+
+
+ {% include 'components/_msg.html' %}
+ {% block content %}
+ {% endblock %}
+
+
+
+
+
+ {% include 'components/_footer.html' %}
+
+
+
+
\ No newline at end of file
diff --git a/Templates/components/_footer.html b/Templates/components/_footer.html
new file mode 100644
index 0000000..08d87c6
--- /dev/null
+++ b/Templates/components/_footer.html
@@ -0,0 +1,12 @@
+
+
\ No newline at end of file
diff --git a/Templates/components/_header.html b/Templates/components/_header.html
new file mode 100644
index 0000000..305f367
--- /dev/null
+++ b/Templates/components/_header.html
@@ -0,0 +1,34 @@
+{% load tz %}
+
+
+
+
+ {% if not user.is_authenticated %}
+
Wevertom
+ {% endif %}
+ {% if user.is_authenticated %}
+
Weverton
+ {% endif %}
+
+
+ Hoje dia {% now "d" %} de {% now "F" %} de {% now "Y" %} ({% now "d/m/Y" %})
+
+
+
+ {% if not user.is_authenticated %}
+
+ Login
+
+ {% endif %}
+ {% if user.is_authenticated %}
+
+ Ola, {{ user.username.capitalize }}
+
+
+ {% endif %}
+
+
+
\ No newline at end of file
diff --git a/Templates/components/_msg.html b/Templates/components/_msg.html
new file mode 100644
index 0000000..538e3bf
--- /dev/null
+++ b/Templates/components/_msg.html
@@ -0,0 +1,17 @@
+{% if messages %}
+ {% for message in messages %}
+
+ {{ message }}
+
+ {% endfor %}
+{% endif %}
+
+
\ No newline at end of file
diff --git a/Templates/components/_pagination.html b/Templates/components/_pagination.html
new file mode 100644
index 0000000..d4b587d
--- /dev/null
+++ b/Templates/components/_pagination.html
@@ -0,0 +1,49 @@
+{% if page_obj.has_other_pages %}
+
+
+
+{% endif %}
\ No newline at end of file
diff --git a/Templates/components/_sidebar.html b/Templates/components/_sidebar.html
new file mode 100644
index 0000000..6f98c69
--- /dev/null
+++ b/Templates/components/_sidebar.html
@@ -0,0 +1,10 @@
+{% if user.is_authenticated %}
+
+{% endif %}
diff --git a/Templates/components/_sidebar_admin.html b/Templates/components/_sidebar_admin.html
new file mode 100644
index 0000000..f1d93c3
--- /dev/null
+++ b/Templates/components/_sidebar_admin.html
@@ -0,0 +1,29 @@
+{% if user.is_authenticated %}
+ {% if user.is_superuser %}
+
+
+ {% if user.is_superuser %}
+
Dashboard Admin {% endif %}
+ {% if user.is_superuser %}
+
Dashboard Test {% endif %}
+
+ {% if perms.Base.view_bankaccount %}
+
Banks {% endif %}
+ {% if perms.Movement.view_paymentmethod %}
+
Metodos de Pag. {% endif %}
+ {% if perms.Base.view_product %}
+
Lista de Produtos {% endif %}
+ {% if perms.Base.view_professional %}
+
Professional {% endif %}
+ {% if perms.Calendar.view_time %}
+
Horarios {% endif %}
+ {% if perms.Base.view_service %}
+
Lista de Service {% endif %}
+ {% if perms.Movement.view_expensemovementt %}
+
Lista de Despesa {% endif %}
+
+
+ {% endif %}
+{% endif %}
\ No newline at end of file
diff --git a/Templates/registration/login.html b/Templates/registration/login.html
new file mode 100644
index 0000000..339d5b0
--- /dev/null
+++ b/Templates/registration/login.html
@@ -0,0 +1,44 @@
+{% extends 'Base.html' %}
+{% block title %}Login{% endblock %}
+
+{% block content %}
+
+
+
+
+
+
Login
+
+ {% if form.errors %}
+
+
+ {% for field in form %}
+ {% for error in field.errors %}
+ {{ error }}
+ {% endfor %}
+ {% endfor %}
+ {% for error in form.non_field_errors %}
+ {{ error }}
+ {% endfor %}
+
+
+ {% endif %}
+
+
+
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/db.sqlite3 b/db.sqlite3
new file mode 100644
index 0000000..b15468a
Binary files /dev/null and b/db.sqlite3 differ
diff --git a/requirements_win.txt b/requirements_win.txt
new file mode 100644
index 0000000..0792fb1
Binary files /dev/null and b/requirements_win.txt differ