Commit 1d774735 authored by Benoit Alessandroni's avatar Benoit Alessandroni

Merge branch 'fixtures/add-reviewer-field-to-request' into 'master'

Fixtures/add reviewer field to request

See merge request !62
parents 21d0385b ff3327f8
......@@ -199,6 +199,8 @@ 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(settings.AUTH_USER_MODEL, null=True, on_delete=models.CASCADE, related_name='reviewed_requests')
created_on = models.DateTimeField(default=timezone.now)
class Meta:
......@@ -207,7 +209,8 @@ 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", "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