diff --git a/web/forms.py b/web/forms.py index 66cc568..d5f4d5f 100644 --- a/web/forms.py +++ b/web/forms.py @@ -1,6 +1,8 @@ from django import forms from django.forms import widgets +from shop.models import CustomerAddress + class CartItemForm(forms.Form): """ @@ -35,3 +37,17 @@ class CreateOrderForm(forms.Form): billing_address_phone = forms.CharField(max_length=16, required=False) shipping_method = forms.IntegerField() + + +class CustomerAddressForm(forms.ModelForm): + class Meta: + model = CustomerAddress + fields = ( + "vat_id", + "full_name", + "address", + "address_town", + "address_zip", + "address_state", + "address_phone", + ) diff --git a/web/templates/components/users/retrieve_update_address.html b/web/templates/components/users/retrieve_update_address.html index cb85222..d6263e8 100644 --- a/web/templates/components/users/retrieve_update_address.html +++ b/web/templates/components/users/retrieve_update_address.html @@ -1,7 +1,13 @@ {% load i18n %} {% load static %} {% for address in customer_addresses %} -