Update static file storage settings and add migration for unique category names; clean up CSS and HTML structure

This commit is contained in:
2026-04-20 08:10:23 +02:00
parent e3f492ded5
commit 5aaf38aa54
5 changed files with 25 additions and 4 deletions
+5 -1
View File
@@ -203,7 +203,11 @@ STORAGES = {
'BACKEND': 'django.core.files.storage.FileSystemStorage', 'BACKEND': 'django.core.files.storage.FileSystemStorage',
}, },
'staticfiles': { 'staticfiles': {
'BACKEND': 'whitenoise.storage.CompressedManifestStaticFilesStorage', 'BACKEND': (
'django.contrib.staticfiles.storage.StaticFilesStorage'
if DEBUG
else 'whitenoise.storage.CompressedManifestStaticFilesStorage'
),
}, },
} }
@@ -0,0 +1,18 @@
# Generated by Django 6.0.4 on 2026-04-17 07:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tienda', '0005_savedpaymentmethod'),
]
operations = [
migrations.AlterField(
model_name='category',
name='name',
field=models.CharField(max_length=200, unique=True),
),
]
-1
View File
@@ -274,4 +274,3 @@ p.price {
color: #6c757d; color: #6c757d;
} }
/*# sourceMappingURL=custom.css.map */
+2 -2
View File
@@ -77,7 +77,7 @@
</style> </style>
{% block head %}{% endblock %} {% block head %}{% endblock %}
</head> </head>
<body> <body class="d-flex flex-column min-vh-100">
{% cache 500 sidebar request.user.username %} {% cache 500 sidebar request.user.username %}
<nav class="navbar navbar-expand-md header" role="banner"> <nav class="navbar navbar-expand-md header" role="banner">
<div class="container-fluid"> <div class="container-fluid">
@@ -135,7 +135,7 @@
</nav> </nav>
{% endcache %} {% endcache %}
<div class="container-fluid" role="main"> <div class="container-fluid flex-grow-1 d-flex flex-column" role="main">
<!-- Mensajes --> <!-- Mensajes -->
{% if messages %} {% if messages %}
<div class="row mt-3"> <div class="row mt-3">