def node(entry): """Helper function to construct a node object.""" if entry.pk not in memo: memo.append(entry.pk) data['nodes'].append({'id': str(entry.pk), 'label': entry.title, 'text': recross(hyper(markdown(entry.text))), 'links': '<a href="%s">View</a> | <a href="%s">Update</a>' % (entry.get_absolute_url(), entry.get_update_url()), 'weight':random()})
def node(entry): """Helper function to construct a node object.""" if entry.pk not in memo: memo.append(entry.pk) data['nodes'].append({ 'id': str(entry.pk), 'label': entry.title, 'text': recross(hyper(markdown(entry.text))), 'links': '<a href="%s">View</a> | <a href="%s">Update</a>' % (entry.get_absolute_url(), entry.get_update_url()), 'weight': random() })
def render_text(self, record, value): #return mark_safe(record.brief()) return mark_safe(hyper(recross(record.brief())))
def render_description(self, record, value): return mark_safe(recross(hyper(value)))