Commit 8d67d353 authored by Benoit Alessandroni's avatar Benoit Alessandroni

Merge branch 'master' into feature/brokenlink

parents 1a796f6e fa00d1b0
This diff is collapsed.
......@@ -138,7 +138,7 @@ class Review (Model):
class Resource (Model):
# Mandatory Fields
name = models.CharField(max_length=32, verbose_name="Title")
name = models.CharField(max_length=128, verbose_name="Title")
format = models.ForeignKey(Format, null=True, related_name='resources')
publication_year = models.IntegerField(verbose_name="Publication Year")
......@@ -188,8 +188,9 @@ class Resource (Model):
class Request (Model):
# Mandatory Fields
name = models.CharField(max_length=32, verbose_name="Title")
name = models.CharField(max_length=128, verbose_name="Title")
description = models.TextField(verbose_name="Description")
status = models.CharField(max_length=32, verbose_name="Status", choices=(('pending', 'Pending'), ('validated', 'Validated')), default="pending")
language = models.ForeignKey(Language, blank=True, verbose_name="Language")
fields = models.ManyToManyField(Field, blank=True)
......@@ -200,13 +201,15 @@ 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:
ordering = ['-created_on']
auto_author='submitter'
anonymous_perms = ['view']
authenticated_perms = ['inherit', 'add']
authenticated_perms = ['inherit', 'add', 'change']
owner_field = 'submitter'
serializer_fields=["@id", "name", "description", "skills", "fields", "language",\
"organisation", "submitter", "reviewer", "created_on", "target", "country", "status"]
......
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