diff --git a/Dockerfile b/Dockerfile index 55940667..dd6f8e07 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,17 +5,18 @@ WORKDIR /sge ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 -RUN apt update && apt -y install cron && apt -y install nano - -COPY . . +RUN apt update && apt -y install cron && apt -y install vim +# COPY ./application . +COPY ./application/requirements.txt /requirements.txt RUN pip install --upgrade pip -RUN pip install -r requirements.txt +RUN pip install -r /requirements.txt -COPY ./cron /etc/cron.d/cron -RUN chmod 0644 /etc/cron.d/cron -RUN crontab /etc/cron.d/cron +# COPY ./application/cron /etc/cron.d/cron +# RUN chmod 0644 /etc/cron.d/cron +# RUN crontab /etc/cron.d/cron EXPOSE 8000 CMD cron ; python manage.py migrate && python manage.py runserver 0.0.0.0:8000 +#CMD tail -f /dev/null diff --git a/.env.example b/application/.env.example similarity index 100% rename from .env.example rename to application/.env.example diff --git a/.flake8 b/application/.flake8 similarity index 100% rename from .flake8 rename to application/.flake8 diff --git a/ai/__init__.py b/application/ai/__init__.py similarity index 100% rename from ai/__init__.py rename to application/ai/__init__.py diff --git a/ai/admin.py b/application/ai/admin.py similarity index 100% rename from ai/admin.py rename to application/ai/admin.py diff --git a/ai/agent.py b/application/ai/agent.py similarity index 100% rename from ai/agent.py rename to application/ai/agent.py diff --git a/ai/apps.py b/application/ai/apps.py similarity index 100% rename from ai/apps.py rename to application/ai/apps.py diff --git a/ai/management/__init__.py b/application/ai/management/__init__.py similarity index 100% rename from ai/management/__init__.py rename to application/ai/management/__init__.py diff --git a/ai/management/commands/__init__.py b/application/ai/management/commands/__init__.py similarity index 100% rename from ai/management/commands/__init__.py rename to application/ai/management/commands/__init__.py diff --git a/ai/management/commands/sge_agent_invoke.py b/application/ai/management/commands/sge_agent_invoke.py similarity index 100% rename from ai/management/commands/sge_agent_invoke.py rename to application/ai/management/commands/sge_agent_invoke.py diff --git a/ai/migrations/0001_initial.py b/application/ai/migrations/0001_initial.py similarity index 100% rename from ai/migrations/0001_initial.py rename to application/ai/migrations/0001_initial.py diff --git a/ai/migrations/__init__.py b/application/ai/migrations/__init__.py similarity index 100% rename from ai/migrations/__init__.py rename to application/ai/migrations/__init__.py diff --git a/ai/models.py b/application/ai/models.py similarity index 100% rename from ai/models.py rename to application/ai/models.py diff --git a/ai/prompts.py b/application/ai/prompts.py similarity index 100% rename from ai/prompts.py rename to application/ai/prompts.py diff --git a/app/__init__.py b/application/app/__init__.py similarity index 100% rename from app/__init__.py rename to application/app/__init__.py diff --git a/app/asgi.py b/application/app/asgi.py similarity index 100% rename from app/asgi.py rename to application/app/asgi.py diff --git a/app/metrics.py b/application/app/metrics.py similarity index 100% rename from app/metrics.py rename to application/app/metrics.py diff --git a/app/settings.py b/application/app/settings.py similarity index 99% rename from app/settings.py rename to application/app/settings.py index 4f61d79b..4919c6da 100644 --- a/app/settings.py +++ b/application/app/settings.py @@ -54,6 +54,7 @@ 'inflows', 'outflows', 'ai', + 'costumers', ] LOGIN_URL = 'login' diff --git a/app/templates/base.html b/application/app/templates/base.html similarity index 100% rename from app/templates/base.html rename to application/app/templates/base.html diff --git a/app/templates/components/_ai_result.html b/application/app/templates/components/_ai_result.html similarity index 100% rename from app/templates/components/_ai_result.html rename to application/app/templates/components/_ai_result.html diff --git a/app/templates/components/_footer.html b/application/app/templates/components/_footer.html similarity index 100% rename from app/templates/components/_footer.html rename to application/app/templates/components/_footer.html diff --git a/app/templates/components/_header.html b/application/app/templates/components/_header.html similarity index 100% rename from app/templates/components/_header.html rename to application/app/templates/components/_header.html diff --git a/app/templates/components/_pagination.html b/application/app/templates/components/_pagination.html similarity index 100% rename from app/templates/components/_pagination.html rename to application/app/templates/components/_pagination.html diff --git a/app/templates/components/_product_metrics.html b/application/app/templates/components/_product_metrics.html similarity index 100% rename from app/templates/components/_product_metrics.html rename to application/app/templates/components/_product_metrics.html diff --git a/app/templates/components/_sales_metrics.html b/application/app/templates/components/_sales_metrics.html similarity index 100% rename from app/templates/components/_sales_metrics.html rename to application/app/templates/components/_sales_metrics.html diff --git a/app/templates/components/_sidebar.html b/application/app/templates/components/_sidebar.html similarity index 91% rename from app/templates/components/_sidebar.html rename to application/app/templates/components/_sidebar.html index f81e145c..07e4b76d 100644 --- a/app/templates/components/_sidebar.html +++ b/application/app/templates/components/_sidebar.html @@ -21,6 +21,14 @@ {% endif %} + {% if perms.costumers.view_costumer %} +
Tem certeza de que deseja excluir o fornecedor {{ object.name }}?
+ + + + Cancelar e Voltar para a Lista de Clientes +{{ object.mail }}
+{{ object.phone }}
+{{ object.document_id }}
+{{ object.address }}
+{{ object.city }}
+{{ object.state }}
+{{ object.zip_code }}
+| ID | +Nome | +Telefone | +Site/MediaSocial | +CPF/CNPJ | +Endereço | +Cidade | +Estado | +CEP | +|
|---|---|---|---|---|---|---|---|---|---|
| + + {{ costumer.id }} + + | +{{ costumer.name }} | +{{ costumer.mail }} | +{{ costumer.phone }} | +{{ costumer.document_id }} | +{{ costumer.address }} | +{{ costumer.city }} | +{{ costumer.state }} | +{{ costumer.zip_code }} | ++ + + + + {% if perms.costumers.change_costumer %} + + + + {% endif %} + + {% if perms.costumers.delete_costumer %} + + + + {% endif %} + | +
Categoria: {{ object.category }}
+Cor: {{ object.color }}
+Tamanho: {{ object.size }}
+Tipo: {{ object.type }}
Marca: {{ object.brand }}
{{ object.description }}
Número de Série: {{ object.serie_number }}
diff --git a/products/templates/product_list.html b/application/products/templates/product_list.html similarity index 92% rename from products/templates/product_list.html rename to application/products/templates/product_list.html index 0d870646..4329d789 100644 --- a/products/templates/product_list.html +++ b/application/products/templates/product_list.html @@ -28,6 +28,7 @@ {% endif %} @@ -64,6 +65,9 @@{{ object.mail }}
+{{ object.phone }}
+{{ object.document_id }}
+{{ object.address }}
+{{ object.city }}
+{{ object.state }}
+{{ object.zip_code }}
+{{ object.description }}
+{{ object.description }}
-