Commit 22c5e978 authored by Alexandre's avatar Alexandre

update: all models back to depth=0

parent e9dd0f42
......@@ -17,8 +17,7 @@ import itertools
Conversation._meta.permission_classes = [ThreadPermission]
User._meta.serializer_fields = ['@id', 'username', 'first_name', 'last_name', 'email', 'actions', 'created_actions', 'get_full_name', 'userprofile']
User._meta.rdf_context = {"get_full_name": "rdfs:label", "photo": "foaf:depiction"}
User._meta.depth = 1
User._meta.many_depth = 0
User._meta.depth = 0
User._meta.get_field('username').verbose_name = "Email"
#def active_actions(self):
# return json.dumps(list(self.actions.filter(date__gte=date.today())))
......@@ -45,6 +44,7 @@ class ResourceLink(Model):
return self.title
class Meta:
depth = 0
serializer_fields = ['@id','title', 'url']
......@@ -55,6 +55,9 @@ class ActionTheme(Model):
def __str__(self):
return self.name
class Meta:
depth = 0
class Action(Model):
created_at = models.DateTimeField(auto_now_add=True)
......@@ -92,7 +95,6 @@ class Action(Model):
nested_fields=[ "links", "actions", "conversation", "members"]
permission_classes=[AnonymousReadOnly]
depth = 0
many_depth = 0
ordering=['-created_at']
rdf_context = {"geo": 'http://www.w3.org/2003/01/geo/wgs84_pos#', "lat": "geo:lat", "lng": "geo:long"}
......@@ -107,6 +109,7 @@ class Info(Model):
url = models.URLField(max_length=9999999, blank=True, verbose_name=u"URL de l'article")
class Meta:
depth = 0
ordering=['-created_at']
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