generated from westfarn/web_django_template
Add customer accounts, shipment tracking, and purchase reviews.
CI / test (pull_request) Successful in 35s
CI / test (pull_request) Successful in 35s
Shoppers can register, save shipping details, and view order history while cards stay on Stripe. EasyPost tracker updates (including numbers from Pirate Ship) and 1–5 star reviews are limited to buyers. The contact form now only asks for email and a message.
This commit is contained in:
@@ -17,3 +17,19 @@ class RealtorProfile(TimeStampedModel):
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.display_name or self.user.get_username()
|
||||
|
||||
|
||||
class CustomerProfile(TimeStampedModel):
|
||||
"""Shop-buyer profile. Card numbers stay on Stripe; we only keep the customer id."""
|
||||
|
||||
user = models.OneToOneField(
|
||||
settings.AUTH_USER_MODEL,
|
||||
on_delete=models.CASCADE,
|
||||
related_name="customer_profile",
|
||||
)
|
||||
phone = models.CharField(max_length=32, blank=True)
|
||||
shipping_address = models.JSONField(default=dict, blank=True)
|
||||
stripe_customer_id = models.CharField(max_length=255, blank=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.user.get_username()
|
||||
|
||||
Reference in New Issue
Block a user