Template
Add shopper accounts, reviews, tracking, and seed_demo (#9)
Closes #9. Shop-gated buyer accounts, purchase reviews, Stripe customer ids, shipment tracking, slim public contact form, and a template-neutral seed_demo command.
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