Commit 8725b98b authored by Alice's avatar Alice

Add reviewer to request model.

parent 96be4970
......@@ -199,7 +199,12 @@ class Request (Model):
target = models.CharField(max_length=32, choices=(('mentor', 'Mentor'), ('entrepreneur', 'Entrepreneur'), ('public', 'Public')), verbose_name="Target audience", blank=True, null=True)
submitter = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE, related_name='requests')
<<<<<<< Updated upstream
reviewer = models.ForeignKey(Mentor, null=True, verbose_name="Reviewer", related_name='requests')
reviewer = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE, related_name='reviewed_requests')
>>>>>>> Stashed changes
created_on = models.DateTimeField(
class Meta:
......@@ -208,7 +213,12 @@ class Request (Model):
anonymous_perms = ['view']
authenticated_perms = ['inherit', 'add', 'change']
owner_field = 'submitter'
<<<<<<< Updated upstream
serializer_fields=["@id", "name", "description", "status", "skills", "fields", "language", "organisation", "submitter", "reviewer", "created_on", "target", "country"]
serializer_fields=["@id", "name", "description", "skills", "fields", "language",\
"organisation", "submitter", "reviewer", "created_on", "target", "country"]
>>>>>>> Stashed changes
owner_perms = ['inherit', 'change', 'control', 'delete']
nested_fields=["language", "fields", "organisation", "submitter", "country"]
container_path = 'requests/'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment