Ejemplo n.º 1
0
 def get_content(self, obj):
     fields = [
         obj.summary,
         obj.description,
         ', '.join([t.name for t in obj.tags.all()]),
     ]
     return render.render_fields(fields)
Ejemplo n.º 2
0
 def get_content(self, obj):
     fields = [
         obj.url,
         obj.asset.url if obj.asset else '',
         ', '.join([t.name for t in obj.tags.all()]),
     ]
     return render.render_fields(fields)
Ejemplo n.º 3
0
 def test_fields_are_rendered_correctly(self):
     fields = [
         'foo',
         '',
     ]
     result = render.render_fields(fields)
     eq_(result, 'foo')
Ejemplo n.º 4
0
 def get_content(self, obj):
     fields = [
         obj.description,
         obj.connections,
         obj.estimated_passes,
         ', '.join([f.name for f in obj.features.all()]),
         ', '.join([t.name for t in obj.tags.all()]),
     ]
     if obj.network_speed:
         fields.append(obj.network_speed.name)
     if obj.organization:
         fields.append(obj.organization.name)
     return render.render_fields(fields)
Ejemplo n.º 5
0
 def get_content(self, obj):
     domain = obj.domain.name if obj.domain else ""
     fields = [
         obj.summary,
         obj.impact_statement,
         obj.assistance,
         obj.team_description,
         obj.acknowledgments,
         ", ".join([t.name for t in obj.tags.all()]),
         domain,
         ", ".join([f.name for f in obj.features.all()]),
     ]
     return render.render_fields(fields)
Ejemplo n.º 6
0
 def get_content(self, obj):
     fields = [
         ', '.join([t.name for t in obj.tags.all()]),
     ]
     return render.render_fields(fields)
Ejemplo n.º 7
0
 def get_content(self, obj):
     fields = [
         strip_tags(obj.content_html),
         ', '.join([t.name for t in obj.tags.all()]),
     ]
     return render.render_fields(fields)