mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
first commit
This commit is contained in:
BIN
gestaoRaul/__pycache__/manage.cpython-310.pyc
Normal file
BIN
gestaoRaul/__pycache__/manage.cpython-310.pyc
Normal file
Binary file not shown.
0
gestaoRaul/categories/__init__.py
Normal file
0
gestaoRaul/categories/__init__.py
Normal file
BIN
gestaoRaul/categories/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/categories/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/categories/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestaoRaul/categories/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/categories/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestaoRaul/categories/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/categories/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestaoRaul/categories/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/categories/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/categories/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/categories/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestaoRaul/categories/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
gestaoRaul/categories/admin.py
Normal file
3
gestaoRaul/categories/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
gestaoRaul/categories/apps.py
Normal file
6
gestaoRaul/categories/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class CategoriesConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'categories'
|
||||
21
gestaoRaul/categories/migrations/0001_initial.py
Normal file
21
gestaoRaul/categories/migrations/0001_initial.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 00:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Category',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=255)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 01:01
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('categories', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameModel(
|
||||
old_name='Category',
|
||||
new_name='Categories',
|
||||
),
|
||||
]
|
||||
0
gestaoRaul/categories/migrations/__init__.py
Normal file
0
gestaoRaul/categories/migrations/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
gestaoRaul/categories/models.py
Normal file
10
gestaoRaul/categories/models.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class Categories(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
11
gestaoRaul/categories/templates/categories.html
Normal file
11
gestaoRaul/categories/templates/categories.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'title' %}
|
||||
Categorias{% endblock %}
|
||||
|
||||
{% block 'body' %}
|
||||
Body Type Pay
|
||||
{% endblock %}
|
||||
3
gestaoRaul/categories/tests.py
Normal file
3
gestaoRaul/categories/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
10
gestaoRaul/categories/urls.py
Normal file
10
gestaoRaul/categories/urls.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.categories, name='categories'),
|
||||
|
||||
|
||||
|
||||
]
|
||||
6
gestaoRaul/categories/views.py
Normal file
6
gestaoRaul/categories/views.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
|
||||
|
||||
def categories(request):
|
||||
return render(request, 'categories.html')
|
||||
0
gestaoRaul/clients/__init__.py
Normal file
0
gestaoRaul/clients/__init__.py
Normal file
BIN
gestaoRaul/clients/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/clients/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/clients/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestaoRaul/clients/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/clients/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestaoRaul/clients/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/clients/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestaoRaul/clients/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/clients/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/clients/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/clients/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestaoRaul/clients/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
gestaoRaul/clients/admin.py
Normal file
3
gestaoRaul/clients/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
gestaoRaul/clients/apps.py
Normal file
6
gestaoRaul/clients/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ClientsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'clients'
|
||||
23
gestaoRaul/clients/migrations/0001_initial.py
Normal file
23
gestaoRaul/clients/migrations/0001_initial.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 00:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Client',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('active', models.BooleanField(default=True)),
|
||||
('contact', models.CharField(blank=True, max_length=255, null=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
gestaoRaul/clients/migrations/__init__.py
Normal file
0
gestaoRaul/clients/migrations/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
8
gestaoRaul/clients/models.py
Normal file
8
gestaoRaul/clients/models.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
class Client(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=255)
|
||||
active = models.BooleanField(default=True)
|
||||
contact = models.CharField(max_length=255, null=True, blank=True)
|
||||
12
gestaoRaul/clients/templates/clients.html
Normal file
12
gestaoRaul/clients/templates/clients.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'title' %}
|
||||
Type Pay
|
||||
{% endblock %}
|
||||
|
||||
{% block 'body' %}
|
||||
Body Type Pay
|
||||
{% endblock %}
|
||||
3
gestaoRaul/clients/tests.py
Normal file
3
gestaoRaul/clients/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
10
gestaoRaul/clients/urls.py
Normal file
10
gestaoRaul/clients/urls.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
from django.urls import path, include
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.clients, name='clients'),
|
||||
|
||||
|
||||
|
||||
]
|
||||
6
gestaoRaul/clients/views.py
Normal file
6
gestaoRaul/clients/views.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def clients(request):
|
||||
return render(request, 'clients.html')
|
||||
0
gestaoRaul/comandas/__init__.py
Normal file
0
gestaoRaul/comandas/__init__.py
Normal file
BIN
gestaoRaul/comandas/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/comandas/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestaoRaul/comandas/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
gestaoRaul/comandas/admin.py
Normal file
3
gestaoRaul/comandas/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
gestaoRaul/comandas/apps.py
Normal file
6
gestaoRaul/comandas/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ComandasConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'comandas'
|
||||
30
gestaoRaul/comandas/migrations/0001_initial.py
Normal file
30
gestaoRaul/comandas/migrations/0001_initial.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 01:19
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('clients', '0001_initial'),
|
||||
('mesas', '0001_initial'),
|
||||
('typePay', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Comanda',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('dt_open', models.DateTimeField(auto_now_add=True)),
|
||||
('dt_close', models.DateTimeField(blank=True, null=True)),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('client', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='clients.client')),
|
||||
('mesa', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mesas.mesa')),
|
||||
('type_pay', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='typePay.typepay')),
|
||||
],
|
||||
),
|
||||
]
|
||||
25
gestaoRaul/comandas/migrations/0002_productcomanda.py
Normal file
25
gestaoRaul/comandas/migrations/0002_productcomanda.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 01:20
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('comandas', '0001_initial'),
|
||||
('products', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ProductComanda',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('data_time', models.DateTimeField(auto_now_add=True)),
|
||||
('applicant', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('comanda', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='comandas.comanda')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.product')),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
gestaoRaul/comandas/migrations/__init__.py
Normal file
0
gestaoRaul/comandas/migrations/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
23
gestaoRaul/comandas/models.py
Normal file
23
gestaoRaul/comandas/models.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from django.db import models
|
||||
|
||||
from clients.models import Client
|
||||
from products.models import Product
|
||||
from mesas.models import Mesa
|
||||
from typePay.models import TypePay
|
||||
|
||||
# Create your models here.
|
||||
class Comanda(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
mesa = models.ForeignKey(Mesa, on_delete=models.CASCADE)
|
||||
type_pay = models.ForeignKey(TypePay, on_delete=models.SET_NULL, null=True)
|
||||
dt_open = models.DateTimeField(auto_now_add=True)
|
||||
dt_close = models.DateTimeField(null=True, blank=True)
|
||||
client = models.ForeignKey(Client, on_delete=models.SET_NULL, null=True, blank=True)
|
||||
name = models.CharField(max_length=255)
|
||||
|
||||
class ProductComanda(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
comanda = models.ForeignKey(Comanda, on_delete=models.CASCADE)
|
||||
data_time = models.DateTimeField(auto_now_add=True)
|
||||
product = models.ForeignKey(Product, on_delete=models.CASCADE)
|
||||
applicant = models.CharField(max_length=255, null=True, blank=True)
|
||||
12
gestaoRaul/comandas/templates/comandas.html
Normal file
12
gestaoRaul/comandas/templates/comandas.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'title' %}
|
||||
Type Pay
|
||||
{% endblock %}
|
||||
|
||||
{% block 'body' %}
|
||||
Body Type Pay
|
||||
{% endblock %}
|
||||
3
gestaoRaul/comandas/tests.py
Normal file
3
gestaoRaul/comandas/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
10
gestaoRaul/comandas/urls.py
Normal file
10
gestaoRaul/comandas/urls.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.comandas, name='comandas'),
|
||||
|
||||
|
||||
|
||||
]
|
||||
6
gestaoRaul/comandas/views.py
Normal file
6
gestaoRaul/comandas/views.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def comandas(request):
|
||||
return render(request, 'comandas.html')
|
||||
BIN
gestaoRaul/db.sqlite3
Normal file
BIN
gestaoRaul/db.sqlite3
Normal file
Binary file not shown.
0
gestaoRaul/gestaoRaul/__init__.py
Normal file
0
gestaoRaul/gestaoRaul/__init__.py
Normal file
BIN
gestaoRaul/gestaoRaul/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/gestaoRaul/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/gestaoRaul/__pycache__/settings.cpython-310.pyc
Normal file
BIN
gestaoRaul/gestaoRaul/__pycache__/settings.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/gestaoRaul/__pycache__/wsgi.cpython-310.pyc
Normal file
BIN
gestaoRaul/gestaoRaul/__pycache__/wsgi.cpython-310.pyc
Normal file
Binary file not shown.
16
gestaoRaul/gestaoRaul/asgi.py
Normal file
16
gestaoRaul/gestaoRaul/asgi.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
ASGI config for gestaoRaul project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.1/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gestaoRaul.settings')
|
||||
|
||||
application = get_asgi_application()
|
||||
135
gestaoRaul/gestaoRaul/settings.py
Normal file
135
gestaoRaul/gestaoRaul/settings.py
Normal file
@@ -0,0 +1,135 @@
|
||||
"""
|
||||
Django settings for gestaoRaul project.
|
||||
|
||||
Generated by 'django-admin startproject' using Django 5.1.4.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.1/topics/settings/
|
||||
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/5.1/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-mqcnrs5!hc6bj$�@@9d8^2@x#w&$qhk3vlr5_)3znd9h6&d8'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'products',
|
||||
'mesas',
|
||||
'typePay',
|
||||
'clients',
|
||||
'comandas',
|
||||
'categories',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'gestaoRaul.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||
'DIRS': [os.path.join(BASE_DIR, 'templates'),],
|
||||
'APP_DIRS': True,
|
||||
'OPTIONS': {
|
||||
'context_processors': [
|
||||
'django.template.context_processors.debug',
|
||||
'django.template.context_processors.request',
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'gestaoRaul.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': BASE_DIR / 'db.sqlite3',
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/5.1/topics/i18n/
|
||||
|
||||
LANGUAGE_CODE = 'pt-BR'
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'templates/static'),)
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
30
gestaoRaul/gestaoRaul/urls.py
Normal file
30
gestaoRaul/gestaoRaul/urls.py
Normal file
@@ -0,0 +1,30 @@
|
||||
"""
|
||||
URL configuration for gestaoRaul project.
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
https://docs.djangoproject.com/en/5.1/topics/http/urls/
|
||||
Examples:
|
||||
Function views
|
||||
1. Add an import: from my_app import views
|
||||
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
||||
Class-based views
|
||||
1. Add an import: from other_app.views import Home
|
||||
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
||||
Including another URLconf
|
||||
1. Import the include() function: from django.urls import include, path
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('products/', include('products.urls')),
|
||||
path('mesas/', include('mesas.urls')),
|
||||
path('typePay/', include('typePay.urls')),
|
||||
path('clients/', include('clients.urls')),
|
||||
path('comandas/', include('comandas.urls')),
|
||||
path('categories/', include('categories.urls')),
|
||||
|
||||
|
||||
]
|
||||
16
gestaoRaul/gestaoRaul/wsgi.py
Normal file
16
gestaoRaul/gestaoRaul/wsgi.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
WSGI config for gestaoRaul project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/5.1/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gestaoRaul.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
22
gestaoRaul/manage.py
Normal file
22
gestaoRaul/manage.py
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gestaoRaul.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
0
gestaoRaul/mesas/__init__.py
Normal file
0
gestaoRaul/mesas/__init__.py
Normal file
BIN
gestaoRaul/mesas/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/mesas/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/mesas/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/mesas/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/mesas/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/mesas/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
gestaoRaul/mesas/admin.py
Normal file
3
gestaoRaul/mesas/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
gestaoRaul/mesas/apps.py
Normal file
6
gestaoRaul/mesas/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class MesasConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'mesas'
|
||||
23
gestaoRaul/mesas/migrations/0001_initial.py
Normal file
23
gestaoRaul/mesas/migrations/0001_initial.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 00:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Mesa',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('location', models.CharField(blank=True, max_length=255, null=True)),
|
||||
('active', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
gestaoRaul/mesas/migrations/__init__.py
Normal file
0
gestaoRaul/mesas/migrations/__init__.py
Normal file
Binary file not shown.
BIN
gestaoRaul/mesas/migrations/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/mesas/migrations/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
13
gestaoRaul/mesas/models.py
Normal file
13
gestaoRaul/mesas/models.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
from django.db import models
|
||||
|
||||
class Mesa(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=100)
|
||||
location = models.CharField(max_length=255, null=True, blank=True)
|
||||
active = models.BooleanField(default=False)
|
||||
|
||||
# Foreign Key to Comandas model (assuming it exists)
|
||||
# comanda = models.ForeignKey('Comandas', on_delete=models.DO_NOTHING, db_column='id_mesa')
|
||||
56
gestaoRaul/mesas/templates/mesas.html
Normal file
56
gestaoRaul/mesas/templates/mesas.html
Normal file
@@ -0,0 +1,56 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
|
||||
|
||||
{% block 'head' %}
|
||||
<link rel="stylesheet" href="{% static 'mesas/css/mesas.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block 'title' %}
|
||||
RRB&C - Mesas
|
||||
{% endblock %}
|
||||
|
||||
{% block 'body' %}
|
||||
|
||||
<body>
|
||||
<div class="grid-container">
|
||||
<div class="card">{{nome}} 1</div>
|
||||
<div class="card">Card 2</div>
|
||||
<div class="card">Card 3</div>
|
||||
<div class="card">Card 4</div>
|
||||
<div class="card">Card 5</div>
|
||||
<div class="card">Card 6</div>
|
||||
<div class="card">Card 7</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
<div class="card">Card 8</div>
|
||||
<div class="card">Card 9</div>
|
||||
<div class="card">Card 10</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
3
gestaoRaul/mesas/tests.py
Normal file
3
gestaoRaul/mesas/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
10
gestaoRaul/mesas/urls.py
Normal file
10
gestaoRaul/mesas/urls.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.mesas, name='mesas'),
|
||||
|
||||
|
||||
|
||||
]
|
||||
6
gestaoRaul/mesas/views.py
Normal file
6
gestaoRaul/mesas/views.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
|
||||
def mesas(request):
|
||||
return render(request, 'mesas.html')
|
||||
0
gestaoRaul/products/__init__.py
Normal file
0
gestaoRaul/products/__init__.py
Normal file
BIN
gestaoRaul/products/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestaoRaul/products/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/products/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestaoRaul/products/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/products/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestaoRaul/products/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/products/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestaoRaul/products/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/products/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestaoRaul/products/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestaoRaul/products/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestaoRaul/products/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
3
gestaoRaul/products/admin.py
Normal file
3
gestaoRaul/products/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
gestaoRaul/products/apps.py
Normal file
6
gestaoRaul/products/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ProductsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'products'
|
||||
27
gestaoRaul/products/migrations/0001_initial.py
Normal file
27
gestaoRaul/products/migrations/0001_initial.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 5.1.4 on 2024-12-10 01:18
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('categories', '0002_rename_category_categories'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Product',
|
||||
fields=[
|
||||
('id', models.AutoField(primary_key=True, serialize=False)),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('price', models.DecimalField(decimal_places=2, max_digits=10)),
|
||||
('active', models.BooleanField(default=True)),
|
||||
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='categories.categories')),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
gestaoRaul/products/migrations/__init__.py
Normal file
0
gestaoRaul/products/migrations/__init__.py
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user