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
    • pay
    • pas
    • pdf
    • gis
    • fsi
    • api
    • org
      • Submodules
        • org.analytics
        • 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
    • page
    • chat
    • file
    • user
    • form
    • core
    • event
    • gever
    • town6
    • party
    • quill
    • server
    • search
    • qrcode
    • people
    • ticket
    • agency
    • shared
    • intranet
    • activity
    • recipient
    • feriennet
    • plausible
    • directory
    • winterthur
    • websockets
    • newsletter
    • parliament
    • swissvotes
    • onboarding
    • foundation
    • async_http
    • reservation
    • foundation6
    • stepsequence
    • election_day
    • 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

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_title_property = 'title'[source]
fts_properties[source]

Returns the type mapping of this model. Each property in the mapping will be read from the model instance.

id: sqlalchemy.orm.Mapped[uuid.UUID][source]
title: sqlalchemy.orm.Mapped[str][source]
url: sqlalchemy.orm.Mapped[str][source]
page_image: onegov.core.orm.mixins.dict_property[str | None][source]
member_of: sqlalchemy.orm.Mapped[str | None][source]
group: sqlalchemy.orm.Mapped[str | None][source]
order: sqlalchemy.orm.Mapped[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]

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 2026, Verein OneGov.

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