Commit e49da7c1 authored by Benoit Alessandroni's avatar Benoit Alessandroni

Adding country field to serializer and nested

parent c4c44503
......@@ -103,8 +103,9 @@ class Mentor(Model):
class Meta:
auto_author = 'user'
serializer_fields=["@id", "phone", "headline", "biography", "city", "skills", "linkedin", "twitter", "organisation", "fields", "languages"]
nested_fields=["user", "organisation", "fields", "languages"]
serializer_fields=["@id", "phone", "headline", "biography", "city", "skills", "linkedin",\
"twitter", "organisation", "fields", "languages", "country"]
nested_fields=["user", "organisation", "fields", "languages", "country"]
container_path = 'mentors/'
rdf_type = 'coopstarter:mentor'
owner_field = 'user'
......@@ -170,9 +171,9 @@ class Resource (Model):
owner_field = 'submitter'
owner_perms = ['inherit', 'change', 'control', 'delete']
nested_fields=["format", "conversations", "steps", "language", "fields",\
"type", "submitter", "related", "likes", "review"]
"type", "submitter", "related", "likes", "review", "country"]
serializer_fields=["@id", "name", "description", "skills", "author", "target", "uri", "publication_year", "format",\
"conversations", "steps", "language", "fields",\
"conversations", "steps", "language", "fields", "country"\
"type", "submitter", "related", "likes", "review", "sharing", "preview_image"]
container_path = 'resources/'
rdf_type = 'coopstarter:resource'
......@@ -180,10 +181,6 @@ class Resource (Model):
authenticated_perms = ['inherit', 'add']
rdf_context = {'preview_image': 'foaf:depiction'}
def dehydrate_country(self):
def __str__(self):
......@@ -209,15 +206,13 @@ class Request (Model):
anonymous_perms = ['view']
authenticated_perms = ['inherit', 'add']
owner_field = 'submitter'
serializer_fields=["@id", "name", "description", "skills", "fields", "language", "organisation", "submitter", "created_on", "target"]
serializer_fields=["@id", "name", "description", "skills", "fields", "language",\
"organisation", "submitter", "created_on", "target", "country"]
owner_perms = ['inherit', 'change', 'control', 'delete']
nested_fields=["language", "fields", "organisation", "submitter"]
nested_fields=["language", "fields", "organisation", "submitter", "country"]
container_path = 'requests/'
rdf_type = 'coopstarter:request'
def dehydrate_country(self):
def __str__(self):
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