Capability Problem With Django ORM

2008-01-23 Thread xunSir
class Person(models.Model): PIN = models.CharField(maxlength=20, primary_key=True) Name = models.CharField(maxlength=20) class Burse(models.Model): PIN = models.ForeignKey(Person) Cash = models.IntegerField() With HTML Page: show

How to get a model's fk's host class?

2008-01-23 Thread xunSir
class Person(models.Model): PIN = models.CharField(maxlength=20, primary_key=True) Name = models.CharField(maxlength=20) class Burse(models.Model): PIN = models.ForeignKey(Person) Cash = models.IntegerField() === p = Person(..) m = p._meta m.get_all_rela

Re: Get model's attributes

2007-10-10 Thread xunSir
Now, it's OK! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED]

Get model's attributes

2007-10-09 Thread xunSir
class Address(models.Model): name = models.CharField('uname', maxlength=20, unique=True) mobile = models.CharField('umobile', maxlength=11) room = models.CharField('uroom', maxlength=10) class Admin: list_display = ('name', 'mobile', 'room') ===