def setup_columns(self, *args, **kwargs):
name_link_template = '''
<a href="{% url 'recipedetails' extra.pid data.pk %}">{{data.name}}</a>
'''
self.add_column(title="Image recipe",
help_text="When you build an image recipe, you get an "
"image: a root file system you can"
"deploy to a machine",
hideable=False,
orderable=True,
static_data_name="name",
static_data_template=name_link_template,
field_name="name")
super(ImageRecipesTable, self).setup_columns(*args, **kwargs)
self.add_column(title="Customise",
hideable=False,
filter_name="in_current_project",
static_data_name="customise-or-add-recipe",
static_data_template='{% include "customise_btn.html" %}')
评论列表
文章目录