H.İbrahim YILMAZ wrote:
> A.S. Gaffar Durmaz wrote:
>   
>> dediğiniz yerde şu şekilde olmalı hatta biraz düzeltelim 
>>
>> class Ogrenci(models.Model):
>>         no = models.CharField(max_length=200)
>>         ad = models.CharField(max_length=200)
>>         soyad = models.CharField(max_length=200)
>>         sinif = models.CharField(max_length=200)
>>
>> #burada zaten öğrenciyi id si ile tutmuş olacaksın :)
>> class Devamsizlik(models.Model):
>>         ogrenci = models.ForeignKey(Ogrenci)
>>         tarih = models.DateTimeField() # bu hem tarih hem zaman
>>         tarih = models.DateField() # bu sadece tarih
>>
>> ii çalışmalar kolay gelsin
>>
>> On Tue, 2010-01-19 at 12:16 +0200, "H.İbrahim YILMAZ" wrote:
>>   
>>     
>>> class Devamsizlik(models.Model):
>>>         ogrencino = models.?
>>>         tarih = models.?
>>>     
>>>       
>> _______________________________________________
>> Linux-programlama mailing list
>> [email protected]
>> http://liste.linux.org.tr/mailman/listinfo/linux-programlama
>> Liste kurallari: http://liste.linux.org.tr/kurallar.php
>>   
>>     
> Merhaba,
> NameError: name 'Ogrenci' is not defined
> şeklinde bir hata alıyorum :S sql'i oluşturamıyor
> Saygılar.
>
>
>   
Aşağıdaki şekilde kullanmak lazımmış :)

ogrenci = models.ForeignKey('Ogrenci')


-- 
H.İbrahim YILMAZ
Sales & Technical Manager
Marmara Bilişim
Hürriyet Sokak 6/A YALOVA
Tel: +90 226 813 3131
http://www.bilisimmarmara.com.tr

_______________________________________________
Linux-programlama mailing list
[email protected]
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Liste kurallari: http://liste.linux.org.tr/kurallar.php

Cevap