def yeni_ogrenci(): o = Ogrenci() o.tckn = ints(length=11) o.ad = fake.first_name() o.soyad = fake.last_name() o.cinsiyet = gender() o.uyruk = fake.country() o.medeni_hali = marital_status(student=True) o.ikamet_adresi = fake.address() o.ikamet_il = fake.state() o.ikamet_ilce = fake.state() o.e_posta = fake.email() o.kan_grubu = blood_type() o.ehliyet = driver_license_class() o.cuzdan_seri = id_card_serial() o.cuzdan_seri_no = ints(length=10) o.baba_adi = fake.first_name_male() o.ana_adi = fake.first_name_female() o.dogum_tarihi = birth_date(student=True) o.dogum_yeri = fake.state() o.tel_no = fake.phone_number() username = fake.slug(u'%s-%s' % (o.ad, o.soyad)) user = new_user(username=username) o.user = user o.save() return o
def yeni_ogrenci(): o = Ogrenci() o.tckn = ints(length=11) o.ad = fake.first_name() o.soyad = fake.last_name() o.cinsiyet = gender() o.uyruk = fake.country() o.medeni_hali = marital_status(student=True) o.ikamet_adresi = fake.address() o.ikamet_il = fake.state() o.ikamet_ilce = fake.state() o.adres_2 = fake.address() o.adres_2_posta_kodu = fake.postcode() o.oda_no = fake.classroom_code() o.e_posta = fake.email() o.web_sitesi = "http://%s" % fake.domain_name() o.yayinlar = "\n".join(fake.paragraphs()) o.projeler = "\n".join(fake.paragraphs()) o.kan_grubu = blood_type() o.ehliyet = driver_license_class() o.cuzdan_seri = id_card_serial() o.cuzdan_seri_no = ints(length=10) o.baba_adi = fake.first_name_male() o.ana_adi = fake.first_name_female() o.dogum_tarihi = birth_date(student=True) o.dogum_yeri = fake.state() o.tel_no = fake.phone_number() username = fake.slug(u"%s-%s" % (o.ad, o.soyad)) user = new_user(username=username) o.user = user o.save()
def yeni_ogrenci(self, ogrenci_say=1, program=None, personel=None, user=None): """ Rastgele veriler kullanarak yeni öğrenci kaydı oluştururup kaydeder. Oluşturulan kayıtları liste olarak döndürür. Args: ogrenci_say (int): Oluşturulacak ogrenci sayısı program (object): Ogrencinin kaydedilecegi program personel (object): Ogrencinin programdaki danisamani user (object): Ogrencinin atanacagi user Returns: Ogrenci (list): Yeni öğrenci kaydı """ ogrenci_list = [] for i in range(ogrenci_say): o = Ogrenci() o.tckn = ints(length=11) o.ad = fake.first_name() o.soyad = fake.last_name() o.cinsiyet = gender() o.uyruk = fake.country() o.medeni_hali = marital_status(student=True) o.ikamet_adresi = fake.address() o.ikamet_il = fake.state() o.ikamet_ilce = fake.state() o.e_posta = fake.email() o.kan_grubu = blood_type() o.ehliyet = driver_license_class() o.cuzdan_seri = id_card_serial() o.cuzdan_seri_no = ints(length=10) o.baba_adi = fake.first_name_male() o.ana_adi = fake.first_name_female() o.dogum_tarihi = birth_date(student=True) o.dogum_yeri = fake.state() o.tel_no = fake.phone_number() if user: o.user = user else: username = fake.slug(u'%s-%s' % (o.ad, o.soyad)) user = new_user(username=username) o.user = user o.save() ogrenci_list.append(o) if program and personel: self.yeni_ogrenci_program(ogrenci=o, program=program, personel=personel) return ogrenci_list
def yeni_ogrenci(): """ Rastgele verileri kullanarak yeni öğrenci kaydı oluştururup kaydeder. """ o = Ogrenci() o.tckn = ints(length=11) o.ad = fake.first_name() o.soyad = fake.last_name() o.cinsiyet = gender() o.uyruk = fake.country() o.medeni_hali = marital_status(student=True) o.ikamet_adresi = fake.address() o.ikamet_il = fake.state() o.ikamet_ilce = fake.state() o.adres_2 = fake.address() o.adres_2_posta_kodu = fake.postcode() o.oda_no = fake.classroom_code() o.e_posta = fake.email() o.web_sitesi = "http://%s" % fake.domain_name() o.yayinlar = '\n'.join(fake.paragraphs()) o.projeler = '\n'.join(fake.paragraphs()) o.kan_grubu = blood_type() o.ehliyet = driver_license_class() o.cuzdan_seri = id_card_serial() o.cuzdan_seri_no = ints(length=10) o.baba_adi = fake.first_name_male() o.ana_adi = fake.first_name_female() o.dogum_tarihi = birth_date(student=True) o.dogum_yeri = fake.state() o.tel_no = fake.phone_number() username = fake.slug(u'%s-%s' % (o.ad, o.soyad)) user = new_user(username=username) o.user = user o.save()
def yeni_ogrenci(): """ Rastgele veriler kullanarak yeni öğrenci kaydı oluştururup kaydeder. Returns: Ogrenci: Yeni öğrenci kaydı """ o = Ogrenci() o.tckn = ints(length=11) o.ad = fake.first_name() o.soyad = fake.last_name() o.cinsiyet = gender() o.uyruk = fake.country() o.medeni_hali = marital_status(student=True) o.ikamet_adresi = fake.address() o.ikamet_il = fake.state() o.ikamet_ilce = fake.state() o.e_posta = fake.email() o.kan_grubu = blood_type() o.ehliyet = driver_license_class() o.cuzdan_seri = id_card_serial() o.cuzdan_seri_no = ints(length=10) o.baba_adi = fake.first_name_male() o.ana_adi = fake.first_name_female() o.dogum_tarihi = birth_date(student=True) o.dogum_yeri = fake.state() o.tel_no = fake.phone_number() username = fake.slug(u'%s-%s' % (o.ad, o.soyad)) user = new_user(username=username) o.user = user o.save() return o