You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
653 B
Python
17 lines
653 B
Python
from django_prometheus.models import ExportModelOperationsMixin
|
|
from django.db import models
|
|
from django.contrib.auth.models import User
|
|
|
|
|
|
class UserShippingAddress(ExportModelOperationsMixin('shipping_address'), models.Model):
|
|
user = models.ForeignKey(User, related_name='profile', on_delete=models.CASCADE)
|
|
address1 = models.CharField(max_length=100)
|
|
address2 = models.CharField(max_length=100, blank=True)
|
|
city = models.CharField(max_length=100)
|
|
state = models.CharField(max_length=60)
|
|
country = models.CharField(max_length=60)
|
|
zip = models.PositiveIntegerField()
|
|
|
|
def __str__(self):
|
|
return self.user.username
|