Esempio n. 1
0
 def prepare_field_value(self, val):
     #if isinstance(val, File):
     #    if hasattr(val, 'name'):
     #        val = val.name
     #    else:
     #        val = None
     if isinstance(val, Link):
         val = Link.get_absolute_url()
     return val
Esempio n. 2
0
 def prepare_field_value(self, val):
     #if isinstance(val, File):
     #    if hasattr(val, 'name'):
     #        val = val.name
     #    else:
     #        val = None
     if isinstance(val, Link):
         val = Link.get_absolute_url()
     return val
Esempio n. 3
0
 def prepare_field_value(self, val):
     val = super(JSON, self).prepare_field_value(val)
     if isinstance(val, Link):
         val = Link.get_absolute_url()
     return val
Esempio n. 4
0
 def prepare_field_value(self, val):
     val = super(CollectionJSON, self).prepare_field_value(val)
     if isinstance(val, Link):
         val = Link.get_absolute_url()
     return val