Static site

Todo

Doctrings (module, utilities)

Models

class indico.modules.events.static.models.static.StaticSite(**kwargs)

Bases: indico.core.storage.models.StoredFileMixin, flask_sqlalchemy.Model

Static site for an Indico event.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

add_file_date_column = False
content_type

The MIME type of the file

created_dt = None
creator

The user who created the static site

creator_id

ID of the user who created the static site

event_id

ID of the event

event_new

The Event this static site is associated with

file_required = False
filename

The name of the file

id

Entry ID

locator
md5

An MD5 hash of the file.

Automatically assigned when save() is called.

requested_dt

The date and time the static site was requested

size

The size of the file (in bytes).

Automatically assigned when save() is called.

state

The state of the static site (a StaticSiteState member)

storage_backend
storage_file_id
class indico.modules.events.static.models.static.StaticSiteState

Bases: indico.util.struct.enum.RichIntEnum

expired = 4
failed = 3
pending = 0
running = 1
success = 2

Utilities

indico.modules.events.static.util.url_to_static_filename(endpoint, url)