Skip to content

External Links


This model enables the end user to define external links to be rendered alongside other models display pages.

Bases: CenturionModel

button_text

button_text = CharField(
    blank=True,
    help_text="Name to display on link button",
    max_length=30,
    null=True,
    unique=True,
    verbose_name="Button Text",
)

cluster

cluster = BooleanField(
    blank=False,
    default=False,
    help_text="Render link for clusters",
    verbose_name="Clusters",
)

colour

colour = CharField(
    blank=True,
    help_text="Colour to render the link button. Use HTML colour code",
    max_length=80,
    null=True,
    unique=False,
    verbose_name="Button Colour",
)

devices

devices = BooleanField(
    blank=False,
    default=False,
    help_text="Render link for devices",
    verbose_name="Devices",
)

model_tag

model_tag = 'external_link'

modified

modified = AutoLastModifiedField()

name

name = CharField(
    blank=False,
    help_text="Name to display on link button",
    max_length=30,
    unique=True,
    verbose_name="Friendly Name",
)

page_layout

page_layout: dict = {
    "dataset": {
        "columns": [
            ["name", "organization", "created", "modified"]
        ]
    },
    "detail": [
        {
            "name": "Details",
            "slug": "details",
            "sections": [
                {
                    "layout": "double",
                    "left": [
                        "organization",
                        "name",
                        "button_text",
                        "template",
                        "colour",
                    ],
                    "right": [
                        "model_notes",
                        "created",
                        "modified",
                    ],
                },
                {
                    "name": "Assignable to",
                    "layout": "double",
                    "left": ["cluster", "service"],
                    "right": ["devices", "software"],
                },
            ],
        },
        {
            "name": "Knowledge Base",
            "slug": "kb_articles",
            "sections": [
                {
                    "layout": "table",
                    "field": "knowledge_base",
                }
            ],
        },
        {"name": "Notes", "slug": "notes", "sections": []},
    ],
    "table": [
        "name",
        "organization",
        "created",
        "modified",
    ],
}

service

service = BooleanField(
    blank=False,
    default=False,
    help_text="Render link for service",
    verbose_name="Service",
)

software

software = BooleanField(
    blank=False,
    default=False,
    help_text="Render link for software",
    verbose_name="Software",
)

template

template = CharField(
    blank=False,
    help_text="External Link template",
    max_length=180,
    unique=False,
    verbose_name="Link Template",
)

Meta

Attributes
ordering
ordering = ['name', 'organization']
verbose_name
verbose_name = 'External Link'
verbose_name_plural
verbose_name_plural = 'External Links'

__str__

__str__()

Return the Template to render

About:

This page forms part of our Project Centurion ERP.

Page Metadata
Version: ToDo: place files short git commit here
Date Created: 2024-07-15
Date Edited: 2026-06-08

Contribution:

Would You like to contribute to our Centurion ERP project? You can assist in the following ways:

 

ToDo: Add the page list of contributors