Skip to content

Commit

Permalink
make file optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ajatprabha committed Oct 23, 2018
1 parent 2fe5945 commit a0d88db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/project/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ class StudentProposal(models.Model):
project = models.ForeignKey(Project, on_delete=models.CASCADE, help_text='Proposal for the project')
student = models.ForeignKey(StudentProfile, on_delete=models.CASCADE, help_text='Name of the student proposed')
drive_link = models.URLField(help_text='Custom drive link for proposal')
file = models.FileField(upload_to='proposals', help_text='File link')
file = models.FileField(upload_to='proposals', null=True, blank=True, help_text='File link')
is_accepted = models.BooleanField(default=False, help_text='Accepted/Rejected')

class Meta:
unique_together = (('project', 'student'),)

def __str__(self):
return self.student.user.get_full_name() + " | " + self.project.name

0 comments on commit a0d88db

Please sign in to comment.