> I have a lot of models for classifications. All of them have similar > attributes. When I try to use inheritance in the models design, the > admin interface doesn't work with ForeignKey fields. > > Example: > > class BasicModel(models.Model): > name=models.CharField(maxlength=30) > def __str__(self): > return self.name > > class Reference(BasicModel): > class Admin: > pass > > class Data(BasicModel): > ref = models.ForeingKey(Reference) > class Admin: > pass > > Here, the ref field doesn't show all of their records in the Admin Add > Data form.
You will likely run into all kinds of problems. Model Inheritance is currently not supported in Django. There has been discussions and proposals on the topic so I suspect that it will be available at some point. See here: http://code.djangoproject.com/wiki/ModelInheritance Michael Trier blog.michaeltrier.com --~--~---------~--~----~------------~-------~--~----~ 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] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---