mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-07 07:36:20 +01:00
refactor
This commit is contained in:
@@ -130,22 +130,17 @@ from allianceauth.eveonline.models import EveCharacter
|
||||
## Datatables server side view
|
||||
class EveCharacterTable(DataTablesView):
|
||||
model = EveCharacter
|
||||
# Columns are rendered from these templates
|
||||
# Templates can be a html file or template language directly in the list below
|
||||
templates = [
|
||||
"appname/stubs/icon.html",
|
||||
"appname/stubs/name.html",
|
||||
"appname/stubs/corp.html",
|
||||
"{{ row.alliance_name }} {{ row.alliance_id }}"
|
||||
]
|
||||
|
||||
# Define the columns for filtering and ordering
|
||||
# Define the columns as a tuple.
|
||||
# String for field name for filtering and ordering
|
||||
# String for the render template
|
||||
# Templates can be a html file or template language directly in the list below
|
||||
columns = [
|
||||
# (can_sort: bool, "field_for_queries_or_sort")
|
||||
(False, ""),
|
||||
(True, "character_name"),
|
||||
(True, "corporation_name"),
|
||||
(True, "alliance_name"),
|
||||
# ("field_for_queries_or_sort", template: str)
|
||||
("", "appname/stubs/icon.html"),
|
||||
("character_name", "appname/stubs/name.html"),
|
||||
("corporation_name", "appname/stubs/corp.html"),
|
||||
("alliance_name", "{{ row.alliance_name }} {{ row.alliance_id }}"),
|
||||
]
|
||||
|
||||
# if you need to do some prefetch or pre-filtering you can overide this function
|
||||
|
||||
Reference in New Issue
Block a user