diff --git a/app/settings.py b/app/settings.py index 1173b05..528f6b4 100644 --- a/app/settings.py +++ b/app/settings.py @@ -11,7 +11,7 @@ """ from pathlib import Path - +import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -124,6 +124,9 @@ STATIC_URL = 'static/' +STATICFILES_DIRS = ['static',] +STATIC_ROOT = os.path.join(BASE_DIR, '/static/') + # Default primary key field type # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field diff --git a/app/templates/base.html b/app/templates/base.html index 5d01d36..3a7945a 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,5 +1,7 @@ +{% load static %} + - + @@ -7,8 +9,11 @@ {% block title %}{% endblock %} - + + + {% block styles %} + {% endblock %} @@ -16,8 +21,20 @@
-
-
+
+
+
+
+ + +
+
+
+
+
+
+
+
- - - var ctxBrand = document.getElementById('productByBrandChart').getContext('2d'); - var productByBrandChart = new Chart(ctxBrand, { - type: 'doughnut', - data: { - labels: Object.keys(productCountByBrand), - datasets: [{ - data: Object.values(productCountByBrand), - borderWidth: 1 - }] - }, - options: { - plugins: { - legend: { - display: false - }, - } - } - }); - }); - {% endblock %} diff --git a/brands/templates/brand_list.html b/brands/templates/brand_list.html index 6403944..85789aa 100644 --- a/brands/templates/brand_list.html +++ b/brands/templates/brand_list.html @@ -1,11 +1,39 @@ {% extends 'base.html' %} +{% load static %} + {% block title %} SGE - Marcas {% endblock %} -{% block content %} +{% block styles %} + +{% endblock %} +{% block content %} + {% for msg in messages %} + + + + + + + + + + + + {% if msg.tags == 'error' %} +