from django.db import models class Volonteer(models.Model): realname = models.CharField(max_length=200, null=True) email = models.CharField(max_length=200, null=True) username = models.CharField(max_length=200, null=True) class Meta: abstract = True class Project(Volonteer): name = models.CharField(max_length=200) start = models.DateTimeField('start date') # contact = models.ForeignKey(Volonteer, on_delete = models.CASCADE, null = True) def __str__(self): return self.name class HonoraryCertificate(Volonteer): request_url = models.CharField(max_length=400) #can urls be longer in theory? number = models.IntegerField(null = True) def __str__(self): return "Certificate for " + self.realname class Library(Volonteer): library = models.CharField(max_length=200) cost = models.CharField(max_length=10) duration = models.CharField(max_length=100) notes = models.CharField(max_length=500) def __str__(self): return self.library