Hi,
I am rather new to django and not sure how to set up the relationship for all the fields of a resume app.
Let's say each user can have 1 or more resume. In each Resume, there is a introduction/about, 1 or more education entries and 1 or more previous job entries.
Is this correct?
class Resume(models.Model):
about = models.TextField(max_length=500)
applicant = models.ForeignKey(User)
class Education(models.Model):
school = models.CharField(max_length=100)
course = models.CharField(max_length=100)
Resume = models.ForeignKey(Resume)
start_date = models.DateField(blank=True, null=True)
end_date = models.DateField(blank=True, null=True)
class Job(models.Model):
title = models.CharField(max_length=100)
company = models.CharField(max_length=100)
Resume = models.ForeignKey(Resume)
start_date = models.DateField(blank=True, null=True)
end_date = models.DateField(blank=True, null=True)
What should I do in the view or form to let user to add more education or job fields?
Or I could only set it up certain amount of entries for each model, for example 3 eduction entries and 5 previous jobs.
Is there anyway I can do that dynamically so I can just start with 1 for each model and let the user add more if they need to?
Thanks