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 starting with the 1.0 release.

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 (BooleanField) – Is this event public yet? Should only be set via the pretalx.orga.views.EventLive view after the warnings have been acknowledged.

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

  • accept_template (ForeignKey to MailTemplate) – Templates for emails sent when accepting a talk.

  • reject_template (ForeignKey to MailTemplate) – Templates for emails sent when rejecting a talk.

  • ack_template (ForeignKey to MailTemplate) – Templates for emails sent when acknowledging that a submission was sent in.

  • update_template (ForeignKey to MailTemplate) – Templates for emails sent when a talk scheduling was modified.

  • question_template (ForeignKey to MailTemplate) – Templates for emails sent when a speaker has not yet answered a question, and organisers send out reminders.

  • primary_color (CharField) – Main event color. Accepts hex values like #00ff00.

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

  • logo (FileField) – Replaces the event name in the public header. Will be displayed at up to full header height and up to full content width.

  • header_image (FileField) – Replaces the header pattern and/or background color. Center-aligned, so when the window shrinks, the center will continue to be displayed.

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

  • id (AutoField) – Id

  • name (I18nCharField) – Name

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

  • organiser (ForeignKey to Organiser) – Organiser

  • date_from (DateField) – Event start date

  • date_to (DateField) – Event end date

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

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

  • 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 Markdown here.

disable_plugin(module)[source]

Disbles a named plugin.

Caution, no validation is performed at this point. No exception is raised if the module was not part of the active plugins.

Parameters

module (str) – The module to be deactivated.

Return type

None

enable_plugin(module)[source]

Enables a named plugin.

Caution, no validation is performed at this point. No exception is raised if the module is unknown. An already active module will not be added to the plugin list again.

Parameters

module (str) – The module to be activated.

Return type

None

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

release_schedule(name, user=None, notify_speakers=False)[source]

Releases a new Schedule by finalizing the current WIP schedule.

Parameters
  • name (str) – The new version name

  • user (User) – The User executing the release

  • notify_speakers (bool) – Generate emails for all speakers with changed slots.

shred()[source]

Irrevocably deletes an event and all related data.

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.

current_schedule

Returns the latest released.

Schedule, or None before the first release.

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.

property plugin_list

Provides a list of active plugins as strings, and is also an attribute setter.

Return type

list

speakers

Returns a queryset of all speakers (of type.

User) visible in the current released schedule.

submitters

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

Ignores users 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

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

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

Event.

Parameters
  • id (AutoField) – Id

  • 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.

shred()[source]

Irrevocably deletes the organiser and all related events and their 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) – Id

  • organiser (ForeignKey to Organiser) – Organiser

  • 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 submissions

  • is_reviewer (BooleanField) – Is a reviewer

  • review_override_votes (PositiveIntegerField) – Override votes. Each member of this team will have this amount of override votes per event to indicate an absolute positive or negative opinion of a submission.

  • members (ManyToManyField) – Team members

  • limit_events (ManyToManyField) – Limit permissions to these events

  • limit_tracks (ManyToManyField) – Limit to tracks

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 P(apers|articipation|roposals).

Parameters
  • deadline (DateTimeField) – 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) – Id

  • event (OneToOneField to Event) – Event

  • headline (I18nCharField) – Headline

  • text (I18nTextField) – Text. You can use Markdown here.

  • default_type (ForeignKey to SubmissionType) – Default submission type

is_open

True if max_deadline is not over yet, or if no deadline is set.

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) timeframe.

Parameters
  • is_active (BooleanField) – Is this phase currently active? There can be only one active phase per event. Use the activate method to activate a review phase, as it will take care of this limitation.

  • position (PositiveIntegerField) – Helper field to deal with relative positioning of review phases next to each other.

  • id (AutoField) – Id

  • event (ForeignKey to Event) – Event

  • name (CharField) – Name

  • start (DateTimeField) – Phase start

  • end (DateTimeField) – Phase end

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

  • can_see_other_reviews (CharField) – Reviewers can see other reviews

  • can_see_speaker_names (BooleanField) – Reviewers can see speaker names

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

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

activate()[source]

Activates this review phase and deactivates all others in this event.

Return type

None

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 (CharField) – A user’s alphanumeric code is autogenerated, may not be changed, and is the unique identifier of that user.

  • name (CharField) – 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 (CharField) – The password is stored using Django’s PasswordField. Use the set_password and check_password methods to interact with it.

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

  • groups (ManyToManyField) – Django internals, not used in pretalx.

  • user_permissions (ManyToManyField) – Django internals, not used in pretalx.

  • id (AutoField) – Id

  • last_login (DateTimeField) – Last login

  • email (EmailField) – E-mail. Your email address will be used for password resets and notification about your event/submissions.

  • 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 authorization mechanisms.

  • locale (CharField) – Preferred language

  • timezone (CharField) – Timezone

  • avatar (ImageField) – Profile picture. If possible, upload an image that is least 120 pixels wide.

  • get_gravatar (BooleanField) – Retrieve profile picture via gravatar. If you have registered with an email address that has a gravatar account, we can retrieve your profile picture from there.

  • pw_reset_token (CharField) – Password reset token

  • pw_reset_time (DateTimeField) – Password reset time

event_profile(event)[source]

Retrieve (and/or create) the event.

SpeakerProfile for this user.

Retval

pretalx.person.models.profile.EventProfile

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

log_action(action, data=None, person=None, orga=False)[source]

Create a log entry for this user.

Parameters
  • action (str) – The log action that took place.

  • data (Optional[dict]) – Addition data to be saved.

  • person (User) – The person modifying this user. Defaults to this user.

  • orga (bool) – Was this action initiated by a privileged user?

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

All Event related data concerning a.

User is stored here.

Parameters
answers

A queryset of Answer objects.

Includes all answers the user has given either for themselves or for their talks for this event.

submissions

All non-deleted.

Submission objects by this user on this event.

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
  • id (AutoField) – Id

  • event (ForeignKey to Event) – Event

  • include_submitters (BooleanField) – Include all submitters. Show to every submitter regardless of their submissions’ status

  • exclude_unconfirmed (BooleanField) – Exclude unconfirmed speakers. Show to speakers only once they have confirmed attendance

  • title (I18nCharField) – Subject

  • text (I18nTextField) – Text. You can use Markdown here.

  • resource (FileField) – File. Please try to keep your upload small, preferably below 16 MB.

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.

A submission, which belongs to exactly one event, can have multiple speakers and a lot of other related data, such as a SubmissionType, a Track, multiple Answer objects, and so on.

Parameters
  • code (CharField) – The unique alphanumeric identifier used to refer to a submission.

  • state (CharField) – The submission can be ‘submitted’, ‘accepted’, ‘confirmed’, ‘rejected’, ‘withdrawn’, or ‘canceled’. State changes should be done via the corresponding methods, like accept(). The SubmissionStates class comes with a method_names dictionary for method lookup.

  • image (ImageField) – An image illustrating the talk or topic.

  • review_code (CharField) – A token used in secret URLs giving read-access to the submission.

  • id (AutoField) – Id

  • created (DateTimeField) – Created

  • event (ForeignKey to Event) – Event

  • title (CharField) – Title

  • submission_type (ForeignKey to SubmissionType) – Submission type

  • track (ForeignKey to Track) – Track

  • abstract (TextField) – Abstract. You can use Markdown here.

  • description (TextField) – Description. You can use Markdown here.

  • notes (TextField) – Notes. These notes are meant for the organiser 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. The duration in minutes. Leave empty for default duration for this submission type.

  • slot_count (PositiveIntegerField) – Slot count. How many times this talk will be held.

  • content_locale (CharField) – Language

  • is_featured (BooleanField) – Show this talk on the public sneak peek page, if the sneak peek page is enabled and the talk was accepted.

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

  • invitation_token (CharField) – Invitation token

  • access_code (ForeignKey to SubmitterAccessCode) – Access code

  • speakers (ManyToManyField) – Speakers

accept(person=None, force=False, orga=True)[source]

Sets the submission’s state to ‘accepted’.

Creates an acceptance QueuedMail unless the submission was previously confirmed.

cancel(person=None, force=False, orga=True)[source]

Sets the submission’s state to ‘canceled’.

confirm(person=None, force=False, orga=False)[source]

Sets the submission’s state to ‘confirmed’.

get_duration()[source]

Returns this submission’s duration in minutes.

Falls back to the SubmissionType’s default duration if none is set on the submission.

Return type

int

make_submitted(person=None, force=False, orga=False)[source]

Sets the submission’s state to ‘submitted’.

reject(person=None, force=False, orga=True)[source]

Sets the submission’s state to ‘rejected’ and creates a rejection.

QueuedMail.

update_duration()[source]

Apply the submission’s duration to its currently scheduled.

TalkSlot.

Should be called whenever the duration changes.

update_talk_slots()[source]

Makes sure the correct amount of.

TalkSlot objects exists.

After an update or state change, talk slots should either be all deleted, or all created, or the number of talk slots might need to be adjusted.

withdraw(person=None, force=False, orga=False)[source]

Sets the submission’s state to ‘withdrawn’.

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.

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.

uuid

A UUID5, calculated from the submission code and the instance identifier.

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 (TextField) – The review itself. May be empty.

  • score (IntegerField) – The upper and lower bounds of this value are defined in an event’s settings.

  • override_vote (BooleanField) – If this field is True or False, it indicates that the reviewer has spent one of their override votes to emphasize their opinion of the review. It is None otherwise.

  • id (AutoField) – Id

  • submission (ForeignKey to Submission) – Submission

  • user (ForeignKey to User) – User

  • created (DateTimeField) – Created

  • updated (DateTimeField) – Updated

classmethod find_missing_reviews(event, user, ignore=None)[source]

Returns all.

Submission objects this User still has to review for the given Event.

Excludes submissions this user has submitted, and takes track Team permissions into account. The result is ordered by review count.

Return type

Queryset of Submission objects

display_score

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

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
class pretalx.submission.models.track.Track(*args, **kwargs)[source]

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

Parameters
  • id (AutoField) – Id

  • event (ForeignKey to Event) – Event

  • name (I18nCharField) – Name

  • color (CharField) – Color

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

property slug

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.

Return type

str

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) – Id

  • event (ForeignKey to Event) – Event

  • name (I18nCharField) – Name

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

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

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

update_duration()[source]

Updates the duration of all.

TalkSlot objects of Submission objects of this type.

Runs only for submissions that do not override their default duration. Should be called whenever duration changes.

property slug

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.

Return type

str

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

Resources are file uploads belonging to a.

Submission.

Parameters

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 (CharField) – Can be any of ‘number’, ‘string’, ‘text’, ‘boolean’, ‘file’, ‘choices’, or ‘multiple_choice’. Defined in the QuestionVariant class.

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

  • required (BooleanField) – If this is True, the answer must be given at submission time. On boolean questions: must check box.

  • position (IntegerField) – Position in the question order in this event.

  • id (AutoField) – Id

  • event (ForeignKey to Event) – Event

  • question (I18nCharField) – Question

  • help_text (I18nCharField) – Help text. Will appear just like this text below the question input field. You can use Markdown here.

  • default_answer (TextField) – Default answer

  • active (BooleanField) – Active. Inactive questions will no longer be asked.

  • contains_personal_data (BooleanField) – Answers contain personal data. If a user deletes their account, answers of questions for personal data will be removed, too.

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

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

  • is_public (BooleanField) – Publish answers. Answers will be shown on talk or speaker pages as appropriate. Please note that you cannot make a question public after the first answers have been given, to allow speakers explicit consent before publishing information.

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

  • tracks (ManyToManyField) – Tracks. You can limit this question to some tracks. Leave this field empty to apply to all tracks.

missing_answers(filter_speakers=False, filter_talks=False)[source]

Returns how many answers are still missing or this question.

This method only supports submission questions and speaker questions. For missing reviews, please use the Review.find_missing_reviews method.

Parameters
  • filter_speakers (list) – Apply only to these speakers.

  • filter_talks (list) – Apply only to these talks.

Return type

int

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

Provides the possible answers for.

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

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

Answers are connected to a.

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

Parameters
remove(person=None, force=False)[source]

Deletes an answer.

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
freeze(name, user=None, notify_speakers=True)[source]

Releases the current WIP schedule as a fixed schedule version.

Parameters
  • name (str) – The new schedule name. May not be in use in this event, and cannot be ‘wip’ or ‘latest’.

  • user – The User initiating the freeze.

  • notify_speakers (bool) – Should notification emails for speakers with changed slots be generated?

Return type

Schedule

notify_speakers()[source]

Save the notifications QueuedMail objects to the outbox.

unfreeze(user=None)[source]

Resets the current WIP schedule to an older schedule version.

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.

notifications

A list of unsaved QueuedMail objects to be sent on schedule release.

previous_schedule

Returns the schedule released before this one, if any.

scheduled_talks

Returns all TalkSlot objects that have been scheduled.

slots

Returns all.

Submission objects with TalkSlot objects in this schedule.

speakers_concerned

Returns a dictionary of speakers with their new and changed talks in this schedule.

Each speaker is assigned a dictionary with create and update fields, each containing a list of submissions.

warnings

A dictionary of warnings to be acknowledged pre-release.

talk_warnings contains a list of talk-related warnings. unscheduled is the list of talks without a scheduled slot, unconfirmed is the list of submissions that will not be visible due to their unconfirmed status, and no_track are submissions without a track in a conference that uses tracks.

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
copy_to_schedule(new_schedule, save=True)[source]

Create a new slot for the given.

Schedule with all other fields identical to this one.

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 arithmetics.

property duration

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

Return type

int

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
__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

classmethod intersection(*availabilitysets)[source]

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

Return type

List[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

classmethod union(availabilities)[source]

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

Return type

List[Availability]

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) – Id

  • event (ForeignKey to Event) – Event

  • name (I18nCharField) – Name

  • 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 adapters for video input …

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

  • position (PositiveIntegerField) – Position. This is the order that rooms are displayed in in the schedule (lower = left).

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 hardcoded cases, for now.

Parameters
  • id (AutoField) – Id

  • event (ForeignKey to Event) – Event

  • 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 mail sent from this template. This may be a LOT!

to_mail(user, event, locale=None, context=None, skip_queue=False, commit=True, submission=None, full_submission_content=False)[source]

Creates a QueuedMail object from a MailTemplate.

Parameters
  • user – Either a User or an email address as a string.

  • event – The event to which this email belongs. May be None.

  • locale (Optional[str]) – The locale will be set via the event and the recipient, but can be overridden with this parameter.

  • context (Optional[dict]) – Context to be used when rendering the template.

  • skip_queue (bool) – Send directly without saving. Use with caution, as it removes any logging and traces.

  • commit (bool) – Set False to return an unsaved object.

  • submission – Pass a submission if one is related to the mail. Will be used to generate context.

  • full_submission_content (bool) – Attach the complete submission with all its fields to the email.

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
  • sent_atNone if the mail has not been sent yet.

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

  • to (CharField) – 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) – Id

  • event (ForeignKey to Event) – Event

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

  • cc (CharField) – Cc. 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

  • sent (DateTimeField) – Sent at

copy_to_draft()[source]

Copies an already sent email to a new object and adds it to the outbox.

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

Sends an email.

Parameters
  • requestor (User) – The user issuing the command. Used for logging.

  • orga (bool) – Was this email sent as by a privileged user?

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
get_orga_url()[source]

Returns an organiser backend URL to the object in question (if any).

Return type

str

get_public_url()[source]

Returns a public URL to the object in question (if any).

Return type

str