diff --git a/.gitignore b/.gitignore
index aa7ea9b..8c73834 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
# environment variables
.env
+
# virtual env
venv/
diff --git a/back_latienda/settings/base.py b/back_latienda/settings/base.py
index 4996fc6..af2f1b1 100644
--- a/back_latienda/settings/base.py
+++ b/back_latienda/settings/base.py
@@ -85,7 +85,7 @@ TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, '../templates'),],
- 'APP_DIRS': True,
+ # 'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
@@ -93,6 +93,12 @@ TEMPLATES = [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
+ 'loaders': [
+ (
+ 'django.template.loaders.filesystem.Loader',
+ [os.path.join(BASE_DIR, '../templates')],
+ ),
+ ],
},
},
]
@@ -153,7 +159,7 @@ USE_TZ = True
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
-
+STATIC_ROOT = 'static'
TAXONOMY_FILE = 'shop-taxonomy.es-ES.txt'
diff --git a/products/views.py b/products/views.py
index c756044..ff800cd 100644
--- a/products/views.py
+++ b/products/views.py
@@ -292,7 +292,7 @@ def purchase_email(request):
return Response({"error": "Related compay has no contact email address"}, status=status.HTTP_406_NOT_ACCEPTABLE)
try:
# send email to company
- company_message = render_to_string('purchase_notification.html', {
+ company_message = render_to_string('purchase_notification_v2.html', {
'company': company,
'user': request.user,
'product': product,
diff --git a/static/.gitignore b/static/.gitignore
new file mode 100644
index 0000000..c96a04f
--- /dev/null
+++ b/static/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
\ No newline at end of file
diff --git a/templates/purchase_notification_v1.html b/templates/purchase_notification_v1.html
new file mode 100755
index 0000000..6dfee51
--- /dev/null
+++ b/templates/purchase_notification_v1.html
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+ Interés en copra de producto
+
+
+
+
+
+
+
+
+
+
+
Enlace al producto
+
Nombre del producto: {{product.name}}
+
{{product.sku}}
+
{{product.price}}
+
+
+
Datos cliente
+
+ - Nombre:
+ - {{user.full_name}}
+ - Email:
+ - {{user.email}}
+ - Teléfono:
+ - {{telephone}}
+ - Comentarios:
+ - {{comment}}
+
+
+
+
+
+
+
+
+
diff --git a/templates/purchase_notification.html b/templates/purchase_notification_v2.html
similarity index 99%
rename from templates/purchase_notification.html
rename to templates/purchase_notification_v2.html
index 522c0e5..69ff976 100755
--- a/templates/purchase_notification.html
+++ b/templates/purchase_notification_v2.html
@@ -6,9 +6,6 @@
>
-
-
-