# Path: kullanici/models.py
# class IsArayan(models.Model):
#     kullanici = models.OneToOneField(User,related_name="is_arayan")
#     hizmetler = models.ManyToManyField(Hizmet,related_name="hizmetler")
#     CinsiyetSecenekleri = (
#         ('E', 'Erkek'),
#         ('K', 'Kadın'),
#     )
#     ISARAYANTIPI = (
#         ('S', 'Şirket'),
#         ('B', 'Bireysel'),
#     )
#     cinsiyet = models.CharField(max_length=1, choices=CinsiyetSecenekleri,blank=True, null=True)
#     isArayanTipi = models.CharField(max_length=1, choices=ISARAYANTIPI,blank=True, null=True)
#     dogumGunu = models.DateField(blank=True, null=True,default=datetime.date.today)
#     telefon = models.CharField(max_length=12,blank=True, null=True)
#     fotograf = models.ImageField(blank=True, null=True,upload_to="kullanicilar")
# 
#     def getIsArayan(kullaniciID):
#         return IsArayan.objects.get(pk=kullaniciID)
# 
#     def __str__(self):
#         return self.kullanici.username
# 
#     class Meta:
#         verbose_name ="İş Arayan Profili"
#         verbose_name_plural="İş Arayan  Profilleri"
# 
# class IsVeren(models.Model):
#     kullanici = models.OneToOneField(User,related_name="is_veren")
#     cinsiyetSecenekleri = (
#         ('E', 'Erkek'),
#         ('K', 'Kadın'),
#     )
#     cinsiyet = models.CharField(max_length=1, choices=cinsiyetSecenekleri,blank=True, null=True)
#     dogumGunu = models.DateField(blank=True, null=True,default=datetime.date.today)
#     telefon = models.CharField(max_length=12,blank=True, null=True)
#     fotograf = models.ImageField(blank=True, null=True,upload_to="users")
#     
#     def __str__(self):
#         return self.kullanici.username
#     
#     def getIsveren(kullaniciID):
#         return IsVeren.objects.get(pk=kullaniciID)
# 
#     class Meta:
#         verbose_name ="İş Veren Profili"
#         verbose_name_plural="İş Veren Profilleri"
# 
# Path: adres/models.py
# class Adres(models.Model):
#     kullanici = models.ForeignKey(IsVeren,related_name="adres")
#     adres_basligi = models.CharField(max_length=50)
#     adres = models.CharField(max_length=80)
#     sehir = models.CharField(max_length=40)
#     ilce = models.CharField(max_length=40,blank=True, null=True)
#     semt = models.CharField(max_length=40,blank=True, null=True)
#     mahalle = models.CharField(max_length=40,blank=True, null=True)
#     sokak = models.CharField(max_length=40,blank=True, null=True)
#     no = models.CharField(max_length=10,blank=True, null=True)
#     posta_kodu = models.CharField(max_length=40,blank=True, null=True)
# 
#     def __str__(self):
#         return self.kullanici.kullanici.username + " " + self.adres_basligi
# 
#     class Meta:
#         verbose_name ="İş Veren Adresi"
#         verbose_name_plural="İş Veren Adresleri"
# 
#     def adresSec(adresID):
#         return Adres.objects.get(pk=adresID)


from django.contrib import admin
from .models import IsArayan,IsVeren
from adres.models import Adres

# Register your models here.

admin.site.register(IsArayan)

 
class IsVerenInline(admin.StackedInline):
    model = Adres 

class ExtendedVendorAdmin(admin.ModelAdmin):
    inlines = (IsVerenInline,)

  

# Path: kullanici/models.py
# class IsArayan(models.Model):
#     kullanici = models.OneToOneField(User,related_name="is_arayan")
#     hizmetler = models.ManyToManyField(Hizmet,related_name="hizmetler")
#     CinsiyetSecenekleri = (
#         ('E', 'Erkek'),
#         ('K', 'Kadın'),
#     )
#     ISARAYANTIPI = (
#         ('S', 'Şirket'),
#         ('B', 'Bireysel'),
#     )
#     cinsiyet = models.CharField(max_length=1, choices=CinsiyetSecenekleri,blank=True, null=True)
#     isArayanTipi = models.CharField(max_length=1, choices=ISARAYANTIPI,blank=True, null=True)
#     dogumGunu = models.DateField(blank=True, null=True,default=datetime.date.today)
#     telefon = models.CharField(max_length=12,blank=True, null=True)
#     fotograf = models.ImageField(blank=True, null=True,upload_to="kullanicilar")
# 
#     def getIsArayan(kullaniciID):
#         return IsArayan.objects.get(pk=kullaniciID)
# 
#     def __str__(self):
#         return self.kullanici.username
# 
#     class Meta:
#         verbose_name ="İş Arayan Profili"
#         verbose_name_plural="İş Arayan  Profilleri"
# 
# class IsVeren(models.Model):
#     kullanici = models.OneToOneField(User,related_name="is_veren")
#     cinsiyetSecenekleri = (
#         ('E', 'Erkek'),
#         ('K', 'Kadın'),
#     )
#     cinsiyet = models.CharField(max_length=1, choices=cinsiyetSecenekleri,blank=True, null=True)
#     dogumGunu = models.DateField(blank=True, null=True,default=datetime.date.today)
#     telefon = models.CharField(max_length=12,blank=True, null=True)
#     fotograf = models.ImageField(blank=True, null=True,upload_to="users")
#     
#     def __str__(self):
#         return self.kullanici.username
#     
#     def getIsveren(kullaniciID):
#         return IsVeren.objects.get(pk=kullaniciID)
# 
#     class Meta:
#         verbose_name ="İş Veren Profili"
#         verbose_name_plural="İş Veren Profilleri"
# 
# Path: adres/models.py
# class Adres(models.Model):
#     kullanici = models.ForeignKey(IsVeren,related_name="adres")
#     adres_basligi = models.CharField(max_length=50)
#     adres = models.CharField(max_length=80)
#     sehir = models.CharField(max_length=40)
#     ilce = models.CharField(max_length=40,blank=True, null=True)
#     semt = models.CharField(max_length=40,blank=True, null=True)
#     mahalle = models.CharField(max_length=40,blank=True, null=True)
#     sokak = models.CharField(max_length=40,blank=True, null=True)
#     no = models.CharField(max_length=10,blank=True, null=True)
#     posta_kodu = models.CharField(max_length=40,blank=True, null=True)
# 
#     def __str__(self):
#         return self.kullanici.kullanici.username + " " + self.adres_basligi
# 
#     class Meta:
#         verbose_name ="İş Veren Adresi"
#         verbose_name_plural="İş Veren Adresleri"
# 
#     def adresSec(adresID):
#         return Adres.objects.get(pk=adresID)


# Path: kullanici/admin.py
from django.contrib import admin
from .models import IsArayan,IsVeren
from adres.models import Adres


# Register your models here.

admin.site.register(IsArayan)

 
class IsVerenInline(admin.StackedInline):
    model = Adres 

class ExtendedVendorAdmin(admin.ModelAdmin):
    inlines = (IsVerenInline,)

  

admin.site.register(IsVeren,ExtendedVendorAdmin)