Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
13f2e06
Borrador registro
WVH7591 Nov 6, 2025
bb08806
Merge pull request #20 from WBR4892/release/1.0
XGC1564 Nov 9, 2025
f886ec0
Dejar de rastrear db.sqlite3 (añadido a .gitignore)
Nov 11, 2025
1487274
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
WVH7591 Nov 11, 2025
3cda92b
Revisión estilo infoLegal
WVH7591 Nov 11, 2025
2aeba08
Merge pull request #21 from WBR4892/feature/infoLegalEssenza
WBR4892 Nov 11, 2025
18871ee
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
Nov 11, 2025
7ef60ee
fix: sample data
YRM2963 Nov 11, 2025
fdaa2c0
Merge pull request #22 from WBR4892/fix/database
WVH7591 Nov 11, 2025
7360ef6
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
Nov 11, 2025
b39908c
Arreglos de dashboard y desplegable con botones
Nov 11, 2025
eed0738
Merge pull request #23 from WBR4892/fix/user_management
WVH7591 Nov 11, 2025
85151b1
Borrador gestión de perfil
WVH7591 Nov 11, 2025
21fedc7
Funcionalidad de gestión de usuario finalizada y modificación de estr…
WVH7591 Nov 12, 2025
519d630
Añadido requirements.txt y cambios menores en el estilo de profile
WVH7591 Nov 12, 2025
b441e9e
Correción de datos de sampleo y funcionalidad de gestión de perfil
WVH7591 Nov 12, 2025
fb10573
Merge pull request #24 from WBR4892/feature/profile
WBR4892 Nov 12, 2025
428cd6c
Borrador escaparate
WVH7591 Nov 12, 2025
5adcb45
Creado archivo ejecutable para iniciar la db con datos de sampleo, añ…
WVH7591 Nov 12, 2025
082e929
Actualizado .gitignore y carpeta para imágenes de sampleo
WVH7591 Nov 12, 2025
b88f3f2
Funcionalidad de stock y formateo del código
Nov 12, 2025
e9064b5
Merge pull request #25 from WBR4892/fix/database
WBR4892 Nov 12, 2025
c89132d
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
Nov 12, 2025
df99cb0
Corrección de fusion de ramas
Nov 12, 2025
323f9a9
git rm -r --cached .
Nov 12, 2025
1685a6e
Corrección: si input vació, stock=0
Nov 12, 2025
37359b2
Cambio en los samples de User
WVH7591 Nov 12, 2025
e22c984
Merge pull request #27 from WBR4892/fix/database
WBR4892 Nov 13, 2025
6faf382
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
Nov 13, 2025
edcc3e0
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
WVH7591 Nov 13, 2025
2aae5a4
Restricción de que solo los admin puedan acceder al stock
Nov 13, 2025
654f6a6
Merge pull request #26 from WBR4892/feature/stock
WVH7591 Nov 13, 2025
26c9ba9
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
WVH7591 Nov 13, 2025
217f31e
fix: fix type of products
YRM2963 Nov 13, 2025
bb04777
fix: media
YRM2963 Nov 13, 2025
ed4106d
Merge pull request #28 from WBR4892/fix/database
WVH7591 Nov 13, 2025
4aa4496
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
WVH7591 Nov 13, 2025
73d0d1f
Cambios menores en dashboard
WVH7591 Nov 13, 2025
c4788e2
feat: first version navbar
YRM2963 Nov 13, 2025
c8fd66a
Funcionalidad de escaparate acabada y correción de botones de retorno
WVH7591 Nov 13, 2025
d91ca72
Finalizado dashboard
WVH7591 Nov 14, 2025
6d708b2
Merge pull request #29 from WBR4892/feature/dashboard
XGC1564 Nov 14, 2025
73b0c54
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
YRM2963 Nov 14, 2025
5e900ee
Funcionalidad CRUD productos junto con los tests
Nov 14, 2025
ad4c1a1
Funcionalidad CRUD productos junto con los tests
Nov 14, 2025
0dc9e28
fix: cambio en el placed_at del modelo Order
WVH7591 Nov 15, 2025
535c6fe
Merge pull request #32 from WBR4892/fix/database
WBR4892 Nov 15, 2025
7453c00
wip: borrador correcciones dashboard
WVH7591 Nov 15, 2025
9722036
wip: borrador correcciones dashboard
WVH7591 Nov 15, 2025
9cb5310
Funcionalidad dashboard lista con tests incluidos.
WVH7591 Nov 15, 2025
a3620c3
Merge branch 'feature/dashboard' of https://github.eii.us.es/WBR4892/…
WVH7591 Nov 15, 2025
7d9ea2d
Funcionalidad de CRUD productos y algunos de sus tests (faltan test d…
Nov 15, 2025
67fd025
Merge pull request #31 from WBR4892/feature/crudProducts
WVH7591 Nov 15, 2025
0c4d0ce
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
WVH7591 Nov 15, 2025
6132f4f
Añadido catálogo completo, plantilla de detalle y tests actualizados
KBC8043 Nov 15, 2025
3263e00
wip: revisión dashboard
WVH7591 Nov 15, 2025
8eba3db
wip: actualización con funcionalidades nuevas
WVH7591 Nov 15, 2025
aaa8272
añadida corrección tests
WVH7591 Nov 15, 2025
71462f7
Merge pull request #33 from WBR4892/feature/catalog
WVH7591 Nov 15, 2025
294b489
Funcionalidad dashboard terminada con tests y cambios menores en apli…
WVH7591 Nov 15, 2025
41c4dca
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
YRM2963 Nov 16, 2025
37aebba
Tests de funcionalidad de stock
Nov 16, 2025
80e53b8
Merge pull request #34 from WBR4892/feature/dashboard
WBR4892 Nov 16, 2025
14260aa
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
Nov 16, 2025
df73473
Merge pull request #57 from WBR4892/feature/stock
WVH7591 Nov 16, 2025
e0fe9f8
Test acabados de CRUD productos
Nov 17, 2025
e8444c6
Test acabados de CRUD productos
Nov 17, 2025
9bbe060
Merge pull request #59 from WBR4892/feature/crudProducts
WVH7591 Nov 17, 2025
37b8bb9
Merge branch 'develop' of https://github.eii.us.es/WBR4892/PGPI-G1.11…
YRM2963 Nov 17, 2025
61c4b90
feat: navbar actualizada
YRM2963 Nov 17, 2025
3af5535
Arreglo de fallos de stock.html
Nov 17, 2025
3da3adf
Arreglos de tests de user
Nov 17, 2025
19d4114
Merge pull request #60 from WBR4892/feature/navegation
WBR4892 Nov 17, 2025
5970b9b
Documentación de la Iteración 2
Nov 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ venv/
.venv

# Archivos de base de datos
db.sqlite3

# Archivos de migraciones (si quieres omitirlos)
**/migrations/__pycache__/
Expand All @@ -21,4 +22,5 @@ venv/
# Archivos de Django estáticos
staticfiles/

**/*.sqlite3
# Archivos subidos por el usuario
media/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/Iteración 2/SPRINT RETROSPECTIVE 2.pdf
Binary file not shown.
Binary file added docs/Iteración 2/SPRINT REVIEW 2.pdf
Binary file not shown.
Binary file added docs/Iteración 2/Sprint Backlog 2.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added essenza/_sample_assets/products/crema_pies.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added essenza/_sample_assets/products/crema_solar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added essenza/_sample_assets/products/desodorante.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added essenza/_sample_assets/products/laca_pelo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added essenza/_sample_assets/products/rizador_pelo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added essenza/_sample_assets/profile_pics/admin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed essenza/db.sqlite3
Binary file not shown.
7 changes: 7 additions & 0 deletions essenza/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pip install -r requirements.txt && \
python manage.py flush --noinput && \
python manage.py migrate --noinput && \
# python manage.py collectstatic --noinput && \
python manage.py loaddata user/sample/sample.json && \
python manage.py loaddata product/sample/sample.json && \
python manage.py loaddata order/sample/sample.json
94 changes: 50 additions & 44 deletions essenza/essenza/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-7+c*kj699pt34%5ub-x04i3%nlbhc@y+7sdew3+7!z5h-z1k_v'
SECRET_KEY = "django-insecure-7+c*kj699pt34%5ub-x04i3%nlbhc@y+7sdew3+7!z5h-z1k_v"

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
Expand All @@ -31,57 +31,58 @@
# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'user',
'product',
'order',
'info',
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.humanize",
"user",
"product",
"order",
"info",
]

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.locale.LocaleMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]

ROOT_URLCONF = 'essenza.urls'
ROOT_URLCONF = "essenza.urls"

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [ BASE_DIR / 'templates' ],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.request',
'django.template.context_processors.i18n',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.request",
"django.template.context_processors.i18n",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]

WSGI_APPLICATION = 'essenza.wsgi.application'
WSGI_APPLICATION = "essenza.wsgi.application"


# Database
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}

Expand All @@ -91,26 +92,26 @@

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",
},
]


# Internationalization
# https://docs.djangoproject.com/en/5.2/topics/i18n/

LANGUAGE_CODE = 'es'
LANGUAGE_CODE = "es"

TIME_ZONE = 'UTC'
TIME_ZONE = "UTC"

USE_I18N = True

Expand All @@ -120,16 +121,21 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.2/howto/static-files/

STATIC_URL = 'static/'
STATICFILES_DIRS = [BASE_DIR / 'static']
STATIC_URL = "static/"
STATICFILES_DIRS = [BASE_DIR / "static"]
STATIC_ROOT = BASE_DIR / "staticfiles"

MEDIA_URL = "/media/"
MEDIA_ROOT = BASE_DIR / "media"

# Default primary key field type
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

# -----------------------------------------------------------------
# SOLUCIÓN AL ERROR E304
# Especifica que nuestro modelo 'Usuario' en la app 'user'
# Especifica que nuestro modelo 'Usuario' en la app 'user'
# es el modelo de autenticación oficial.
# -----------------------------------------------------------------
AUTH_USER_MODEL = 'user.Usuario'
AUTH_USER_MODEL = "user.Usuario"
118 changes: 16 additions & 102 deletions essenza/essenza/urls.py
Original file line number Diff line number Diff line change
@@ -1,106 +1,20 @@
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from django.http import HttpResponse
from django.urls import include, path
from info.views import info_view
from product.views import EscaparateView
import user

def home(request):
html = """
<html>
<head>
<title>Essenza</title>
<style>
body {
background-color: #faf7f2;
font-family: 'Segoe UI', Arial, sans-serif;
text-align: center;
padding-top: 100px;
color: #444;
position: relative;
}
h1 {
color: #c06b3e;
font-size: 48px;
margin-bottom: 10px;
}
p {
font-size: 20px;
color: #555;
}
.info-button {
position: absolute;
top: 20px;
left: 20px;
width: 30px;
height: 30px;
background-color: #c06b3e;
border-radius: 50%;
text-align: center;
line-height: 30px;
font-size: 18px;
font-weight: bold;
color: white;
text-decoration: none;
cursor: pointer;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
transition: background-color 0.3s;
}
.info-button:hover { background-color: #a35a34; }
.button-container {
margin-top: 30px; /* Espacio desde el texto de arriba */
display: flex;
flex-direction: column; /* Apila los botones verticalmente */
align-items: center; /* Centra los botones horizontalmente */
gap: 20px; /* Espacio automático entre cada botón */
}
.action-button {
padding: 15px 35px;
background-color: #c06b3e;
color: white;
font-size: 15px;
font-weight: bold;
border: none;
border-radius: 10px;
cursor: pointer;
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
text-decoration: none;
transition: background-color 0.3s, transform 0.2s;
display: block;
width: 300px; /* Ancho fijo para que se vean uniformes */
box-sizing: border-box; /* Para que el padding no afecte el ancho */
}
.action-button:hover {
background-color: #a35a34;
transform: scale(1.05); /* Efecto de zoom simple */
}
</style>
</head>
<body>
<a href="/info/" class="info-button" title="Información Legal y Contacto">i</a>
<h1>Bienvenidos a Essenza</h1>
<p>Tu espacio online de cosmética natural, belleza y cuidado personal.</p>
<p>Explora nuestros productos, descubre nuevas fragancias y disfruta de la experiencia Essenza 🌸</p>
<div class="button-container">
<a href="/user/register" class="action-button" title="Registro">Registro</a>
<a href="/user/login" class="action-button" title="Iniciar Sesión">Iniciar sesión</a>
<a href="/escaparate" class="action-button" title="invitado">Continuar como invitado</a>
</div>
</body>
</html>
"""
return HttpResponse(html)
from product.views import DashboardView
from product.views import CatalogView, CatalogDetailView

urlpatterns = [
path('', home, name='home'),
path('info/', info_view, name='info-home'),
path("user/", include("user.urls")),
path('admin/', admin.site.urls),
path('escaparate/', EscaparateView.as_view(), name='escaparate')
]
path("info/", info_view, name="info-home"),
path("user/", include("user.urls")),
path("admin/", admin.site.urls),
path("product/", include("product.urls")),
path("", DashboardView.as_view(), name="dashboard"),
path("catalogo/", CatalogView.as_view(), name="catalog"),
path("catalogo/<int:pk>/", CatalogDetailView.as_view(), name="catalog_detail"),
]

if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Loading