first commit

This commit is contained in:
javad committed 2026-06-15 10:57:28 +03:30
commit 3e4574dcdd
163 files changed
+3559

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
from django.contrib.auth import get_user_model
from django.db import models
from apps.appsetting.models import City as CityModel
# Create your models here.
CUserModel = get_user_model()
class UserProfile(models.Model):
cuser = models.OneToOneField(CUserModel, on_delete=models.CASCADE, related_name='user_profile')
codemeli = models.PositiveBigIntegerField(null=False, blank=False)
city = models.ForeignKey(CityModel, on_delete=models.SET_NULL, null=True, blank=True)
address = models.CharField(max_length=500, null=False, blank=False)
codeposti = models.CharField(max_length=15, null=False, blank=False)
ax_mojri = models.ImageField(upload_to='mojri/', null=True, blank=True)
ax_meli = models.ImageField(upload_to='meli/', null=True, blank=True)
ax_fani = models.ImageField(upload_to='fani/', null=True, blank=True)
ax_sayer = models.ImageField(upload_to='sayer/', null=True, blank=True)
def __str__(self):
return f'{self.cuser.name_family}'