authentik.admin.models

authentik admin models

 1"""authentik admin models"""
 2
 3from django.db import models
 4from django.utils.translation import gettext_lazy as _
 5
 6
 7class VersionHistory(models.Model):
 8    id = models.BigAutoField(primary_key=True)
 9    timestamp = models.DateTimeField()
10    version = models.TextField()
11    build = models.TextField()
12
13    class Meta:
14        managed = False
15        db_table = "authentik_version_history"
16        ordering = ("-timestamp",)
17        verbose_name = _("Version history")
18        verbose_name_plural = _("Version history")
19        default_permissions = []
20
21    def __str__(self):
22        return f"{self.version}.{self.build} ({self.timestamp})"
class VersionHistory(django.db.models.base.Model):
 8class VersionHistory(models.Model):
 9    id = models.BigAutoField(primary_key=True)
10    timestamp = models.DateTimeField()
11    version = models.TextField()
12    build = models.TextField()
13
14    class Meta:
15        managed = False
16        db_table = "authentik_version_history"
17        ordering = ("-timestamp",)
18        verbose_name = _("Version history")
19        verbose_name_plural = _("Version history")
20        default_permissions = []
21
22    def __str__(self):
23        return f"{self.version}.{self.build} ({self.timestamp})"

VersionHistory(id, timestamp, version, build)

def id(unknown):

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

def timestamp(unknown):

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

def version(unknown):

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

def build(unknown):

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

def get_next_by_timestamp(unknown):

Method descriptor with partial application of the given arguments and keywords.

Supports wrapping existing descriptors and handles non-descriptor callables as instance methods.

def get_previous_by_timestamp(unknown):

Method descriptor with partial application of the given arguments and keywords.

Supports wrapping existing descriptors and handles non-descriptor callables as instance methods.

def objects(unknown):

The type of the None singleton.

class VersionHistory.DoesNotExist(django.core.exceptions.ObjectDoesNotExist):

The requested object does not exist

class VersionHistory.MultipleObjectsReturned(django.core.exceptions.MultipleObjectsReturned):

The query returned multiple objects when only one was expected.