OneGov Docs
  • The Design of OneGov Cloud
  • OneGov Org - OneGov Cloud’s Flagship Application
  • Feriennet - A Complicated Org
  • Write Forms with Formcode Syntax
  • OneGov Agency API
  • OneGov Election Day API
  • OneGov Cloud Modules
  • API Reference
    • api
    • pdf
    • org
      • Submodules
        • org.app
        • org.auth
        • org.boardlets
        • org.cli
        • org.constants
        • org.converters
        • org.cronjobs
        • org.custom
        • org.directives
        • org.elements
        • org.exceptions
        • org.exports
        • org.formats
        • org.forms
        • org.homepage_widgets
        • org.i18n
        • org.initial_content
        • org.kaba
        • org.layout
        • org.mail
        • org.management
        • org.models
        • org.notification_service
        • org.observer
        • org.open_graph
        • org.path
        • org.pdf
        • org.redirects
        • org.request
        • org.security
        • org.theme
        • org.translations
        • org.upgrade
        • org.utils
        • org.views
      • Attributes
      • Package Contents
    • pas
    • pay
    • gis
    • fsi
    • file
    • page
    • form
    • core
    • user
    • chat
    • quill
    • event
    • gever
    • town6
    • party
    • server
    • qrcode
    • search
    • ticket
    • people
    • shared
    • agency
    • activity
    • intranet
    • plausible
    • feriennet
    • recipient
    • directory
    • swissvotes
    • newsletter
    • async_http
    • foundation
    • websockets
    • winterthur
    • onboarding
    • parliament
    • reservation
    • foundation6
    • election_day
    • stepsequence
    • landsgemeinde
    • translator_directory
OneGov Docs
  • API Reference
  • org
  • org.models
  • org.models.external_link
  • View page source

org.models.external_link

Classes

ExternalLink

An Object appearing in some other collection

ExternalFormLink

An Object appearing in some other collection

ExternalResourceLink

An Object appearing in some other collection

ExternalLinkCollection

Abstract base class for generic types.

Module Contents

class org.models.external_link.ExternalLink[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.ContentMixin, onegov.core.orm.mixins.TimestampMixin, onegov.org.models.AccessExtension, onegov.search.SearchableContent

An Object appearing in some other collection that features a lead and text but points to some external url.

__tablename__ = 'external_links'[source]
__mapper_args__[source]
fts_type_title[source]

Returns the display name for this type of document or a callable which accepts the current request as a single positional argument and returns the display name.

fts_properties[source]
id: sqlalchemy.Column[uuid.UUID][source]
title: sqlalchemy.Column[str][source]
url: sqlalchemy.Column[str][source]
page_image: onegov.core.orm.mixins.dict_property[str | None][source]
member_of: sqlalchemy.Column[str | None][source]
group: sqlalchemy.Column[str | None][source]
order: sqlalchemy.Column[str][source]
lead: onegov.core.orm.mixins.dict_property[str | None][source]
title_observer(title: str) → None[source]
class org.models.external_link.ExternalFormLink[source]

Bases: ExternalLink

An Object appearing in some other collection that features a lead and text but points to some external url.

__mapper_args__[source]
fts_type_title[source]

Returns the display name for this type of document or a callable which accepts the current request as a single positional argument and returns the display name.

class org.models.external_link.ExternalResourceLink[source]

Bases: ExternalLink

An Object appearing in some other collection that features a lead and text but points to some external url.

__mapper_args__[source]
fts_type_title[source]

Returns the display name for this type of document or a callable which accepts the current request as a single positional argument and returns the display name.

class org.models.external_link.ExternalLinkCollection(session: sqlalchemy.orm.Session, member_of: str | None = None, group: str | None = None, type: str | None = None)[source]

Bases: onegov.core.collection.GenericCollection[ExternalLink]

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:

class Mapping(Generic[KT, VT]):
    def __getitem__(self, key: KT) -> VT:
        ...
    # Etc.

This class can then be used as follows:

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
    try:
        return mapping[key]
    except KeyError:
        return default
supported_collections[source]
member_of = None[source]
group = None[source]
type = None[source]
static translatable_name(model_class: type[object]) → str[source]

Most collections have a base model whose name can be guessed from the collection name.

form_choices() → tuple[tuple[str, str], Ellipsis][source]
classmethod collection_by_name() → dict[str, type[onegov.core.collection.GenericCollection[Any]]][source]
property model_class: type[ExternalLink][source]
classmethod target(external_link: ExternalLink) → type[onegov.core.collection.GenericCollection[Any]][source]
query() → sqlalchemy.orm.Query[ExternalLink][source]
classmethod for_model(session: sqlalchemy.orm.Session, model_class: type[onegov.form.FormCollection | onegov.reservation.ResourceCollection], **kwargs: Any) → Self[source]

It would be better to use the tablename, but the collections do not always implement the property model_class.

Previous Next

© Copyright 2025, Verein OneGov.

Built with Sphinx using a theme provided by Read the Docs.