Commit 96be4970 authored by Alice's avatar Alice

WIP: add a reviewer field to request model.

parent 851e8f60
......@@ -199,6 +199,7 @@ 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')
reviewer = models.ForeignKey(Mentor, null=True, verbose_name="Reviewer", related_name='requests')
created_on = models.DateTimeField(default=timezone.now)
class Meta:
......@@ -207,7 +208,7 @@ class Request (Model):
anonymous_perms = ['view']
authenticated_perms = ['inherit', 'add', 'change']
owner_field = 'submitter'
serializer_fields=["@id", "name", "description", "status", "skills", "fields", "language", "organisation", "submitter", "created_on", "target", "country"]
serializer_fields=["@id", "name", "description", "status", "skills", "fields", "language", "organisation", "submitter", "reviewer", "created_on", "target", "country"]
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