class Human(models.Model):
name=models.CharField(max_length=100)
GENDER_CHOICE=((u‘M‘,u‘Male‘),(u‘F‘,u‘Female‘),)
gender=models.CharField(max_length=2,choices=GENDER_CHOICE,null=True)
class Meta:
abstract=True
class Employee(Human):
joint_date=models.DateField()
class Customer(Human):
first_name=models.CharField(max_length=100)
birth_day=models.DateField()
$ python manage.py syncdb
Creating tables ...
Creating table myapp_employee
Creating table myapp_customer
Installing custom SQL ...
Installing indexes ...
No fixtures found.