diff --git a/comandos.txt b/comandos.txt index d3ac09c..dc64fce 100644 --- a/comandos.txt +++ b/comandos.txt @@ -1,5 +1,7 @@ mkdir djangotutorial +python -m venv meu_ambiente django-admin startproject mysite djangotutorial +meu_ambiente\Scripts\Activate.ps1 python manage.py runserver python manage.py startapp polls python manage.py makemigrations diff --git a/gestaoRaul/db.sqlite3 b/gestaoRaul/db.sqlite3 index 7ba8012..f5ebf1f 100644 Binary files a/gestaoRaul/db.sqlite3 and b/gestaoRaul/db.sqlite3 differ diff --git a/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc b/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc index 36d26e0..fd0a074 100644 Binary files a/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc and b/gestaoRaul/gestaoRaul/__pycache__/urls.cpython-310.pyc differ diff --git a/gestaoRaul/gestaoRaul/urls.py b/gestaoRaul/gestaoRaul/urls.py index 22cab16..7115f5f 100644 --- a/gestaoRaul/gestaoRaul/urls.py +++ b/gestaoRaul/gestaoRaul/urls.py @@ -19,6 +19,7 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), + path('/', include('home.urls')), path('products/', include('products.urls')), path('mesas/', include('mesas.urls')), path('typePay/', include('typePay.urls')), diff --git a/gestaoRaul/home/__init__.py b/gestaoRaul/home/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gestaoRaul/home/__pycache__/__init__.cpython-310.pyc b/gestaoRaul/home/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000..4efa6d6 Binary files /dev/null and b/gestaoRaul/home/__pycache__/__init__.cpython-310.pyc differ diff --git a/gestaoRaul/home/__pycache__/urls.cpython-310.pyc b/gestaoRaul/home/__pycache__/urls.cpython-310.pyc new file mode 100644 index 0000000..c5cb455 Binary files /dev/null and b/gestaoRaul/home/__pycache__/urls.cpython-310.pyc differ diff --git a/gestaoRaul/home/__pycache__/views.cpython-310.pyc b/gestaoRaul/home/__pycache__/views.cpython-310.pyc new file mode 100644 index 0000000..323ebb9 Binary files /dev/null and b/gestaoRaul/home/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/home/admin.py b/gestaoRaul/home/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/gestaoRaul/home/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/gestaoRaul/home/apps.py b/gestaoRaul/home/apps.py new file mode 100644 index 0000000..e5ea0af --- /dev/null +++ b/gestaoRaul/home/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class HomeConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'home' diff --git a/gestaoRaul/home/migrations/__init__.py b/gestaoRaul/home/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gestaoRaul/home/models.py b/gestaoRaul/home/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/gestaoRaul/home/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/gestaoRaul/home/templates/home.html b/gestaoRaul/home/templates/home.html new file mode 100644 index 0000000..60e28e0 --- /dev/null +++ b/gestaoRaul/home/templates/home.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load static %} + + + +{% block 'head' %} + +{% endblock %} + +{% block 'title' %} +RRB&C - DashBoard +{% endblock %} + +{% block 'body' %} + + +
+ +

DashBoard Aqui

+ + {% comment %} {% for mesa in mesas %} + +
{{mesa.name}}
+ + {% endfor %} {% endcomment %} + + +
+ + + +{% endblock %} \ No newline at end of file diff --git a/gestaoRaul/home/tests.py b/gestaoRaul/home/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/gestaoRaul/home/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/gestaoRaul/home/urls.py b/gestaoRaul/home/urls.py new file mode 100644 index 0000000..3bcaa2f --- /dev/null +++ b/gestaoRaul/home/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.home, name='home'), + +] diff --git a/gestaoRaul/home/views.py b/gestaoRaul/home/views.py new file mode 100644 index 0000000..35fb3dc --- /dev/null +++ b/gestaoRaul/home/views.py @@ -0,0 +1,5 @@ +from django.shortcuts import render + +# Create your views here. +def home(request): + return render(request, 'home.html') \ No newline at end of file diff --git a/gestaoRaul/mesas/__pycache__/admin.cpython-310.pyc b/gestaoRaul/mesas/__pycache__/admin.cpython-310.pyc index 0f119bc..79f575d 100644 Binary files a/gestaoRaul/mesas/__pycache__/admin.cpython-310.pyc and b/gestaoRaul/mesas/__pycache__/admin.cpython-310.pyc differ diff --git a/gestaoRaul/mesas/__pycache__/views.cpython-310.pyc b/gestaoRaul/mesas/__pycache__/views.cpython-310.pyc index ebe9136..f5a2ffb 100644 Binary files a/gestaoRaul/mesas/__pycache__/views.cpython-310.pyc and b/gestaoRaul/mesas/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/mesas/admin.py b/gestaoRaul/mesas/admin.py index 8c38f3f..bfa7ebe 100644 --- a/gestaoRaul/mesas/admin.py +++ b/gestaoRaul/mesas/admin.py @@ -1,3 +1,18 @@ from django.contrib import admin +from categories.models import Categories +from clients.models import Client +from comandas.models import Comanda +from typePay.models import TypePay +from products.models import Product +from mesas.models import Mesa + + +admin.site.register(Mesa) +admin.site.register(Product) +admin.site.register(Categories) +admin.site.register(Client) +admin.site.register(Comanda) +admin.site.register(TypePay) + # Register your models here. diff --git a/gestaoRaul/mesas/templates/mesas.html b/gestaoRaul/mesas/templates/mesas.html index 32753be..8d6631d 100644 --- a/gestaoRaul/mesas/templates/mesas.html +++ b/gestaoRaul/mesas/templates/mesas.html @@ -18,24 +18,10 @@ RRB&C - Mesas {% for mesa in mesas %} -
Mesa {{mesa}}
+
{{mesa.name}}
{% endfor %} - {% comment %}
Card 2
-
Card 3
-
Card 4
-
Card 5
-
Card 6
-
Card 7
-
Card 8
-
Card 9
-
Card 10
-
Card 8
-
Card 9
-
Card 10
-
Card 8
-
Card 9
-
Card 10
{% endcomment %} + diff --git a/gestaoRaul/mesas/views.py b/gestaoRaul/mesas/views.py index 97821cb..f5b7780 100644 --- a/gestaoRaul/mesas/views.py +++ b/gestaoRaul/mesas/views.py @@ -1,6 +1,9 @@ from django.shortcuts import render +from mesas.models import Mesa + # Create your views here. def mesas(request): - return render(request, 'mesas.html', {'mesas': ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']}) \ No newline at end of file + mesas = Mesa.objects.all() + return render(request, 'mesas.html', {'mesas': mesas}) \ No newline at end of file diff --git a/gestaoRaul/products/__pycache__/views.cpython-310.pyc b/gestaoRaul/products/__pycache__/views.cpython-310.pyc index bda133b..5d277e5 100644 Binary files a/gestaoRaul/products/__pycache__/views.cpython-310.pyc and b/gestaoRaul/products/__pycache__/views.cpython-310.pyc differ diff --git a/gestaoRaul/products/templates/products.html b/gestaoRaul/products/templates/products.html index 97f1dd2..e216db6 100644 --- a/gestaoRaul/products/templates/products.html +++ b/gestaoRaul/products/templates/products.html @@ -1,12 +1,33 @@ {% extends "base.html" %} +{% load static %} - - -{% block 'title' %} -Type Pay +{% block 'head' %} + {% endblock %} +{% block 'title' %} +Produtos +{% endblock %} + + + + {% block 'body' %} -Body Type Pay + + + +
+ + {% for product in products %} + +
{{product.name}}
+ + {% endfor %} + + +
+ + + {% endblock %} \ No newline at end of file diff --git a/gestaoRaul/products/views.py b/gestaoRaul/products/views.py index 9cc4669..dc2f45d 100644 --- a/gestaoRaul/products/views.py +++ b/gestaoRaul/products/views.py @@ -1,5 +1,8 @@ from django.shortcuts import render +from products.models import Product + def products(request): - return render(request, 'products.html') \ No newline at end of file + protucts = Product.objects.all() + return render(request, 'products.html', {'products': protucts}) \ No newline at end of file diff --git a/gestaoRaul/templates/base.html b/gestaoRaul/templates/base.html index 2e8afb0..7ad2eb6 100644 --- a/gestaoRaul/templates/base.html +++ b/gestaoRaul/templates/base.html @@ -1,15 +1,36 @@ {% load static %} + + {% block 'head' %}{% endblock %} {% block 'title' %}{% endblock %} -
aqui o menu
+
+ + aqui o menu + + +
+

Bem-vindo ao meu site!

+
+ + +
{% block 'body' %} {% endblock %} diff --git a/gestaoRaul/templates/static/base.css b/gestaoRaul/templates/static/base.css new file mode 100644 index 0000000..dbd327f --- /dev/null +++ b/gestaoRaul/templates/static/base.css @@ -0,0 +1,35 @@ +body { + margin: 0; + font-family: Arial, sans-serif; +} + +.sidebar { + height: 100vh; + width: 200px; + background-color: #f1f1f1; + padding: 20px; + position: fixed; + top: 0; + left: 0; +} + +.content { + margin-left: 220px; /* Ajustar para a largura da sidebar + padding */ + padding: 20px; +} + +ul { + list-style-type: none; + padding: 0; +} + +li a { + display: block; + padding: 15px; + text-decoration: none; + color: #333; +} + +li a:hover { + background-color: #ccc; +} \ No newline at end of file