mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-08 16:16:18 +01:00
Update Docs
This commit is contained in:
@@ -16,26 +16,26 @@ Given the `EveCharacter` Model as our model of choice we would define our stubs
|
|||||||
|
|
||||||
### template/appname/stubs/icon.html
|
### template/appname/stubs/icon.html
|
||||||
|
|
||||||
```html
|
```django
|
||||||
{% load evelinks %}
|
{% load evelinks %}
|
||||||
{% character_portrait_url row 32 %}
|
{% character_portrait_url row 32 %}
|
||||||
```
|
```
|
||||||
|
|
||||||
### template/appname/stubs/name.html
|
### template/appname/stubs/name.html
|
||||||
|
|
||||||
```html
|
```django
|
||||||
{{ row.character_name }} <span class="text-small">({{row.character_ownership.user.username}})</span>
|
{{ row.character_name }} <span class="text-small">({{ row.character_ownership.user.username }})</span>
|
||||||
```
|
```
|
||||||
|
|
||||||
### template/appname/stubs/corp.html
|
### template/appname/stubs/corp.html
|
||||||
|
|
||||||
```html
|
```django
|
||||||
{{ row.corporation_name }}
|
{{ row.corporation_name }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### template/appname/list.html
|
### template/appname/list.html
|
||||||
|
|
||||||
```html
|
```django
|
||||||
{% extends "allianceauth/base-bs5.html" %}
|
{% extends "allianceauth/base-bs5.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% block page_title %}
|
{% block page_title %}
|
||||||
@@ -77,7 +77,7 @@ Given the `EveCharacter` Model as our model of choice we would define our stubs
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#table').DataTable({
|
$('#table').DataTable({
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
ajax: '/appname/tables/data_table',
|
ajax: '{% url "appname:table" %}',
|
||||||
// This is for the column searching
|
// This is for the column searching
|
||||||
initComplete: function () {
|
initComplete: function () {
|
||||||
this.api()
|
this.api()
|
||||||
@@ -130,6 +130,7 @@ from allianceauth.eveonline.models import EveCharacter
|
|||||||
## Datatables server side view
|
## Datatables server side view
|
||||||
class EveCharacterTable(DataTablesView):
|
class EveCharacterTable(DataTablesView):
|
||||||
model = EveCharacter
|
model = EveCharacter
|
||||||
|
# Columns are rendered from these templates
|
||||||
# Templates can be a html file or template language directly in the list below
|
# Templates can be a html file or template language directly in the list below
|
||||||
templates = [
|
templates = [
|
||||||
"appname/stubs/icon.html",
|
"appname/stubs/icon.html",
|
||||||
|
|||||||
Reference in New Issue
Block a user