You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
502 B

from django.db import models
class Volonteer(models.Model):
name = models.CharField(max_length=200)
email = models.CharField(max_length=200)
username = models.CharField(max_length=200)
def __str__(self):
return self.name
class Project(models.Model):
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