mirror of
https://github.com/welton89/RRBEC.git
synced 2026-06-03 15:57:23 +00:00
Compare commits
7 Commits
6c4e95e579
...
api
| Author | SHA1 | Date | |
|---|---|---|---|
| dfe0894305 | |||
| df83dac830 | |||
| aec59990a7 | |||
| 47821c4f71 | |||
| 405033d1bf | |||
| 19c6fe2ad8 | |||
| b73ba1ef10 |
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
FROM python:3
|
||||||
|
|
||||||
|
RUN git clone https://github.com/welton89/RRBEC.git
|
||||||
|
RUN cd RRBEC
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt ./
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN python gestaoRaul/manage.py collectstatic --noinput
|
||||||
|
|
||||||
|
# RUN python gestaoRaul/manage.py migrate --noinput
|
||||||
|
WORKDIR /app/gestaoRaul
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CMD [ "gunicorn", "-w", "4", "--timeout", "15", "gestaoRaul.wsgi:application", "--bind", "0.0.0.0:8000" ]
|
||||||
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
# Guia de Sincronização: Django <-> Middleware Go
|
|
||||||
|
|
||||||
Este documento descreve o funcionamento do sistema de **ChangeLog** implementado no Django para permitir que o middleware em Go mantenha uma cópia local (local-first) dos dados de forma eficiente.
|
|
||||||
|
|
||||||
## 1. Funcionamento Técnico
|
|
||||||
|
|
||||||
### Rastreamento de Mudanças (Django Signals)
|
|
||||||
Foi criada uma aplicação chamada `sync` que utiliza **Django Signals**. Sempre que um dos modelos abaixo é criado, editado ou excluído, uma entrada é gerada automaticamente na tabela `ChangeLog`:
|
|
||||||
|
|
||||||
- `Product`
|
|
||||||
- `Comanda`
|
|
||||||
- `ProductComanda`
|
|
||||||
- `Order`
|
|
||||||
- `Client`
|
|
||||||
- `Categories`
|
|
||||||
- `Mesa`
|
|
||||||
- `Payments`
|
|
||||||
|
|
||||||
### Tabela de Log (`ChangeLog`)
|
|
||||||
Cada registro no log contém:
|
|
||||||
- `id`: Identificador sequencial da mudança.
|
|
||||||
- `model_name`: Nome do modelo (ex: "Product").
|
|
||||||
- `object_id`: ID do objeto que mudou.
|
|
||||||
- `action`: "SAVE" (para criação/edição) ou "DELETE".
|
|
||||||
- `timestamp`: Quando a mudança ocorreu.
|
|
||||||
|
|
||||||
## 2. API de Sincronização
|
|
||||||
|
|
||||||
O middleware Go deve consumir o seguinte endpoint:
|
|
||||||
|
|
||||||
**Endpoint:** `GET /api/v1/sync/`
|
|
||||||
|
|
||||||
### Parâmetros:
|
|
||||||
- `since_id` (opcional): Retorna apenas mudanças com ID maior que este valor.
|
|
||||||
|
|
||||||
### Exemplo de Fluxo no Go:
|
|
||||||
|
|
||||||
1. **Estado Inicial**: O Go armazena o `last_sync_id` (começando em 0).
|
|
||||||
2. **Polling**: De tempos em tempos (ex: a cada 5 segundos), o Go chama:
|
|
||||||
`GET http://seu-servidor/api/v1/sync/?since_id=100` (supondo que o último ID processado foi 100).
|
|
||||||
3. **Processamento**:
|
|
||||||
- O Django retorna uma lista de mudanças (ex: IDs 101, 102, 103).
|
|
||||||
- Para cada mudança `SAVE` no log, o Go deve fazer um `GET` no endpoint específico do modelo para buscar os dados atualizados:
|
|
||||||
- Se `model_name == "Product"`, buscar em `GET /api/v1/products/{object_id}/`.
|
|
||||||
- Para cada mudança `DELETE`, o Go deve remover o item correspondente do seu banco de dados local.
|
|
||||||
4. **Atualização**: O Go atualiza seu `last_sync_id` para o maior ID recebido (neste caso, 103).
|
|
||||||
|
|
||||||
## 3. Vantagens
|
|
||||||
- **Performance**: O Go não precisa baixar todos os produtos/pedidos toda vez. Ele só baixa o que realmente mudou.
|
|
||||||
- **Detecção de Deleção**: O sistema informa explicitamente o que foi apagado no Django.
|
|
||||||
- **Resiliência**: Se a conexão cair, ao reconectar, o Go apenas retoma a partir do último ID que ele conhece, garantindo que nenhuma mudança seja perdida.
|
|
||||||
|
|
||||||
---
|
|
||||||
*Configurado em: 28 de Março de 2026*
|
|
||||||
22
docker-compose.yml
Normal file
22
docker-compose.yml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
django_app:
|
||||||
|
image: python:3.12-slim
|
||||||
|
container_name: rrbec_api_django
|
||||||
|
ports:
|
||||||
|
- "8069:8000"
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
environment:
|
||||||
|
- DEBUG=True
|
||||||
|
- ALLOWED_HOSTS=raulrockbar.com.br,api.raulrockbar.com.br
|
||||||
|
- CSRF_TRUSTED_ORIGINS=https://raulrockbar.com.br,https://api.raulrockbar.com.br
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- /DATA/AppData/rrbec-api-django:/app
|
||||||
|
- /DATA/AppData/rrbec-api-django/static:/app/static
|
||||||
|
- /DATA/AppData/rrbec-api-django/db:/app/db
|
||||||
|
|
||||||
|
working_dir: /app
|
||||||
|
command: ["/bin/sh", "-c", "apt-get update && apt-get install -y git && rm -rf app_clone && git clone --branch api --depth 1 https://github.com/welton89/RRBEC.git app_clone && cp -r app_clone/* . && rm -rf app_clone && pip install -r requirements.txt && python manage.py collectstatic --noinput && python manage.py migrate --noinput && gunicorn gestaoRaul.wsgi:application --bind 0.0.0.0:8000"]
|
||||||
@@ -17,12 +17,12 @@ from dotenv import load_dotenv
|
|||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
DB_ENGINE = os.getenv('DB_ENGINE')
|
DB_ENGINE = os.getenv("DB_ENGINE")
|
||||||
DB_HOST = os.getenv('DB_HOST')
|
DB_HOST = os.getenv("DB_HOST")
|
||||||
DB_PORT = os.getenv('DB_PORT')
|
DB_PORT = os.getenv("DB_PORT")
|
||||||
DB_NAME = os.getenv('DB_NAME')
|
DB_NAME = os.getenv("DB_NAME")
|
||||||
DB_USER = os.getenv('DB_USER')
|
DB_USER = os.getenv("DB_USER")
|
||||||
DB_PASSWORD = os.getenv('DB_PASSWORD')
|
DB_PASSWORD = os.getenv("DB_PASSWORD")
|
||||||
|
|
||||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
@@ -32,81 +32,93 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/5.1/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = os.getenv('SECRET_KEY', 'django-insecure-mqcnrs5!hc6bj$�@@9d8^2@x#w&$qhk3vlr5_)3znd9h6&d8')
|
SECRET_KEY = os.getenv(
|
||||||
|
"SECRET_KEY", "django-insecure-mqcnrs5!hc6bj$�@@9d8^2@x#w&$qhk3vlr5_)3znd9h6&d8"
|
||||||
|
)
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "*").split(",")
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = os.getenv('DEBUG', 'True') == 'True'
|
DEBUG = os.getenv("DEBUG", "True") == "True"
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
CSRF_TRUSTED_ORIGINS = (
|
||||||
|
os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
|
||||||
|
if os.getenv("CSRF_TRUSTED_ORIGINS")
|
||||||
|
else []
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
'django.contrib.admin',
|
"django.contrib.admin",
|
||||||
'django.contrib.auth',
|
"django.contrib.auth",
|
||||||
'django.contrib.contenttypes',
|
"django.contrib.contenttypes",
|
||||||
'django.contrib.sessions',
|
"django.contrib.sessions",
|
||||||
'django.contrib.messages',
|
"django.contrib.messages",
|
||||||
'django.contrib.staticfiles',
|
"django.contrib.staticfiles",
|
||||||
'products',
|
"products",
|
||||||
'mesas',
|
"mesas",
|
||||||
'typePay',
|
"typePay",
|
||||||
'clients',
|
"clients",
|
||||||
'comandas',
|
"comandas",
|
||||||
'categories',
|
"categories",
|
||||||
'home',
|
"home",
|
||||||
'payments',
|
"payments",
|
||||||
'balcao',
|
"balcao",
|
||||||
'orders',
|
"orders",
|
||||||
'login',
|
"login",
|
||||||
'sync',
|
"sync",
|
||||||
'django_extensions',
|
"django_extensions",
|
||||||
'pwa',
|
"pwa",
|
||||||
'rest_framework',
|
"rest_framework",
|
||||||
'corsheaders',
|
"corsheaders",
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'corsheaders.middleware.CorsMiddleware',
|
"corsheaders.middleware.CorsMiddleware",
|
||||||
'django.middleware.security.SecurityMiddleware',
|
"django.middleware.security.SecurityMiddleware",
|
||||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||||
'django.middleware.common.CommonMiddleware',
|
"django.middleware.common.CommonMiddleware",
|
||||||
'django.middleware.csrf.CsrfViewMiddleware',
|
"django.middleware.csrf.CsrfViewMiddleware",
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
"django.contrib.auth.middleware.AuthenticationMiddleware",
|
||||||
'django.contrib.messages.middleware.MessageMiddleware',
|
"django.contrib.messages.middleware.MessageMiddleware",
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'gestaoRaul.urls'
|
ROOT_URLCONF = "gestaoRaul.urls"
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||||
'DIRS': [os.path.join(BASE_DIR, 'templates'),],
|
"DIRS": [
|
||||||
'APP_DIRS': True,
|
os.path.join(BASE_DIR, "templates"),
|
||||||
'OPTIONS': {
|
],
|
||||||
'context_processors': [
|
"APP_DIRS": True,
|
||||||
'django.template.context_processors.debug',
|
"OPTIONS": {
|
||||||
'django.template.context_processors.request',
|
"context_processors": [
|
||||||
'django.contrib.auth.context_processors.auth',
|
"django.template.context_processors.debug",
|
||||||
'django.contrib.messages.context_processors.messages',
|
"django.template.context_processors.request",
|
||||||
|
"django.contrib.auth.context_processors.auth",
|
||||||
|
"django.contrib.messages.context_processors.messages",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
WSGI_APPLICATION = 'gestaoRaul.wsgi.application'
|
WSGI_APPLICATION = "gestaoRaul.wsgi.application"
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
"default": {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
"ENGINE": "django.db.backends.sqlite3",
|
||||||
'NAME': BASE_DIR / 'db.sqlite3',
|
"NAME": os.path.join(BASE_DIR, "db", "db.sqlite3"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,16 +140,16 @@ DATABASES = {
|
|||||||
|
|
||||||
AUTH_PASSWORD_VALIDATORS = [
|
AUTH_PASSWORD_VALIDATORS = [
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -145,22 +157,22 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/5.1/topics/i18n/
|
# https://docs.djangoproject.com/en/5.1/topics/i18n/
|
||||||
|
|
||||||
LANGUAGE_CODE = 'pt-BR'
|
LANGUAGE_CODE = "pt-BR"
|
||||||
|
|
||||||
TIME_ZONE = 'America/Sao_Paulo'
|
TIME_ZONE = "America/Sao_Paulo"
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
DATE_FORMAT = 'd/m/Y - H:M'
|
DATE_FORMAT = "d/m/Y - H:M"
|
||||||
|
|
||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
||||||
|
|
||||||
STATIC_URL = 'static/'
|
STATIC_URL = "/static/"
|
||||||
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'templates/static'),)
|
STATICFILES_DIRS = (os.path.join(BASE_DIR, "templates/static"),)
|
||||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
||||||
|
|
||||||
# WhiteNoise storage to compress and cache static files
|
# WhiteNoise storage to compress and cache static files
|
||||||
STORAGES = {
|
STORAGES = {
|
||||||
@@ -172,14 +184,13 @@ STORAGES = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
MEDIA_ROOT = os.path.join(BASE_DIR, "media")
|
||||||
MEDIA_URL = '/media/'
|
MEDIA_URL = "/media/"
|
||||||
|
|
||||||
# Default primary key field type
|
# Default primary key field type
|
||||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# pwa.py
|
# pwa.py
|
||||||
@@ -194,16 +205,12 @@ PWA_APP_DISPLAY = "standalone"
|
|||||||
PWA_APP_ORIENTATION = "any"
|
PWA_APP_ORIENTATION = "any"
|
||||||
PWA_APP_START_URL = "/"
|
PWA_APP_START_URL = "/"
|
||||||
PWA_APP_ICONS = [
|
PWA_APP_ICONS = [
|
||||||
{
|
{"src": "/static/midia/logo.png", "sizes": "160x160", "type": "image/png"},
|
||||||
"src": "/static/midia/logo.png",
|
|
||||||
"sizes": "160x160",
|
|
||||||
"type": "image/png"
|
|
||||||
},
|
|
||||||
# ... adicione outros tamanhos de ícones
|
# ... adicione outros tamanhos de ícones
|
||||||
]
|
]
|
||||||
PWA_APP_SPLASH_SCREEN = {
|
PWA_APP_SPLASH_SCREEN = {
|
||||||
"src": "/static/midia/logo.png",
|
"src": "/static/midia/logo.png",
|
||||||
"media": "(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"
|
"media": "(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)",
|
||||||
}
|
}
|
||||||
PWA_APP_DIR = "ltr"
|
PWA_APP_DIR = "ltr"
|
||||||
PWA_APP_LANG = "pt-BR"
|
PWA_APP_LANG = "pt-BR"
|
||||||
@@ -213,16 +220,14 @@ CORS_ALLOW_ALL_ORIGINS = True # Para desenvolvimento
|
|||||||
CORS_ALLOW_CREDENTIALS = True # Permite envio de cookies para SessionAuth
|
CORS_ALLOW_CREDENTIALS = True # Permite envio de cookies para SessionAuth
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
"DEFAULT_AUTHENTICATION_CLASSES": (
|
||||||
'rest_framework.authentication.SessionAuthentication', # Prioridade para teste no navegador
|
"rest_framework.authentication.SessionAuthentication", # Prioridade para teste no navegador
|
||||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
"rest_framework_simplejwt.authentication.JWTAuthentication",
|
||||||
),
|
|
||||||
'DEFAULT_PERMISSION_CLASSES': (
|
|
||||||
'rest_framework.permissions.IsAuthenticated',
|
|
||||||
),
|
),
|
||||||
|
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
|
||||||
}
|
}
|
||||||
|
|
||||||
SIMPLE_JWT = {
|
SIMPLE_JWT = {
|
||||||
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=60),
|
"ACCESS_TOKEN_LIFETIME": timedelta(minutes=60),
|
||||||
'REFRESH_TOKEN_LIFETIME': timedelta(days=1),
|
"REFRESH_TOKEN_LIFETIME": timedelta(days=1),
|
||||||
}
|
}
|
||||||
@@ -14,21 +14,27 @@ Including another URLconf
|
|||||||
1. Import the include() function: from django.urls import include, path
|
1. Import the include() function: from django.urls import include, path
|
||||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
from django.conf import settings
|
||||||
|
from django.conf.urls.static import static
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path('', include('home.urls')),
|
path("", include("home.urls")),
|
||||||
path('login/', include('login.urls')),
|
path("login/", include("login.urls")),
|
||||||
path('products/', include('products.urls')),
|
path("products/", include("products.urls")),
|
||||||
path('mesas/', include('mesas.urls')),
|
path("mesas/", include("mesas.urls")),
|
||||||
path('typePay/', include('typePay.urls')),
|
path("typePay/", include("typePay.urls")),
|
||||||
path('clients/', include('clients.urls')),
|
path("clients/", include("clients.urls")),
|
||||||
path('comandas/', include('comandas.urls')),
|
path("comandas/", include("comandas.urls")),
|
||||||
path('categories/', include('categories.urls')),
|
path("categories/", include("categories.urls")),
|
||||||
path('balcao/', include('balcao.urls')),
|
path("balcao/", include("balcao.urls")),
|
||||||
path('pedidos/', include('orders.urls')),
|
path("pedidos/", include("orders.urls")),
|
||||||
path('', include('pwa.urls')),
|
path("", include("pwa.urls")),
|
||||||
path('api/v1/', include('gestaoRaul.api_urls')),
|
path("api/v1/", include("gestaoRaul.api_urls")),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|||||||
@@ -4,11 +4,14 @@ from django.contrib.auth.models import User
|
|||||||
from categories.models import Categories
|
from categories.models import Categories
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class UnitOfMeasure(models.Model):
|
class UnitOfMeasure(models.Model):
|
||||||
id = models.AutoField(primary_key=True)
|
id = models.AutoField(primary_key=True)
|
||||||
name = models.CharField(max_length=50, unique=True, help_text="Ex: 'Unidade', 'Kg', 'Litro'")
|
name = models.CharField(
|
||||||
abbreviation = models.CharField(max_length=10, unique=True, help_text="Ex: 'un', 'kg', 'L'")
|
max_length=50, unique=True, help_text="Ex: 'Unidade', 'Kg', 'Litro'"
|
||||||
|
)
|
||||||
|
abbreviation = models.CharField(
|
||||||
|
max_length=10, unique=True, help_text="Ex: 'un', 'kg', 'L'"
|
||||||
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.abbreviation
|
return self.abbreviation
|
||||||
@@ -19,7 +22,7 @@ class Product(models.Model):
|
|||||||
id = models.AutoField(primary_key=True)
|
id = models.AutoField(primary_key=True)
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
description = models.TextField(null=True, blank=True)
|
description = models.TextField(null=True, blank=True)
|
||||||
image = models.ImageField(null=True, blank=True)
|
image = models.ImageField(upload_to="products/%Y/%m/%d/", null=True, blank=True)
|
||||||
price = models.DecimalField(max_digits=10, decimal_places=2)
|
price = models.DecimalField(max_digits=10, decimal_places=2)
|
||||||
quantity = models.IntegerField(null=False, default=0)
|
quantity = models.IntegerField(null=False, default=0)
|
||||||
category = models.ForeignKey(Categories, on_delete=models.CASCADE)
|
category = models.ForeignKey(Categories, on_delete=models.CASCADE)
|
||||||
@@ -30,51 +33,45 @@ class Product(models.Model):
|
|||||||
on_delete=models.SET_NULL, # Define como NULL se a unidade de medida for excluída
|
on_delete=models.SET_NULL, # Define como NULL se a unidade de medida for excluída
|
||||||
null=True,
|
null=True,
|
||||||
blank=True,
|
blank=True,
|
||||||
help_text="Unidade de medida para este produto."
|
help_text="Unidade de medida para este produto.",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Campo de composição (mantido da resposta anterior)
|
# Campo de composição (mantido da resposta anterior)
|
||||||
components = models.ManyToManyField(
|
components = models.ManyToManyField(
|
||||||
'self',
|
"self",
|
||||||
through='ProductComponent',
|
through="ProductComponent",
|
||||||
through_fields=('composite_product', 'component_product'),
|
through_fields=("composite_product", "component_product"),
|
||||||
symmetrical=False,
|
symmetrical=False,
|
||||||
related_name='is_component_of'
|
related_name="is_component_of",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"{self.name}"
|
return f"{self.name}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ProductComponent(models.Model):
|
class ProductComponent(models.Model):
|
||||||
composite_product = models.ForeignKey(
|
composite_product = models.ForeignKey(
|
||||||
Product,
|
Product,
|
||||||
on_delete=models.CASCADE,
|
on_delete=models.CASCADE,
|
||||||
related_name='composition_entries',
|
related_name="composition_entries",
|
||||||
help_text="O produto que é composto por outros produtos."
|
help_text="O produto que é composto por outros produtos.",
|
||||||
)
|
)
|
||||||
component_product = models.ForeignKey(
|
component_product = models.ForeignKey(
|
||||||
Product,
|
Product,
|
||||||
on_delete=models.CASCADE,
|
on_delete=models.CASCADE,
|
||||||
related_name='used_as_component_in',
|
related_name="used_as_component_in",
|
||||||
help_text="Um produto que é componente de outro produto."
|
help_text="Um produto que é componente de outro produto.",
|
||||||
)
|
)
|
||||||
quantity_required = models.PositiveIntegerField(
|
quantity_required = models.PositiveIntegerField(
|
||||||
default=1,
|
default=1,
|
||||||
help_text="Quantidade deste componente necessária para o produto composto."
|
help_text="Quantidade deste componente necessária para o produto composto.",
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = ('composite_product', 'component_product')
|
unique_together = ("composite_product", "component_product")
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return (
|
return (
|
||||||
f"{self.composite_product.name} requer "
|
f"{self.composite_product.name} requer "
|
||||||
f"{self.quantity_required} de {self.component_product.name}"
|
f"{self.quantity_required} de {self.component_product.name}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
265
requirements.txt
265
requirements.txt
@@ -1,254 +1,11 @@
|
|||||||
# This file was autogenerated by uv via the following command:
|
django==5.1.4
|
||||||
# uv export --format requirements-txt --output-file requirements.txt
|
djangorestframework==3.16.1
|
||||||
asarpy==1.0.1 \
|
djangorestframework-simplejwt==5.5.1
|
||||||
--hash=sha256:1f1a9a230942da620bc134eccda7be352f731301ac1269e71e426419e433a0d6
|
django-cors-headers==4.9.0
|
||||||
# via gestaoraul
|
django-extensions==3.2.3
|
||||||
asgiref==3.8.1 \
|
django-pwa==2.0.1
|
||||||
--hash=sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47 \
|
gunicorn==23.0.0
|
||||||
--hash=sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590
|
pillow==11.1.0
|
||||||
# via
|
python-dotenv==1.1.0
|
||||||
# django
|
whitenoise==6.11.0
|
||||||
# django-cors-headers
|
websockets==15.0
|
||||||
# gestaoraul
|
|
||||||
cffi==1.17.1 \
|
|
||||||
--hash=sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2 \
|
|
||||||
--hash=sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36 \
|
|
||||||
--hash=sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824 \
|
|
||||||
--hash=sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3 \
|
|
||||||
--hash=sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed \
|
|
||||||
--hash=sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8 \
|
|
||||||
--hash=sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903 \
|
|
||||||
--hash=sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683 \
|
|
||||||
--hash=sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9 \
|
|
||||||
--hash=sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c \
|
|
||||||
--hash=sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4 \
|
|
||||||
--hash=sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65 \
|
|
||||||
--hash=sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93 \
|
|
||||||
--hash=sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4 \
|
|
||||||
--hash=sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3 \
|
|
||||||
--hash=sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff \
|
|
||||||
--hash=sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5 \
|
|
||||||
--hash=sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd \
|
|
||||||
--hash=sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5 \
|
|
||||||
--hash=sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d \
|
|
||||||
--hash=sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e \
|
|
||||||
--hash=sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a \
|
|
||||||
--hash=sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99
|
|
||||||
# via
|
|
||||||
# cryptography
|
|
||||||
# gestaoraul
|
|
||||||
cryptography==44.0.0 \
|
|
||||||
--hash=sha256:1923cb251c04be85eec9fda837661c67c1049063305d6be5721643c22dd4e2b7 \
|
|
||||||
--hash=sha256:3c672a53c0fb4725a29c303be906d3c1fa99c32f58abe008a82705f9ee96f40b \
|
|
||||||
--hash=sha256:404fdc66ee5f83a1388be54300ae978b2efd538018de18556dde92575e05defc \
|
|
||||||
--hash=sha256:4ac4c9f37eba52cb6fbeaf5b59c152ea976726b865bd4cf87883a7e7006cc543 \
|
|
||||||
--hash=sha256:660cb7312a08bc38be15b696462fa7cc7cd85c3ed9c576e81f4dc4d8b2b31591 \
|
|
||||||
--hash=sha256:708ee5f1bafe76d041b53a4f95eb28cdeb8d18da17e597d46d7833ee59b97ede \
|
|
||||||
--hash=sha256:761817a3377ef15ac23cd7834715081791d4ec77f9297ee694ca1ee9c2c7e5eb \
|
|
||||||
--hash=sha256:831c3c4d0774e488fdc83a1923b49b9957d33287de923d58ebd3cec47a0ae43f \
|
|
||||||
--hash=sha256:84111ad4ff3f6253820e6d3e58be2cc2a00adb29335d4cacb5ab4d4d34f2a123 \
|
|
||||||
--hash=sha256:9e6fc8a08e116fb7c7dd1f040074c9d7b51d74a8ea40d4df2fc7aa08b76b9e6c \
|
|
||||||
--hash=sha256:a01956ddfa0a6790d594f5b34fc1bfa6098aca434696a03cfdbe469b8ed79285 \
|
|
||||||
--hash=sha256:abc998e0c0eee3c8a1904221d3f67dcfa76422b23620173e28c11d3e626c21bd \
|
|
||||||
--hash=sha256:b15492a11f9e1b62ba9d73c210e2416724633167de94607ec6069ef724fad092 \
|
|
||||||
--hash=sha256:c5eb858beed7835e5ad1faba59e865109f3e52b3783b9ac21e7e47dc5554e289 \
|
|
||||||
--hash=sha256:cd4e834f340b4293430701e772ec543b0fbe6c2dea510a5286fe0acabe153a02 \
|
|
||||||
--hash=sha256:d2436114e46b36d00f8b72ff57e598978b37399d2786fd39793c36c6d5cb1c64 \
|
|
||||||
--hash=sha256:eb33480f1bad5b78233b0ad3e1b0be21e8ef1da745d8d2aecbb20671658b9053 \
|
|
||||||
--hash=sha256:eca27345e1214d1b9f9490d200f9db5a874479be914199194e746c893788d417 \
|
|
||||||
--hash=sha256:ed3534eb1090483c96178fcb0f8893719d96d5274dfde98aa6add34614e97c8e \
|
|
||||||
--hash=sha256:f3f6fdfa89ee2d9d496e2c087cebef9d4fcbb0ad63c40e821b39f74bf48d9c5e \
|
|
||||||
--hash=sha256:f53c2c87e0fb4b0c00fa9571082a057e37690a8f12233306161c8f4b819960b7
|
|
||||||
# via
|
|
||||||
# gestaoraul
|
|
||||||
# pyopenssl
|
|
||||||
django==5.1.4 \
|
|
||||||
--hash=sha256:236e023f021f5ce7dee5779de7b286565fdea5f4ab86bae5338e3f7b69896cf0 \
|
|
||||||
--hash=sha256:de450c09e91879fa5a307f696e57c851955c910a438a35e6b4c895e86bedc82a
|
|
||||||
# via
|
|
||||||
# django-cors-headers
|
|
||||||
# django-extensions
|
|
||||||
# django-pwa
|
|
||||||
# djangorestframework
|
|
||||||
# djangorestframework-simplejwt
|
|
||||||
# gestaoraul
|
|
||||||
django-cors-headers==4.9.0 \
|
|
||||||
--hash=sha256:15c7f20727f90044dcee2216a9fd7303741a864865f0c3657e28b7056f61b449 \
|
|
||||||
--hash=sha256:fe5d7cb59fdc2c8c646ce84b727ac2bca8912a247e6e68e1fb507372178e59e8
|
|
||||||
# via gestaoraul
|
|
||||||
django-extensions==3.2.3 \
|
|
||||||
--hash=sha256:44d27919d04e23b3f40231c4ab7af4e61ce832ef46d610cc650d53e68328410a \
|
|
||||||
--hash=sha256:9600b7562f79a92cbf1fde6403c04fee314608fefbb595502e34383ae8203401
|
|
||||||
# via gestaoraul
|
|
||||||
django-pwa==2.0.1 \
|
|
||||||
--hash=sha256:41dc931c645c6125c556bd753205ca051aa48e5d46edbf281003594f3d76d4a3 \
|
|
||||||
--hash=sha256:5539fabb41fe189cc2a82cb1f0f889b45671a8144d7b5bb5206a9ddd0fddb3c2
|
|
||||||
# via gestaoraul
|
|
||||||
djangorestframework==3.16.1 \
|
|
||||||
--hash=sha256:166809528b1aced0a17dc66c24492af18049f2c9420dbd0be29422029cfc3ff7 \
|
|
||||||
--hash=sha256:33a59f47fb9c85ede792cbf88bde71893bcda0667bc573f784649521f1102cec
|
|
||||||
# via
|
|
||||||
# djangorestframework-simplejwt
|
|
||||||
# gestaoraul
|
|
||||||
djangorestframework-simplejwt==5.5.1 \
|
|
||||||
--hash=sha256:2c30f3707053d384e9f315d11c2daccfcb548d4faa453111ca19a542b732e469 \
|
|
||||||
--hash=sha256:e72c5572f51d7803021288e2057afcbd03f17fe11d484096f40a460abc76e87f
|
|
||||||
# via gestaoraul
|
|
||||||
dotenv==0.9.9 \
|
|
||||||
--hash=sha256:29cf74a087b31dafdb5a446b6d7e11cbce8ed2741540e2339c69fbef92c94ce9
|
|
||||||
# via gestaoraul
|
|
||||||
gunicorn==23.0.0 \
|
|
||||||
--hash=sha256:ec400d38950de4dfd418cff8328b2c8faed0edb0d517d3394e457c317908ca4d \
|
|
||||||
--hash=sha256:f014447a0101dc57e294f6c18ca6b40227a4c90e9bdb586042628030cba004ec
|
|
||||||
# via gestaoraul
|
|
||||||
markupsafe==3.0.2 \
|
|
||||||
--hash=sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30 \
|
|
||||||
--hash=sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9 \
|
|
||||||
--hash=sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396 \
|
|
||||||
--hash=sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028 \
|
|
||||||
--hash=sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557 \
|
|
||||||
--hash=sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a \
|
|
||||||
--hash=sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c \
|
|
||||||
--hash=sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c \
|
|
||||||
--hash=sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22 \
|
|
||||||
--hash=sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094 \
|
|
||||||
--hash=sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5 \
|
|
||||||
--hash=sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225 \
|
|
||||||
--hash=sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c \
|
|
||||||
--hash=sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87 \
|
|
||||||
--hash=sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf \
|
|
||||||
--hash=sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb \
|
|
||||||
--hash=sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48 \
|
|
||||||
--hash=sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c \
|
|
||||||
--hash=sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6 \
|
|
||||||
--hash=sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd \
|
|
||||||
--hash=sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1 \
|
|
||||||
--hash=sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d \
|
|
||||||
--hash=sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca \
|
|
||||||
--hash=sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a \
|
|
||||||
--hash=sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe \
|
|
||||||
--hash=sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8 \
|
|
||||||
--hash=sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f \
|
|
||||||
--hash=sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f \
|
|
||||||
--hash=sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0 \
|
|
||||||
--hash=sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79 \
|
|
||||||
--hash=sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430
|
|
||||||
# via
|
|
||||||
# gestaoraul
|
|
||||||
# werkzeug
|
|
||||||
packaging==24.2 \
|
|
||||||
--hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
|
|
||||||
--hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
|
|
||||||
# via
|
|
||||||
# gestaoraul
|
|
||||||
# gunicorn
|
|
||||||
pillow==11.1.0 \
|
|
||||||
--hash=sha256:11633d58b6ee5733bde153a8dafd25e505ea3d32e261accd388827ee987baf65 \
|
|
||||||
--hash=sha256:2062ffb1d36544d42fcaa277b069c88b01bb7298f4efa06731a7fd6cc290b81a \
|
|
||||||
--hash=sha256:31eba6bbdd27dde97b0174ddf0297d7a9c3a507a8a1480e1e60ef914fe23d352 \
|
|
||||||
--hash=sha256:368da70808b36d73b4b390a8ffac11069f8a5c85f29eff1f1b01bcf3ef5b2a20 \
|
|
||||||
--hash=sha256:36ba10b9cb413e7c7dfa3e189aba252deee0602c86c309799da5a74009ac7a1c \
|
|
||||||
--hash=sha256:3764d53e09cdedd91bee65c2527815d315c6b90d7b8b79759cc48d7bf5d4f114 \
|
|
||||||
--hash=sha256:3cdcdb0b896e981678eee140d882b70092dac83ac1cdf6b3a60e2216a73f2b91 \
|
|
||||||
--hash=sha256:4dd43a78897793f60766563969442020e90eb7847463eca901e41ba186a7d4a5 \
|
|
||||||
--hash=sha256:593c5fd6be85da83656b93ffcccc2312d2d149d251e98588b14fbc288fd8909c \
|
|
||||||
--hash=sha256:67cd427c68926108778a9005f2a04adbd5e67c442ed21d95389fe1d595458756 \
|
|
||||||
--hash=sha256:70ca5ef3b3b1c4a0812b5c63c57c23b63e53bc38e758b37a951e5bc466449861 \
|
|
||||||
--hash=sha256:758e9d4ef15d3560214cddbc97b8ef3ef86ce04d62ddac17ad39ba87e89bd3b1 \
|
|
||||||
--hash=sha256:7fdadc077553621911f27ce206ffcbec7d3f8d7b50e0da39f10997e8e2bb7f6a \
|
|
||||||
--hash=sha256:8000376f139d4d38d6851eb149b321a52bb8893a88dae8ee7d95840431977081 \
|
|
||||||
--hash=sha256:9044b5e4f7083f209c4e35aa5dd54b1dd5b112b108648f5c902ad586d4f945c5 \
|
|
||||||
--hash=sha256:93a18841d09bcdd774dcdc308e4537e1f867b3dec059c131fde0327899734aa1 \
|
|
||||||
--hash=sha256:9409c080586d1f683df3f184f20e36fb647f2e0bc3988094d4fd8c9f4eb1b3b3 \
|
|
||||||
--hash=sha256:9aa9aeddeed452b2f616ff5507459e7bab436916ccb10961c4a382cd3e03f47f \
|
|
||||||
--hash=sha256:9ee85f0696a17dd28fbcfceb59f9510aa71934b483d1f5601d1030c3c8304f3c \
|
|
||||||
--hash=sha256:a697cd8ba0383bba3d2d3ada02b34ed268cb548b369943cd349007730c92bddf \
|
|
||||||
--hash=sha256:a85b653980faad27e88b141348707ceeef8a1186f75ecc600c395dcac19f385b \
|
|
||||||
--hash=sha256:ad5db5781c774ab9a9b2c4302bbf0c1014960a0a7be63278d13ae6fdf88126fe \
|
|
||||||
--hash=sha256:ae98e14432d458fc3de11a77ccb3ae65ddce70f730e7c76140653048c71bfcbc \
|
|
||||||
--hash=sha256:b523466b1a31d0dcef7c5be1f20b942919b62fd6e9a9be199d035509cbefc0ec \
|
|
||||||
--hash=sha256:b5d658fbd9f0d6eea113aea286b21d3cd4d3fd978157cbf2447a6035916506d3 \
|
|
||||||
--hash=sha256:cc1331b6d5a6e144aeb5e626f4375f5b7ae9934ba620c0ac6b3e43d5e683a0f0 \
|
|
||||||
--hash=sha256:cfd5cd998c2e36a862d0e27b2df63237e67273f2fc78f47445b14e73a810e7e6 \
|
|
||||||
--hash=sha256:dd0e081319328928531df7a0e63621caf67652c8464303fd102141b785ef9547 \
|
|
||||||
--hash=sha256:dda60aa465b861324e65a78c9f5cf0f4bc713e4309f83bc387be158b077963d9 \
|
|
||||||
--hash=sha256:e63e4e5081de46517099dc30abe418122f54531a6ae2ebc8680bcd7096860eab \
|
|
||||||
--hash=sha256:f86d3a7a9af5d826744fabf4afd15b9dfef44fe69a98541f666f66fbb8d3fef9
|
|
||||||
# via gestaoraul
|
|
||||||
psycopg==3.2.6 \
|
|
||||||
--hash=sha256:16fa094efa2698f260f2af74f3710f781e4a6f226efe9d1fd0c37f384639ed8a \
|
|
||||||
--hash=sha256:f3ff5488525890abb0566c429146add66b329e20d6d4835662b920cbbf90ac58
|
|
||||||
# via gestaoraul
|
|
||||||
pycparser==2.22 \
|
|
||||||
--hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
|
|
||||||
--hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
|
|
||||||
# via
|
|
||||||
# cffi
|
|
||||||
# gestaoraul
|
|
||||||
pyjwt==2.11.0 \
|
|
||||||
--hash=sha256:35f95c1f0fbe5d5ba6e43f00271c275f7a1a4db1dab27bf708073b75318ea623 \
|
|
||||||
--hash=sha256:94a6bde30eb5c8e04fee991062b534071fd1439ef58d2adc9ccb823e7bcd0469
|
|
||||||
# via djangorestframework-simplejwt
|
|
||||||
pyopenssl==24.3.0 \
|
|
||||||
--hash=sha256:49f7a019577d834746bc55c5fce6ecbcec0f2b4ec5ce1cf43a9a173b8138bb36 \
|
|
||||||
--hash=sha256:e474f5a473cd7f92221cc04976e48f4d11502804657a08a989fb3be5514c904a
|
|
||||||
# via gestaoraul
|
|
||||||
python-dotenv==1.1.0 \
|
|
||||||
--hash=sha256:41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5 \
|
|
||||||
--hash=sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d
|
|
||||||
# via
|
|
||||||
# dotenv
|
|
||||||
# gestaoraul
|
|
||||||
sqlparse==0.5.2 \
|
|
||||||
--hash=sha256:9e37b35e16d1cc652a2545f0997c1deb23ea28fa1f3eefe609eee3063c3b105f \
|
|
||||||
--hash=sha256:e99bc85c78160918c3e1d9230834ab8d80fc06c59d03f8db2618f65f65dda55e
|
|
||||||
# via
|
|
||||||
# django
|
|
||||||
# gestaoraul
|
|
||||||
typing-extensions==4.12.2 \
|
|
||||||
--hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \
|
|
||||||
--hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8
|
|
||||||
# via
|
|
||||||
# gestaoraul
|
|
||||||
# psycopg
|
|
||||||
tzdata==2024.2 \
|
|
||||||
--hash=sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc \
|
|
||||||
--hash=sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd
|
|
||||||
# via
|
|
||||||
# django
|
|
||||||
# gestaoraul
|
|
||||||
# psycopg
|
|
||||||
websockets==15.0 \
|
|
||||||
--hash=sha256:0f2205cdb444a42a7919690238fb5979a05439b9dbb73dd47c863d39640d85ab \
|
|
||||||
--hash=sha256:10552fed076757a70ba2c18edcbc601c7637b30cdfe8c24b65171e824c7d6081 \
|
|
||||||
--hash=sha256:1206432cc6c644f6fc03374b264c5ff805d980311563202ed7fef91a38906276 \
|
|
||||||
--hash=sha256:1caf951110ca757b8ad9c4974f5cac7b8413004d2f29707e4d03a65d54cedf2b \
|
|
||||||
--hash=sha256:26ba70fed190708551c19a360f9d7eca8e8c0f615d19a574292b7229e0ae324c \
|
|
||||||
--hash=sha256:32e02a2d83f4954aa8c17e03fe8ec6962432c39aca4be7e8ee346b05a3476904 \
|
|
||||||
--hash=sha256:3a302241fbe825a3e4fe07666a2ab513edfdc6d43ce24b79691b45115273b5e7 \
|
|
||||||
--hash=sha256:51ffd53c53c4442415b613497a34ba0aa7b99ac07f1e4a62db5dcd640ae6c3c3 \
|
|
||||||
--hash=sha256:56e3efe356416bc67a8e093607315951d76910f03d2b3ad49c4ade9207bf710d \
|
|
||||||
--hash=sha256:5d3cc75ef3e17490042c47e0523aee1bcc4eacd2482796107fd59dd1100a44bc \
|
|
||||||
--hash=sha256:86bfb52a9cfbcc09aba2b71388b0a20ea5c52b6517c0b2e316222435a8cdab72 \
|
|
||||||
--hash=sha256:8bf1ab71f9f23b0a1d52ec1682a3907e0c208c12fef9c3e99d2b80166b17905f \
|
|
||||||
--hash=sha256:a9f8e33747b1332db11cf7fcf4a9512bef9748cb5eb4d3f7fbc8c30d75dc6ffc \
|
|
||||||
--hash=sha256:ae721bcc8e69846af00b7a77a220614d9b2ec57d25017a6bbde3a99473e41ce8 \
|
|
||||||
--hash=sha256:aea01f40995fa0945c020228ab919b8dfc93fc8a9f2d3d705ab5b793f32d9e99 \
|
|
||||||
--hash=sha256:b89504227a5311610e4be16071465885a0a3d6b0e82e305ef46d9b064ce5fb72 \
|
|
||||||
--hash=sha256:bfcd3acc1a81f106abac6afd42327d2cf1e77ec905ae11dc1d9142a006a496b6 \
|
|
||||||
--hash=sha256:c53f97032b87a406044a1c33d1e9290cc38b117a8062e8a8b285175d7e2f99c9 \
|
|
||||||
--hash=sha256:c8c5c8e1bac05ef3c23722e591ef4f688f528235e2480f157a9cfe0a19081375 \
|
|
||||||
--hash=sha256:ca36151289a15b39d8d683fd8b7abbe26fc50be311066c5f8dcf3cb8cee107ab \
|
|
||||||
--hash=sha256:cccc18077acd34c8072578394ec79563664b1c205f7a86a62e94fafc7b59001f \
|
|
||||||
--hash=sha256:d2244d8ab24374bed366f9ff206e2619345f9cd7fe79aad5225f53faac28b6b1 \
|
|
||||||
--hash=sha256:d4c22992e24f12de340ca5f824121a5b3e1a37ad4360b4e1aaf15e9d1c42582d \
|
|
||||||
--hash=sha256:ffc02b159b65c05f2ed9ec176b715b66918a674bd4daed48a9a7a590dd4be1aa
|
|
||||||
# via gestaoraul
|
|
||||||
werkzeug==3.1.3 \
|
|
||||||
--hash=sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e \
|
|
||||||
--hash=sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746
|
|
||||||
# via gestaoraul
|
|
||||||
whitenoise==6.11.0 \
|
|
||||||
--hash=sha256:0f5bfce6061ae6611cd9396a8231e088722e4fc67bc13a111be74c738d99375f \
|
|
||||||
--hash=sha256:b2aeb45950597236f53b5342b3121c5de69c8da0109362aee506ce88e022d258
|
|
||||||
# via gestaoraul
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
DISPLAY_NAME=Gestao Raul API
|
|
||||||
DESCRIPTION=Sistema de Gestão para Restaurantes/Bares com API REST.
|
|
||||||
MAIN=gestaoRaul/wsgi.py
|
|
||||||
MEMORY=512
|
|
||||||
VERSION=recommended
|
|
||||||
SUB_DOMAIN=gestao-raul # Escolha um subdomínio disponível
|
|
||||||
START=python manage.py collectstatic --noinput && python -m gunicorn gestaoRaul.wsgi:application --bind 0.0.0.0:80 --timeout 120
|
|
||||||
Reference in New Issue
Block a user