Data models

The following are all of the relevant pretalx database models, including their interfaces. All non-documented methods and properties should be considered private and unstable. All methods and properties documented here may change between releases, but any change will be mentioned in the Release Notes.

All event related objects have an event property. It always returns the event this object belongs to, to ease permission checks and reduce the need for duplicate lookups.

Events and organisers

class pretalx.event.models.event.Event(*args, **kwargs)[source]

The Event class has direct or indirect relations to all other models.

Since most models depend on the Event model in some way, they should preferably be accessed via the reverse relation on the event model to prevent data leaks.

Parameters:
  • is_public – Is this event public yet? Should only be set via the pretalx.orga.views.EventLive view or in another way that processes the pretalx.orga.signals.activate_event signal.

  • locale_array – Contains the event’s active locales as a comma separated string. Please use the locales property to interact with this information.

  • content_locale_array – Contains the event’s active locales available for proposals as a comma separated string. Please use the content_locales property to interact with this information.

  • primary_color – Main event colour. Accepts hex values like #00ff00.

  • custom_css – Custom event CSS. Has to pass fairly restrictive validation for security considerations.

  • custom_domain – Custom event domain, starting with https://.

  • plugins – A list of active plugins as a comma-separated string. Please use the plugin_list property for interaction.

  • feature_flags – A JSON field containing feature flags for this event. Please use the get_feature_flag method to check for features, so that new feature flags can be added without breaking existing events.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (I18nCharField) – Name

  • slug (SlugField) – Short form. The slug may only contain letters, numbers, dots and dashes.

  • date_from (DateField) – Event start date

  • date_to (DateField) – Event end date

  • timezone (CharField) – Timezone. All event dates will be localised and interpreted to be in this timezone.

  • email (EmailField) – Organiser email address. Will be used as Reply-To in emails.

  • display_settings (JSONField) – Display settings

  • review_settings (JSONField) – Review settings

  • mail_settings (JSONField) – Mail settings

  • attendee_signup_settings (JSONField) – Attendee signup settings

  • logo (ImageField) – Logo. If you provide a logo image, your event’s name will not be shown in the event header. The logo will be scaled down to a height of 140px.

  • header_image (ImageField) – Header image. If you provide a header image, it will be displayed instead of your event’s color and/or header pattern at the top of all event pages. It will be center-aligned, so when the window shrinks, the center parts will continue to be displayed, and not stretched.

  • og_image (ImageField) – Preview image. This image will be shown as a preview when links to your event are shared on social media or messaging apps. For best results, use an image at least 1200x630 pixels. If not set, the logo or header image will be used instead.

  • locale (CharField) – Default language

  • landing_page_text (I18nTextField) – Landing page text. This text will be shown on the landing page, alongside with links to the CfP and schedule, if appropriate. You can use <a href=”https://docs.pretalx.org/user/markdown/” target=”_blank” rel=”noopener”>Markdown</a> here.

  • featured_sessions_text (I18nTextField) – Featured sessions text. This text will be shown at the top of the featured sessions page instead of the default text. You can use <a href=”https://docs.pretalx.org/user/markdown/” target=”_blank” rel=”noopener”>Markdown</a> here.

Relationship fields:

Parameters:

organiser (ForeignKey to Organiser) – Organiser (related name: events)

Reverse relationships:

Parameters:
  • log_entries (Reverse ForeignKey from ActivityLog) – All log entries of this event (related name of event)

  • _settings_objects (Reverse ForeignKey from Event_SettingsStore) – All settings objects of this event (related name of object)

  • extra_links (Reverse ForeignKey from EventExtraLink) – All extra links of this event (related name of event)

  • team (Reverse ManyToManyField from Team) – All teams of this event (related name of limit_events)

  • queued_mails (Reverse ForeignKey from QueuedMail) – All queued mails of this event (related name of event)

  • mail_templates (Reverse ForeignKey from MailTemplate) – All mail templates of this event (related name of event)

  • attendee_profiles (Reverse ForeignKey from AttendeeProfile) – All attendee profiles of this event (related name of event)

  • information (Reverse ForeignKey from SpeakerInformation) – All information of this event (related name of event)

  • user_preferences (Reverse ForeignKey from UserEventPreferences) – All user preferences of this event (related name of event)

  • availabilities (Reverse ForeignKey from Availability) – All availabilities of this event (related name of event)

  • rooms (Reverse ForeignKey from Room) – All rooms of this event (related name of event)

  • schedules (Reverse ForeignKey from Schedule) – All schedules of this event (related name of event)

  • submitter_access_codes (Reverse ForeignKey from SubmitterAccessCode) – All submitter access codes of this event (related name of event)

  • cfp (Reverse OneToOneField from CfP) – The cf p of this event (related name of event)

  • questions (Reverse ForeignKey from Question) – All questions of this event (related name of event)

  • score_categories (Reverse ForeignKey from ReviewScoreCategory) – All score categories of this event (related name of event)

  • review_phases (Reverse ForeignKey from ReviewPhase) – All review phases of this event (related name of event)

  • submissions (Reverse ForeignKey from Submission) – All submissions of this event (related name of event)

  • tags (Reverse ForeignKey from Tag) – All tags of this event (related name of event)

  • tracks (Reverse ForeignKey from Track) – All tracks of this event (related name of event)

  • submission_types (Reverse ForeignKey from SubmissionType) – All submission types of this event (related name of event)

get_date_range_display()[source]

Returns the localised, prettily formatted date range for this event.

E.g. as long as the event takes place within the same month, the month is only named once.

Return type:

str

cache

Returns an ObjectRelatedCache object.

This behaves equivalent to Django’s built-in cache backends, but puts you into an isolated environment for this event, so you don’t have to prefix your cache keys.

datetime_from

The localised datetime of the event start date.

Return type:

datetime

datetime_to

The localised datetime of the event end date.

Return type:

datetime

is_multilingual

Is True if the event supports more than one locale.

locales

Is a list of active event locales.

named_locales

Is a list of tuples of locale codes and natural names for this event.

pending_mails

The amount of currently unsent.

QueuedMail objects.

speakers

Returns a queryset of all speakers (of type.

SpeakerProfile) visible in the current released schedule.

submitters

Returns a queryset of all SpeakerProfile objects who have submitted to this event.

Ignores speakers who have deleted all of their submissions.

talks

Returns a queryset of all.

Submission object in the current released schedule.

teams

Returns all Team objects that concern this event.

wip_schedule

Returns the latest unreleased.

Schedule.

Retval:

Schedule

pretalx.event.domain.plugins.enable_plugin(event, module, *, user=None)[source]

Activate module on event (no-op if already active).

Return type:

None

pretalx.event.domain.plugins.disable_plugin(event, module, *, user=None)[source]

Deactivate module on event (no-op if not currently active).

Return type:

None

class pretalx.event.models.organiser.Organiser(*args, **kwargs)[source]

The Organiser model represents the entity responsible for at least one.

Event.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (I18nCharField) – Name

  • slug (SlugField) – Short form. Should be short, only contain lowercase letters and numbers, and must be unique, as it is used in URLs.

Reverse relationships:

Parameters:
  • events (Reverse ForeignKey from Event) – All events of this organiser (related name of organiser)

  • teams (Reverse ForeignKey from Team) – All teams of this organiser (related name of organiser)

pretalx.event.domain.organiser.shred_organiser(organiser, person=None)[source]

Irrevocably delete organiser and all dependent events and data.

class pretalx.event.models.organiser.Team(*args, **kwargs)[source]

A team is a group of people working for the same organiser.

Team members (of type User) share permissions for one or several events of Organiser. People can be in multiple Teams, and will have all permissions any of their teams has.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (CharField) – Team name

  • all_events (BooleanField) – Apply permissions to all events by this organiser (including newly created ones)

  • can_create_events (BooleanField) – Can create events

  • can_change_teams (BooleanField) – Can change teams and permissions

  • can_change_organiser_settings (BooleanField) – Can change organiser settings

  • can_change_event_settings (BooleanField) – Can change event settings

  • can_change_submissions (BooleanField) – Can work with and change proposals

  • is_reviewer (BooleanField) – Is a reviewer

  • force_hide_speaker_names (BooleanField) – Always hide speaker names. Normally, anonymisation is configured in the event review settings. This setting will <strong>override the event settings</strong> and always hide speaker names for this team.

Relationship fields:

Parameters:

Reverse relationships:

Parameters:

invites (Reverse ForeignKey from TeamInvite) – All invites of this team (related name of team)

permission_set

A set of all permissions this team has, as strings.

class pretalx.submission.models.cfp.CfP(*args, **kwargs)[source]

Every Event has one Call for Papers/Participation/Proposals.

Parameters:
  • deadline – The regular deadline. Please note that submissions can be available for longer than this if different deadlines are configured on single submission types.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • headline (I18nCharField) – Headline

  • text (I18nTextField) – Text. You can use <a href=”https://docs.pretalx.org/user/markdown/” target=”_blank” rel=”noopener”>Markdown</a> here.

  • opening (DateTimeField) – Opening. Please put in the date you want to start accepting proposals from users. Leave the date empty to start accepting proposals immediately once the event is live.

  • settings (JSONField) – Settings

  • fields (JSONField) – Fields

Relationship fields:

Parameters:
is_open

Returns True if the CfP is currently open, i.e. not before the opening date and not after the deadline.

max_deadline

Returns the latest date any submission is possible.

This includes the deadlines set on any submission type for this event.

class pretalx.submission.models.review.ReviewPhase(*args, **kwargs)[source]

ReviewPhases determine reviewer access rights during a (potentially open) time frame.

Phases are ordered by (start, end), with null-start phases first.

Parameters:
  • is_active – Is this phase currently active? There can be only one active phase per event. Use pretalx.submission.domain.review.activate_review_phase to activate a phase, since it enforces that invariant.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (CharField) – Name

  • start (DateTimeField) – Phase start

  • end (DateTimeField) – Phase end

  • can_review (BooleanField) – Reviewers can write and edit reviews

  • proposal_visibility (CharField) – Reviewers may see these proposals. If you select “all”, reviewers can review all proposals that their teams have access to (so either all, or specific tracks). In this mode, assigned proposals will be highlighted and will be shown first in the review workflow.

  • can_see_other_reviews (CharField) – Reviewers can see other reviews

  • can_see_speaker_names (BooleanField) – Reviewers can see speaker names

  • can_see_reviewer_names (BooleanField) – Reviewers can see the names of other reviewers

  • can_change_submission_state (BooleanField) – Reviewers can accept and reject proposals

  • can_tag_submissions (CharField) – Reviewers can tag proposals

  • speakers_can_change_submissions (BooleanField) – Speakers can modify their proposals before acceptance. By default, modification of proposals is locked after the CfP ends, and is re-enabled once the proposal was accepted.

Relationship fields:

Parameters:

event (ForeignKey to Event) – Event (related name: review_phases)

pretalx.submission.domain.review.activate_review_phase(phase, *, person=None)[source]

Users and profiles

class pretalx.person.models.user.User(*args, **kwargs)[source]

The pretalx user model.

Users describe all kinds of persons who interact with pretalx: Organisers, reviewers, submitters, speakers.

Parameters:
  • code – A user’s alphanumeric code is auto generated, may not be changed, and is the unique identifier of that user.

  • name – A name fit for public display. Will be used in the user interface and for public display for all speakers in all of their events.

  • password – The password is stored using Django’s PasswordField. Use the set_password and check_password methods to interact with it.

  • nick – The nickname field has been deprecated and is scheduled to be deleted. Use the email field instead.

  • groups – Django internals, not used in pretalx.

  • user_permissions – Django internals, not used in pretalx.

  • id (AutoField) – Primary key: ID

  • last_login (DateTimeField) – Last login

  • email (EmailField) – Email. Your email address will be used for password resets and notification about your event/proposals.

  • created (DateTimeField) – Created

  • is_active (BooleanField) – Is active. Inactive users are not allowed to log in.

  • is_staff (BooleanField) – Is staff. A default Django flag. Not in use in pretalx.

  • is_administrator (BooleanField) – Is administrator. Should only be True for people with administrative access to the server pretalx runs on.

  • is_superuser (BooleanField) – Is superuser. Never set this flag to True, since it short-circuits all authorisation mechanisms.

  • locale (CharField) – Preferred language

  • timezone (CharField) – Timezone

  • pw_reset_token (CharField) – Password reset token

  • pw_reset_time (DateTimeField) – Password reset time

Relationship fields:

Parameters:

profile_picture (ForeignKey to ProfilePicture) – Profile picture (related name: users)

Reverse relationships:

Parameters:
  • auth_token (Reverse OneToOneField from Token) – The auth token of this user (related name of user)

  • log_entries (Reverse ForeignKey from ActivityLog) – All log entries of this user (related name of person)

  • teams (Reverse ManyToManyField from Team) – All teams of this user (related name of members)

  • mails (Reverse ManyToManyField from QueuedMail) – All mails of this user (related name of to_users)

  • attendee_profiles (Reverse ForeignKey from AttendeeProfile) – All attendee profiles of this user (related name of user)

  • api_tokens (Reverse ForeignKey from UserApiToken) – All api tokens of this user (related name of user)

  • pictures (Reverse ForeignKey from ProfilePicture) – All pictures of this user (related name of user)

  • event_preferences (Reverse ForeignKey from UserEventPreferences) – All event preferences of this user (related name of user)

  • profiles (Reverse ForeignKey from SpeakerProfile) – All profiles of this user (related name of user)

  • submission_comments (Reverse ForeignKey from SubmissionComment) – All submission comments of this user (related name of user)

  • reviews (Reverse ForeignKey from Review) – All reviews of this user (related name of user)

  • assigned_reviews (Reverse ManyToManyField from Submission) – All assigned reviews of this user (related name of assigned_reviewers)

  • submission_favourites (Reverse ForeignKey from SubmissionFavourite) – All submission favourites of this user (related name of user)

get_display_name()[source]

Returns a user’s name or ‘Unnamed user’.

Return type:

str

get_events_for_permission(**kwargs)[source]

Returns a queryset of events for which this user as all of the given permissions.

Permissions are given as named arguments, e.g. get_events_for_permission(is_reviewer=True).

get_events_with_any_permission()[source]

Returns a queryset of events for which this user has any type of permission.

get_permissions_for_event(event)[source]

Returns a set of all permission a user has for the given event.

Return type:

set

get_speaker(event)[source]

Retrieve (and/or create) the event.

SpeakerProfile for this user.

Retval:

EventProfile

class pretalx.person.models.profile.SpeakerProfile(*args, **kwargs)[source]

All Event related data concerning a.

User is stored here.

Parameters:
  • has_arrived – Can be set to track speaker arrival. Will be used in warnings about missing speakers.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (CharField) – Name

  • code (CharField) – Code

  • biography (MarkdownField) – Biography

  • internal_notes (TextField) – Internal notes. Internal notes for other organisers/reviewers. Not visible to the speakers or the public.

Relationship fields:

Parameters:
  • user (ForeignKey to User) – User (related name: profiles)

  • event (ForeignKey to Event) – Event (related name: +)

  • profile_picture (ForeignKey to ProfilePicture) – Profile picture (related name: speakers)

Reverse relationships:

Parameters:
  • availabilities (Reverse ForeignKey from Availability) – All availabilities of this speaker profile (related name of person)

  • feedback (Reverse ForeignKey from Feedback) – All feedback of this speaker profile (related name of speaker)

  • answers (Reverse ForeignKey from Answer) – All answers of this speaker profile (related name of speaker)

  • speaker_roles (Reverse ForeignKey from SpeakerRole) – All speaker roles of this speaker profile (related name of speaker)

  • submissions (Reverse ManyToManyField from Submission) – All submissions of this speaker profile (related name of speakers)

talks

A queryset of.

Submission objects.

Contains all visible talks by this user on this event.

class pretalx.person.models.information.SpeakerInformation(*args, **kwargs)[source]

Represents any information organisers want to show all or some submitters or speakers.

Parameters:

Relationship fields:

Parameters:
  • event (ForeignKey to Event) – Event (related name: information)

  • limit_tracks (ManyToManyField to Track) – Limit to tracks. Leave empty to show this information to all tracks. (related name: speakerinformation)

  • limit_types (ManyToManyField to SubmissionType) – Limit to proposal types. Leave empty to show this information for all proposal types. (related name: speakerinformation)

Submissions

Submissions are the most central model to pretalx, and everything else is connected to submissions.

class pretalx.submission.models.submission.Submission(*args, **kwargs)[source]

Submissions are, next to Event, the central model in pretalx.

State changes must go through pretalx.submission.domain.submission.set_submission_state(), which is called by the accept(), reject() etc model methods.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • code (CharField) – Code

  • title (CharField) – Proposal title

  • state (CharField) – Proposal state

  • pending_state (CharField) – Pending proposal state

  • abstract (MarkdownField) – Abstract

  • description (MarkdownField) – Description

  • notes (MarkdownField) – Notes. These notes are meant for the organisers and won’t be made public.

  • internal_notes (TextField) – Internal notes. Internal notes for other organisers/reviewers. Not visible to the speakers or the public.

  • duration (PositiveIntegerField) – Duration. Duration in minutes

  • slot_count (IntegerField) – Slot Count. How often this session takes place.

  • attendee_signup_required (BooleanField) – Requires signup. Override whether attendees must sign up to attend this session.

  • attendee_signup_capacity (PositiveIntegerField) – Attendee capacity. Override the room capacity for this session.

  • content_locale (CharField) – Language

  • is_featured (BooleanField) – Show this session in public list of featured sessions.

  • do_not_record (BooleanField) – Don’t record this session.

  • image (ImageField) – Session image. Use this if you want an illustration to go with your proposal.

  • invitation_token (CharField) – Invitation token

  • review_code (CharField) – Review code

  • anonymised (JSONField) – Anonymised

  • draft_additional_speakers (JSONField) – Draft additional speakers

Relationship fields:

Parameters:

Reverse relationships:

Parameters:
  • mails (Reverse ManyToManyField from QueuedMail) – All mails of this submission (related name of submissions)

  • slots (Reverse ForeignKey from TalkSlot) – All slots of this submission (related name of submission)

  • comments (Reverse ForeignKey from SubmissionComment) – All comments of this submission (related name of submission)

  • feedback (Reverse ForeignKey from Feedback) – All feedback of this submission (related name of talk)

  • answers (Reverse ForeignKey from Answer) – All answers of this submission (related name of submission)

  • resources (Reverse ForeignKey from Resource) – All resources of this submission (related name of submission)

  • reviews (Reverse ForeignKey from Review) – All reviews of this submission (related name of submission)

  • attendee_signups (Reverse ForeignKey from AttendeeSignup) – All attendee signups of this submission (related name of submission)

  • speaker_roles (Reverse ForeignKey from SpeakerRole) – All speaker roles of this submission (related name of submission)

  • favourites (Reverse ForeignKey from SubmissionFavourite) – All favourites of this submission (related name of submission)

  • invitations (Reverse ForeignKey from SubmissionInvitation) – All invitations of this submission (related name of submission)

property availabilities

The intersection of all.

Availability objects of all speakers of this submission.

display_speaker_names

Helper method for a consistent speaker name display.

editable

Checks if the speaker is currently allowed to edit the submission.

public_slots

All publicly visible TalkSlot objects of this submission in the current.

Schedule.

slot

The first scheduled TalkSlot of this submission in the current.

Schedule.

Note that this slot is not guaranteed to be visible.

pretalx.submission.domain.submission.submit_draft(submission, *, user, invite_addresses=())[source]

Transition a DRAFT submission to SUBMITTED.

Redeems the access code (deferred from draft creation), fires pretalx.submission.create — silenced while the proposal was a draft — now that the proposal exists for real, and routes invite_addresses through apply_invite_addresses (which by then dispatches them as real invitations). Wrapped in a transaction so the state change, code redemption, create log and invitation dispatch succeed or fail together.

pretalx.submission.domain.submission.set_submission_state(submission, new_state, *, person=None, orga=False, from_pending=False)[source]

Transition a submission to new_state and persist.

Handles the full lifecycle of a state change, including - before_submission_state_change veto signal (except for DRAFTs) - data handling, e.g. clearing is_featured in rejection states - database write - slot reconciliation - logging - state change email generation - submission_state_change signal

When the old state and the new state are the same, none of this applies and only the pending state is cleared.

pretalx.submission.domain.submission.update_duration(submission)[source]

Push the submission’s duration onto its currently scheduled wip slots so the schedule reflects the new length.

pretalx.submission.domain.submission.update_talk_slots(submission)[source]

Reconcile TalkSlot rows on the wip schedule with the submission’s state and slot_count.

If the submission is not (or pending-) accepted, all slots are removed; otherwise the count is brought up or down to slot_count, deleting unscheduled slots first. Slot visibility tracks the CONFIRMED state.

pretalx.submission.domain.submission.add_speaker(submission, *, user=None, speaker=None, name=None, log_user=None)[source]

Attach a speaker to a submission and place them at the end of the speaker list. user and speaker are mutually exclusive inputs: pass an existing SpeakerProfile or a User plus optional name to materialise one. Logs the addition only when log_user is supplied.

class pretalx.submission.models.review.Review(*args, **kwargs)[source]

Reviews model the opinion of reviewers of a.

Submission.

They can, but don’t have to, include a score and a text.

Parameters:
  • text – The review itself. May be empty.

  • score – This score is calculated from all the related scores and their weights. Do not set it directly; call pretalx.submission.domain.review.update_review_score after modifying the m2m scores.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

Relationship fields:

Parameters:

Reverse relationships:

Parameters:

answers (Reverse ForeignKey from Answer) – All answers of this review (related name of review)

display_score

Helper method to get a display string of the review’s score.

pretalx.submission.domain.review.update_review_score(review)[source]

Recompute and persist review.score from its m2m scores.

Filters by the submission’s currently applicable score categories (which depend on the submission’s track) and writes the result back.

pretalx.submission.domain.review.recalculate_submission_scores(submission)[source]
class pretalx.submission.models.feedback.Feedback(*args, **kwargs)[source]

The Feedback model allows for anonymous feedback by attendees to one or all speakers of a.

Submission.

Parameters:
  • speaker – If the speaker attribute is not set, the feedback is assumed to be directed to all speakers.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • rating (IntegerField) – Rating

  • review (MarkdownField) – Feedback

Relationship fields:

Parameters:

talk (ForeignKey to Submission) – Session (related name: feedback)

class pretalx.submission.models.track.Track(*args, **kwargs)[source]

A track groups Submission objects within an Event, e.g. by topic.

Parameters:
  • color – The track colour, in the format #012345.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (I18nCharField) – Name

  • description (I18nTextField) – Description

  • position (PositiveIntegerField) – Position. The position field is used to determine the order that tracks are displayed in (lowest first).

  • requires_access_code (BooleanField) – Requires access code. This track will only be shown to submitters with a matching access code.

  • attendee_signup_required (BooleanField) – Requires signup. Sessions will require attendee signup by default. You can always override this setting for individual sessions.

Relationship fields:

Parameters:

event (ForeignKey to Event) – Event (related name: tracks)

Reverse relationships:

Parameters:
  • limit_teams (Reverse ManyToManyField from Team) – All limit teams of this track (related name of limit_tracks)

  • speakerinformation (Reverse ManyToManyField from SpeakerInformation) – All speaker informations of this track (related name of limit_tracks)

  • submitter_access_codes (Reverse ManyToManyField from SubmitterAccessCode) – All submitter access codes of this track (related name of tracks)

  • questions (Reverse ManyToManyField from Question) – All questions of this track (related name of tracks)

  • reviewscorecategory (Reverse ManyToManyField from ReviewScoreCategory) – All review score categorys of this track (related name of limit_tracks)

  • submissions (Reverse ForeignKey from Submission) – All submissions of this track (related name of track)

property slug: str

The slug makes tracks more readable in URLs.

It consists of the ID, followed by a slugified (and, in lookups, optional) form of the track name.

class pretalx.submission.models.type.SubmissionType(*args, **kwargs)[source]

Each Submission has one SubmissionType.

SubmissionTypes are used to group submissions by default duration (which can be overridden on a per-submission basis), and to be able to offer different deadlines for some parts of the Event.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (I18nCharField) – Name

  • default_duration (PositiveIntegerField) – Default duration. Duration in minutes

  • deadline (DateTimeField) – Deadline. If you want a different deadline than the global deadline for this session type, enter it here.

  • requires_access_code (BooleanField) – Requires access code. This session type will only be shown to submitters with a matching access code.

  • attendee_signup_required (BooleanField) – Requires signup. Sessions will require attendee signup by default. You can always override this setting for individual sessions.

Relationship fields:

Parameters:

event (ForeignKey to Event) – Event (related name: submission_types)

Reverse relationships:

Parameters:
  • speakerinformation (Reverse ManyToManyField from SpeakerInformation) – All speaker informations of this submission type (related name of limit_types)

  • submitter_access_codes (Reverse ManyToManyField from SubmitterAccessCode) – All submitter access codes of this submission type (related name of submission_types)

  • questions (Reverse ManyToManyField from Question) – All questions of this submission type (related name of submission_types)

  • submissions (Reverse ForeignKey from Submission) – All submissions of this submission type (related name of submission_type)

property slug: str

The slug makes tracks more readable in URLs.

It consists of the ID, followed by a slugified (and, in lookups, optional) form of the submission type name.

pretalx.submission.domain.submission_type.propagate_default_duration(submission_type)[source]
class pretalx.submission.models.resource.Resource(*args, **kwargs)[source]

Resources are file uploads belonging to a Submission.

Parameters:

Relationship fields:

Parameters:

submission (ForeignKey to Submission) – Submission (related name: resources)

Questions and answers

class pretalx.submission.models.question.Question(*args, **kwargs)[source]

Questions can be asked per.

Submission, per speaker, or of reviewers per Review.

Questions can have many types, which offers a flexible framework to give organisers the opportunity to get all the information they need.

Parameters:
  • variant – Can be any of ‘number’, ‘string’, ‘text’, ‘boolean’, ‘file’, ‘choices’, or ‘multiple_choice’. Defined in the QuestionVariant class.

  • target – Can be any of ‘submission’, ‘speaker’, or ‘reviewer’. Defined in the QuestionTarget class.

  • deadline – Datetime field. This field is required for ‘after deadline’ and ‘freeze after’ options of question_required field and optional for the other ones. For ‘after deadline’ it shows that the answer will be optional before the deadline and mandatory after that deadline. For ‘freeze after’ it shows that the answer will be allowed before the deadline and frozen after that deadline

  • question_required – Can be any of ‘none’, ‘require ‘, ‘after deadline’, or ‘freeze after’. Defined in the QuestionRequired class. ‘required’ answering this question will always be required. ‘optional’ means that it will never be mandatory. ‘after deadline’ the answer will be optional before the deadline and mandatory after the deadline.

  • freeze_after – Can be a datetime field or null. For ‘freeze after’ the answer will be allowed before the deadline and frozen after the deadline.

  • position – Position in the question order in this event.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • question (I18nCharField) – Label

  • help_text (I18nCharField) – Help text. Will appear just like this text below the custom input field. You can use <a href=”https://docs.pretalx.org/user/markdown/” target=”_blank” rel=”noopener”>Markdown</a> here.

  • default_answer (TextField) – Default answer

  • identifier (CharField) – Internal identifier. You can enter any value here to make it easier to match the data with other sources. If you do not input one, we will generate one automatically.

  • active (BooleanField) – Active. Inactive fields will no longer be shown.

  • contains_personal_data (BooleanField) – Responses contain personal data. If a user deletes their account, responses containing personal data will be removed, too.

  • min_length (PositiveIntegerField) – Minimum length. Minimum text length in characters or words (set in CfP settings).

  • max_length (PositiveIntegerField) – Maximum length. Maximum text length in characters or words (set in CfP settings).

  • min_number (DecimalField) – Minimum value

  • max_number (DecimalField) – Maximum value

  • min_date (DateField) – Minimum value

  • max_date (DateField) – Maximum value

  • min_datetime (DateTimeField) – Minimum value

  • max_datetime (DateTimeField) – Maximum value

  • is_public (BooleanField) – Publish answers. Responses will be shown on session or speaker pages as appropriate.

  • is_visible_to_reviewers (BooleanField) – Show answers to reviewers. Should responses to this field be shown to reviewers? This is helpful if you want to collect personal information, but use anonymous reviews.

  • icon (CharField) – Icon. Custom URL fields that are shown publicly can use an icon when displaying the link.

Relationship fields:

Parameters:
  • event (ForeignKey to Event) – Event (related name: questions)

  • tracks (ManyToManyField to Track) – Tracks. You can limit this field to some tracks. Leave empty to apply to all tracks. (related name: questions)

  • submission_types (ManyToManyField to SubmissionType) – Session types. You can limit this field to some session types. Leave empty to apply to all session types. (related name: questions)

  • limit_teams (ManyToManyField to Team) – Limit access. You can limit this field to specific teams. Only members of these teams will be able to see responses. (related name: _submission_question_limit_teams_+)

Reverse relationships:

Parameters:
  • options (Reverse ForeignKey from AnswerOption) – All options of this question (related name of question)

  • answers (Reverse ForeignKey from Answer) – All answers of this question (related name of question)

pretalx.submission.domain.queries.question.count_missing_answers(question, *, filter_speakers=None, filter_talks=None)[source]

How many answers are missing for question.

Only meaningful for submission and speaker questions; reviewer questions return 0. Pass filter_speakers or filter_talks (querysets) to restrict the scope.

class pretalx.submission.models.question.AnswerOption(*args, **kwargs)[source]

Provides the possible answers for.

Question objects of variant ‘choice’ or ‘multiple_choice’.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • answer (I18nCharField) – Response

  • position (IntegerField) – Position

  • identifier (CharField) – Internal identifier. You can enter any value here to make it easier to match the data with other sources. If you do not input one, we will generate one automatically.

Relationship fields:

Parameters:

question (ForeignKey to Question) – Question (related name: options)

Reverse relationships:

Parameters:

answers (Reverse ManyToManyField from Answer) – All answers of this answer option (related name of options)

class pretalx.submission.models.question.Answer(*args, **kwargs)[source]

Answers are connected to a.

Question, and, depending on type, a SpeakerProfile, a Submission, or a Review.

Parameters:

Relationship fields:

Parameters:

Schedules and talk slots

class pretalx.schedule.models.schedule.Schedule(*args, **kwargs)[source]

The Schedule model contains all scheduled.

TalkSlot objects (visible or not) for a schedule release for an Event.

Parameters:
  • publishedNone if the schedule has not been published yet.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • version (CharField) – Version

  • comment (I18nTextField) – Comment. This text will be shown in the public changelog and the RSS feed. You can use <a href=”https://docs.pretalx.org/user/markdown/” target=”_blank” rel=”noopener”>Markdown</a> here.

Relationship fields:

Parameters:

event (ForeignKey to Event) – Event (related name: schedules)

Reverse relationships:

Parameters:

talks (Reverse ForeignKey from TalkSlot) – All talks of this schedule (related name of schedule)

changes

Returns a dictionary of changes when compared to the previous version.

The action field is either create or update. If it’s an update, the count integer, and the new_talks, canceled_talks and moved_talks lists are also present.

This property uses caching with different TTLs: - WIP schedules: 60 seconds - Released schedules: 10 minutes

previous_schedule

Returns the schedule released before this one, if any.

scheduled_talks

Returns all TalkSlot objects that have been scheduled and are visible in the schedule (that is, have been confirmed at the time of release).

slots

Returns all.

Submission objects with TalkSlot objects in this schedule.

pretalx.schedule.domain.release.freeze_schedule(schedule, name, user=None, notify_speakers=True, comment=None)[source]

Freeze a schedule as a new version.

pretalx.schedule.domain.release.unfreeze_schedule(schedule, user=None)[source]

Resets the current WIP schedule to an older schedule version.

class pretalx.schedule.models.slot.TalkSlot(*args, **kwargs)[source]

The TalkSlot object is the scheduled version of a.

Submission.

TalkSlots always belong to one submission and one Schedule.

Parameters:
  • is_visible – This parameter is set on schedule release. Only confirmed talks will be visible.

  • slot_type – For non-submission slots, distinguishes breaks (visible) from blockers (hidden).

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • start (DateTimeField) – Start. When the session starts, if it is currently scheduled

  • end (DateTimeField) – End. When the session ends, if it is currently scheduled

  • description (I18nCharField) – Description

Relationship fields:

Parameters:
is_same_slot(other_slot)[source]

Checks if both slots have the same room and start time.

Return type:

bool

as_availability

‘Casts’ a slot as.

Availability, useful for availability arithmetic.

property duration: int

Returns the actual duration in minutes if the talk is scheduled, and the planned duration in minutes otherwise.

real_end

Guaranteed to provide a useful end datetime if start is set, even if end is empty.

class pretalx.schedule.models.availability.Availability(*args, **kwargs)[source]

The Availability class models when people or rooms are available for.

TalkSlot objects.

The power of this class is not within its rather simple data model, but with the operations available on it. An availability object can span multiple days, but due to our choice of input widget, it will usually only span a single day at most.

Parameters:

Relationship fields:

Parameters:
classmethod intersection(*availabilitysets)[source]

Return the list of Availabilities which are covered by all of the given sets.

Return type:

list[Availability]

classmethod union(availabilities)[source]

Return the minimal list of Availability objects which are covered by at least one given Availability.

Return type:

list[Availability]

__and__(other)[source]

Performs the intersect operation: availability1 & availability2

Return type:

Availability

__eq__(other)[source]

Comparisons like availability1 == availability2.

Checks if event, person, room, start and end are the same.

Return type:

bool

__or__(other)[source]

Performs the merge operation: availability1 | availability2

Return type:

Availability

contains(other)[source]

Tests if this availability starts before and ends after the other.

Return type:

bool

intersect_with(other)[source]

Return a new Availability which spans the range covered both by this one and the given one.

Return type:

Availability

merge_with(other)[source]

Return a new Availability which spans the range of this one and the given one.

Return type:

Availability

overlaps(other, strict)[source]

Test if two Availabilities overlap.

Parameters:

strict (bool) – Only count a real overlap as overlap, not direct adjacency.

Return type:

bool

all_day

Checks if the Availability spans one (or, technically: multiple) complete day.

class pretalx.schedule.models.room.Room(*args, **kwargs)[source]

A Room is an actual place where talks will be scheduled.

The Room object stores some meta information. Most, like capacity, are not in use right now.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • name (I18nCharField) – Name

  • guid (UUIDField) – GUID. Unique identifier (UUID) to help external tools identify the room.

  • description (I18nCharField) – Description. A description for attendees, for example directions.

  • speaker_info (I18nCharField) – Speaker Information. Information relevant for speakers scheduled in this room, for example room size, special directions, available adaptors for video input …

  • capacity (PositiveIntegerField) – Capacity. How many people can fit in the room?

  • position (PositiveIntegerField) – Position

Relationship fields:

Parameters:

event (ForeignKey to Event) – Event (related name: rooms)

Reverse relationships:

Parameters:
  • availabilities (Reverse ForeignKey from Availability) – All availabilities of this room (related name of room)

  • talks (Reverse ForeignKey from TalkSlot) – All talks of this room (related name of room)

Emails and templates

class pretalx.mail.models.MailTemplate(*args, **kwargs)[source]

MailTemplates can be used to create.

QueuedMail objects.

The process does not come with variable substitution except for special cases, for now.

Parameters:
  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • role (CharField) – Role

  • subject (I18nCharField) – Subject

  • text (I18nTextField) – Text

  • reply_to (CharField) – Reply-To. Change the Reply-To address if you do not want to use the default organiser address

  • bcc (CharField) – BCC. Enter comma separated addresses. Will receive a blind copy of every email sent from this template. This may be a LOT!

  • is_auto_created (BooleanField) – Is auto created

Relationship fields:

Parameters:

event (ForeignKey to Event) – Event (related name: mail_templates)

Reverse relationships:

Parameters:

mails (Reverse ForeignKey from QueuedMail) – All mails of this mail template (related name of template)

class pretalx.mail.models.QueuedMail(*args, **kwargs)[source]

Emails in pretalx are rarely sent directly, hence the name QueuedMail.

This mechanism allows organisers to make sure they send out the right content, and to include personal changes in emails.

Parameters:
  • sentNone if the mail has not been sent yet.

  • to_users – All known users to whom this email is addressed.

  • to – A comma-separated list of email addresses to whom this email is addressed. Does not contain any email addresses known to belong to users.

  • id (AutoField) – Primary key: ID

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

  • reply_to (CharField) – Reply-To. By default, the organiser address is used as Reply-To.

  • cc (CharField) –

    1. One email address or several addresses separated by commas.

  • bcc (CharField) – BCC. One email address or several addresses separated by commas.

  • subject (CharField) – Subject

  • text (TextField) – Text

  • text_html (TextField) – Text html

  • state (CharField) – State

  • error_data (JSONField) – Error data

  • error_timestamp (DateTimeField) – Error timestamp

  • locale (CharField) – Locale

  • attachments (JSONField) – Attachments

Relationship fields:

Parameters:
send(requestor=None, orga=True)[source]

Deprecated; kept as a compatibility shim for third-party plugins. TODO: remove after v2026.2.0. Use the explicit dispatch helpers in pretalx.mail.domain.send instead.

Email construction and dispatch

The mail pipeline is split across three modules under pretalx.mail.domain: render constructs an unsaved QueuedMail, queue persists it (or manipulates outbox rows), and send hands a mail to the worker for delivery. Plugins should always go through these helpers rather than calling mail.save() or backend.send_messages() directly.

Rendering

pretalx.mail.domain.render.render_template_to_mail(template, *, locale=None, safe_extra_context=None, context_kwargs=None)[source]

The canonical, safe way to construct QueuedMail objects from a persisted MailTemplate. Returns an unsaved QueuedMail with to / to_users unset; the caller picks save_draft(), send_draft(), or send_transient() next.

For ad-hoc content not backed by a saved template (system mails, on-the-fly invitations), use render_to_mail() directly.

pretalx.mail.domain.render.render_to_mail(*, subject_template, text_template, event=None, locale=None, safe_extra_context=None, context_kwargs=None)[source]

Render raw subject/text strings against the placeholder context and return an unsaved QueuedMail. Use this for ad-hoc content (system mails, on-the-fly invitations); for organiser-managed MailTemplate`s, prefer :func:`render_template_to_mail.

event may be None for global system mails (password resets, organiser team invites). If set, it is injected into the context.

Recipient and envelope fields (to, reply_to, bcc, template) are not rendering inputs and are left for the caller to set on the returned mail before persisting or dispatching.

pretalx.mail.domain.render.build_trusted_mail(*, event, to, subject, text)[source]

Unsaved QueuedMail from organiser-final content. No placeholder rendering — the caller asserts the strings are trusted. Markdown rendering of the body happens at send time via delivery_html_body()’s fallback.

Outbox persistence

pretalx.mail.domain.queue.save_draft(mail, *, to=None, to_users=None, submissions=None, attachments=None)[source]

Persist a rendered QueuedMail as a DRAFT row in the outbox: write the row, optionally set its to address, attach its M2Ms. to is a comma-separated string of raw addresses (or a single address); to_users is an iterable of User. The two are independent and may be combined. attachments is the JSON-serialisable list stored on QueuedMail.attachments.

Drafts sit in the outbox until an organiser action sends them; for immediate delivery, follow this call with send_draft().

pretalx.mail.domain.queue.copy_to_draft(mail)[source]

Duplicate a sent (or failed) QueuedMail as a fresh DRAFT so an organiser can edit and resend it. Recipient M2Ms (to_users, submissions) are copied; state / sent / error_* fields are reset.

Dispatch

pretalx.mail.domain.send.send_draft(mail, *, requestor=None, orga=True)[source]

Hand a saved DRAFT QueuedMail to the worker for delivery.

Requires mail.pk; for unsaved mails see send_transient().

Return type:

None

pretalx.mail.domain.send.send_transient(mail, *, force_global_backend=False)[source]

Fire-and-forget delivery of an unsaved QueuedMail. No row, no signals, no log entry.

Async — renders the body synchronously and schedules task_send_transient(), which calls pretalx.mail.domain.smtp.deliver_payload(). The worker uses mail.event’s SMTP for delivery, unless force_global_backend=True (system mails: pin to global so delivery survives a broken event SMTP). Caller must set mail.to first. A broker outage is logged and swallowed; the in-memory mail.sent / mail.state flip is best-effort only.

Return type:

None

pretalx.mail.domain.send.send_system_mail(*, subject, text, to, event=None, locale=None, context_kwargs=None, safe_extra_context=None)[source]

Render and dispatch a pretalx → user notification: password resets, password / email change confirmations, organiser team invites, pretalx.event.domain.mail.send_orga_mail().

Async — defers to task_send_transient(). Always pins to the global backend (a broken event SMTP must not block password resets); event only informs placeholder resolution and body styling. Not persisted, not signalled, no audit log.

Not for event-shaped correspondence (speaker invitations, schedule notifications, …) — those want the event’s From: line; render via render_to_mail() or render_template_to_mail() and dispatch through send_draft() (after save_draft()) or send_transient().

pretalx.event.domain.mail.send_orga_mail(event, text, *, stats=False, safe_extra_context=None, **context_kwargs)[source]

Send an organiser-facing notification about event. Uses the global mail backend.

Utility models

class pretalx.common.models.log.ActivityLog(*args, **kwargs)[source]

This model logs actions within an event.

It is not designed to provide a complete or reliable audit trail.

Parameters:

Relationship fields:

Parameters: