more generic views
This commit is contained in:
@ -13,6 +13,7 @@ class RecipeTable(tables.Table):
|
||||
attrs={'td': {'class': 'd-none d-lg-table-cell'}, 'th': {'class': 'd-none d-lg-table-cell'}})
|
||||
all_tags = tables.Column(
|
||||
attrs={'td': {'class': 'd-none d-lg-table-cell'}, 'th': {'class': 'd-none d-lg-table-cell'}})
|
||||
delete = tables.TemplateColumn("<a href='{% url 'delete_recipe' record.id %}' >" + _('Delete') + "</a>") # TODO remove and put into edit page
|
||||
|
||||
class Meta:
|
||||
model = Recipe
|
||||
@ -22,6 +23,7 @@ class RecipeTable(tables.Table):
|
||||
|
||||
class CategoryTable(tables.Table):
|
||||
id = tables.LinkColumn('edit_category', args=[A('id')])
|
||||
delete = tables.TemplateColumn("<a href='{% url 'delete_category' record.id %}' >" + _('Delete') + "</a>")
|
||||
|
||||
class Meta:
|
||||
model = Category
|
||||
@ -31,6 +33,7 @@ class CategoryTable(tables.Table):
|
||||
|
||||
class KeywordTable(tables.Table):
|
||||
id = tables.LinkColumn('edit_keyword', args=[A('id')])
|
||||
delete = tables.TemplateColumn("<a href='{% url 'delete_keyword' record.id %}' >" + _('Delete') + "</a>")
|
||||
|
||||
class Meta:
|
||||
model = Keyword
|
||||
|
Reference in New Issue
Block a user