shop
Raz 8 months ago
parent 9177b59198
commit aa2cdbcca9
  1. 18
      shop/migrations/0014_alter_size_name.py
  2. 17
      shop/models.py
  3. 6
      shop/templates/shop/cart.html
  4. 6
      shop/templates/shop/checkout.html
  5. 6
      shop/templates/shop/payment.html
  6. 6
      shop/templates/shop/payment_cancel.html
  7. 6
      shop/templates/shop/payment_success.html
  8. 2
      shop/templates/shop/product_item.html

@ -0,0 +1,18 @@
# Generated by Django 4.2.11 on 2025-03-20 09:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shop', '0013_color_colorhex_alter_color_name'),
]
operations = [
migrations.AlterField(
model_name='size',
name='name',
field=models.CharField(max_length=20, unique=True),
),
]

@ -1,4 +1,3 @@
from django.contrib.auth.models import User
from django.db import models
from django.conf import settings
@ -9,20 +8,6 @@ class OrderStatus(models.TextChoices):
DELIVERED = 'DELIVERED', 'Delivered'
CANCELED = 'CANCELED', 'Canceled'
class ColorChoices(models.TextChoices):
RED = "Red", "Red"
BLUE = "Blue", "Blue"
GREEN = "Green", "Green"
BLACK = "Black", "Black"
WHITE = "White", "White"
class SizeChoices(models.TextChoices):
SMALL = "S", "Small"
MEDIUM = "M", "Medium"
LARGE = "L", "Large"
XLARGE = "XL", "X-Large"
SINGLE = "SINGLE", "Unique"
class CutChoices(models.IntegerChoices):
WOMEN = 1, 'Women'
MEN = 2, 'Men'
@ -36,7 +21,7 @@ class Color(models.Model):
return self.name
class Size(models.Model):
name = models.CharField(max_length=20, choices=SizeChoices.choices, unique=True)
name = models.CharField(max_length=20, unique=True)
def __str__(self):
return self.name

@ -1,8 +1,8 @@
{% extends 'tournaments/base.html' %}
{% block head_title %}La boutique{% endblock %}
{% block first_title %}La boutique Padel Club{% endblock %}
{% block second_title %}Plein de goodies !{% endblock %}
{% block head_title %}La Boutique{% endblock %}
{% block first_title %}Padel Club{% endblock %}
{% block second_title %}La Boutique{% endblock %}
{% block content %}
<nav class="margin10">

@ -1,8 +1,8 @@
{% extends 'tournaments/base.html' %}
{% block head_title %}La boutique{% endblock %}
{% block first_title %}La boutique Padel Club{% endblock %}
{% block second_title %}Validation de la commande{% endblock %}
{% block head_title %}La Boutique{% endblock %}
{% block first_title %}Padel Club{% endblock %}
{% block second_title %}La Boutique{% endblock %}
{% block content %}

@ -1,8 +1,8 @@
{% extends 'tournaments/base.html' %}
{% block head_title %}Paiement{% endblock %}
{% block first_title %}La boutique Padel Club{% endblock %}
{% block second_title %}Paiement{% endblock %}
{% block head_title %}La Boutique{% endblock %}
{% block first_title %}Padel Club{% endblock %}
{% block second_title %}La Boutique{% endblock %}
{% block content %}
<nav class="margin10">

@ -1,9 +1,9 @@
<!-- padelclub_backend/shop/templates/shop/payment_cancel.html -->
{% extends 'tournaments/base.html' %}
{% block head_title %}La boutique{% endblock %}
{% block first_title %}La boutique Padel Club{% endblock %}
{% block second_title %}Paiement annulé{% endblock %}
{% block head_title %}La Boutique{% endblock %}
{% block first_title %}Padel Club{% endblock %}
{% block second_title %}La Boutique{% endblock %}
{% block content %}

@ -1,8 +1,8 @@
{% extends 'tournaments/base.html' %}
{% block head_title %}Paiement réussi{% endblock %}
{% block first_title %}La boutique Padel Club{% endblock %}
{% block second_title %}Paiement réussi{% endblock %}
{% block head_title %}La Boutique{% endblock %}
{% block first_title %}Padel Club{% endblock %}
{% block second_title %}La Boutique{% endblock %}
{% block content %}
<nav class="margin10">

@ -34,7 +34,7 @@
{% if product.sizes.exists %}
{% if product.sizes.all|length == 1 %}
<input type="hidden" name="size" value="{{ product.sizes.all.0.id }}">
<div>Taille Unique</div>
<div>{{ product.sizes.all.0.name }}</div>
{% else %}
<select name="size" id="size-{{ product.id }}" class="form-control" required>

Loading…
Cancel
Save