Component Modules

Documentation for the main component modules in the unified eventyay system.

Tickets Component (Presale)

Presale Views

class eventyay.presale.views.event.EventAuth(**kwargs)

Bases: View

dispatch(request, *args, **kwargs)
post(request, *args, **kwargs)
class eventyay.presale.views.event.EventIcalDownload(**kwargs)

Bases: EventViewMixin, View

get(request, *args, **kwargs)
class eventyay.presale.views.event.EventIndex(**kwargs)

Bases: EventViewMixin, EventListMixin, CartMixin, TemplateView

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
get_context_data(**kwargs)
template_name = 'pretixpresale/event/index.html'
class eventyay.presale.views.event.JoinOnlineVideoView(**kwargs)

Bases: EventViewMixin, View

dispatch(request, *args, **kwargs)
generate_token_url(request, order_position, order)
get(request, *args, **kwargs)
validate_access(request, *args, **kwargs)
class eventyay.presale.views.event.SeatingPlanView(**kwargs)

Bases: EventViewMixin, TemplateView

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
get_context_data(**kwargs)
template_name = 'pretixpresale/event/seatingplan.html'
eventyay.presale.views.event.get_grouped_products(event, subevent=None, voucher=None, channel='web', require_seat=0, base_qs=None, allow_addons=False, quota_cache=None, filter_products=None, filter_categories=None)
eventyay.presale.views.event.product_group_by_category(products)
class eventyay.presale.views.cart.AnswerDownload(**kwargs)

Bases: EventViewMixin, View

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
class eventyay.presale.views.cart.CartActionMixin

Bases: object

cart_session
get_error_url()
get_next_url()
get_success_url(value=None)
invoice_address
class eventyay.presale.views.cart.CartAdd(**kwargs)

Bases: EventViewMixin, CartActionMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_check_url(task_id, ajax)
get_success_message(value)
known_errortypes = ['CartError']
post(request, *args, **kwargs)
task = <@task: eventyay.base.services.cart.add_products_to_cart of eventyay>
class eventyay.presale.views.cart.CartApplyVoucher(**kwargs)

Bases: EventViewMixin, CartActionMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_success_message(value)
known_errortypes = ['CartError']
post(request, *args, **kwargs)
task = <@task: eventyay.base.services.cart.apply_voucher of eventyay>
class eventyay.presale.views.cart.CartClear(**kwargs)

Bases: EventViewMixin, CartActionMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_success_message(value)
known_errortypes = ['CartError']
post(request, *args, **kwargs)
task = <@task: eventyay.base.services.cart.clear_cart of eventyay>
class eventyay.presale.views.cart.CartRemove(**kwargs)

Bases: EventViewMixin, CartActionMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_success_message(value)
known_errortypes = ['CartError']
post(request, *args, **kwargs)
task = <@task: eventyay.base.services.cart.remove_cart_position of eventyay>
class eventyay.presale.views.cart.RedeemView(**kwargs)

Bases: NoSearchIndexViewMixin, EventViewMixin, TemplateView

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
get_context_data(**kwargs)
template_name = 'pretixpresale/event/voucher.html'
eventyay.presale.views.cart.cart_session(request)

Before pretix 1.8.0, all checkout-related information (like the entered email address) was stored in the user’s regular session dictionary. This led to data interference and leaks for example if a user simultaneously buys tickets for two events.

Starting with 1.8.0, this information is stored in separate dictionaries in the user’s session within the new request.session[‘carts’] dictionary. This method provides convenient access to the currently active cart session sub-dictionary for read and write access.

eventyay.presale.views.cart.create_empty_cart_id(request, replace_current=True)

Forcefully creates a new empty cart for the current session. Behaves like get_or_create_cart_id, except that it ignores the current state of the session. If replace_current is active, the current cart session for this event is deleted as well.

This is currently only invoked after an order has been created to make sure that all forms during checkout will show empty again if the same browser starts buying tickets again.

eventyay.presale.views.cart.generate_cart_id(request=None, prefix='')

Generates a random new cart ID that is not currently in use, with an optional pretix.

class eventyay.presale.views.checkout.CheckoutView(**kwargs)

Bases: View

dispatch(request, *args, **kwargs)
get_index_url(request)
redirect(url)
class eventyay.presale.views.order.AnswerDownload(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, View

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
class eventyay.presale.views.order.InvoiceDownload(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, View

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
class eventyay.presale.views.order.OrderCancel(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, TemplateView

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
get_context_data(**kwargs)
template_name = 'pretixpresale/event/order_cancel.html'
class eventyay.presale.views.order.OrderCancelDo(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_context_data(**kwargs)
get_error_url()
get_success_message(value)
get_success_url(value)
known_errortypes = ['OrderError']
post(request, *args, **kwargs)
task = <@task: eventyay.base.services.orders.cancel_order of eventyay>
class eventyay.presale.views.order.OrderChange(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, TemplateView

dispatch(request, *args, **kwargs)
formdict
get_context_data(**kwargs)
positions
post(*args, **kwargs)
template_name = 'pretixpresale/event/order_change.html'
class eventyay.presale.views.order.OrderDetailMixin

Bases: NoSearchIndexViewMixin

get_order_url()
order
class eventyay.presale.views.order.OrderDetails(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, CartMixin, TicketPageMixin, TemplateView

dispatch(request, *args, **kwargs)
download_buttons
get(request, *args, **kwargs)
get_context_data(**kwargs)
template_name = 'pretixpresale/event/order.html'
class eventyay.presale.views.order.OrderDownload(**kwargs)

Bases: OrderDownloadMixin, EventViewMixin, OrderDetailMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_error_url()
get_self_url()
known_errortypes = ['OrderError']
order_position
task = <@task: eventyay.base.services.tickets.generate of eventyay>
class eventyay.presale.views.order.OrderDownloadMixin

Bases: object

get(request, *args, **kwargs)
get_last_ct()
get_success_message(value)
get_success_url(value)
output
post(request, *args, **kwargs)
success(value)
class eventyay.presale.views.order.OrderInvoiceCreate(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, View

dispatch(request, *args, **kwargs)
post(request, *args, **kwargs)
class eventyay.presale.views.order.OrderModify(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, OrderQuestionsViewMixin, TemplateView

dispatch(request, *args, **kwargs)
form_class

alias of QuestionsForm

get(request, *args, **kwargs)
get_question_override_sets(order_position)
invoice_form_class

alias of InvoiceAddressForm

positions
post(request, *args, **kwargs)
template_name = 'pretixpresale/event/order_modify.html'
class eventyay.presale.views.order.OrderOpen(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, View

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
class eventyay.presale.views.order.OrderPayChangeMethod(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, TemplateView

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
get_confirm_url(payment)
get_context_data(**kwargs)
get_payment_url(payment)
mark_paid_free()
open_fees
open_payment
post(request, *args, **kwargs)
provider_forms
template_name = 'pretixpresale/event/order_pay_change.html'
class eventyay.presale.views.order.OrderPaymentComplete(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, View

This is used for the first try of a payment. This means the user just entered payment details and confirmed them during the order process and we don’t need to show them again, we just need to perform the payment.

dispatch(request, *args, **kwargs)
get(request, *args, **kwargs)
get_payment_url()
payment
class eventyay.presale.views.order.OrderPaymentConfirm(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, TemplateView

This is used if a payment is retried or the payment method is changed. It is shown after the payment details have been entered and allows the user to confirm and review the details. On submitting this view, the payment is performed.

dispatch(request, *args, **kwargs)
get_context_data(**kwargs)
get_payment_url()
payment
post(request, *args, **kwargs)
template_name = 'pretixpresale/event/order_pay_confirm.html'
class eventyay.presale.views.order.OrderPaymentStart(**kwargs)

Bases: EventViewMixin, OrderDetailMixin, TemplateView

This is used if a payment is retried or the payment method is changed. It shows the payment provider’s form that asks for payment details (e.g. CC number).

dispatch(request, *args, **kwargs)
form
get_confirm_url()
get_context_data(**kwargs)
payment
post(request, *args, **kwargs)
template_name = 'pretixpresale/event/order_pay.html'
class eventyay.presale.views.order.OrderPositionDetailMixin

Bases: NoSearchIndexViewMixin

get_position_url()
order
position
class eventyay.presale.views.order.OrderPositionDetails(**kwargs)

Bases: EventViewMixin, OrderPositionDetailMixin, CartMixin, TicketPageMixin, TemplateView

dispatch(request, *args, **kwargs)
download_buttons
get(request, *args, **kwargs)
get_context_data(**kwargs)
template_name = 'pretixpresale/event/position.html'
class eventyay.presale.views.order.OrderPositionDownload(**kwargs)

Bases: OrderDownloadMixin, EventViewMixin, OrderPositionDetailMixin, AsyncAction, View

dispatch(request, *args, **kwargs)
get_error_url()
get_self_url()
known_errortypes = ['OrderError']
order_position
task = <@task: eventyay.base.services.tickets.generate of eventyay>
class eventyay.presale.views.order.TicketPageMixin

Bases: object

get_context_data(**kwargs)
eventyay.presale.views.order.can_generate_invoice(event, order, ignore_payments=False)

Presale Signals

eventyay.presale.signals.checkout_all_optional = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’

If any receiver of this signal returns True, all input fields during checkout (contact data, invoice address, confirmations) will be optional, except for questions. Use with care!

As with all plugin signals, the sender keyword argument will contain the event. A request argument will contain the request object.

eventyay.presale.signals.checkout_confirm_messages = <eventyay.base.signals.EventPluginSignal object>

This signal is sent out to retrieve short messages that need to be acknowledged by the user before the order can be completed. This is typically used for something like “accept the terms and conditions”. Receivers are expected to return a dictionary where the keys are globally unique identifiers for the message and the values can be arbitrary HTML.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.checkout_confirm_page_content = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’

This signals allows you to add HTML content to the confirmation page that is presented at the end of the checkout process, just before the order is being created.

As with all plugin signals, the sender keyword argument will contain the event. A request argument will contain the request object.

eventyay.presale.signals.checkout_flow_steps = <eventyay.base.signals.EventPluginSignal object>

This signal is sent out to retrieve pages for the checkout flow. Receivers are expected to return a subclass of pretix.presale.checkoutflow.BaseCheckoutFlowStep.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.contact_form_fields = <eventyay.base.signals.EventPluginSignal object>

This signals allows you to add form fields to the contact form that is presented during checkout and by default only asks for the email address. You are supposed to return a dictionary of form fields with globally unique keys. The validated form results will be saved into the contact_form_data entry of the order’s meta_info dictionary.

As with all plugin signals, the sender keyword argument will contain the event. A request argument will contain the request object.

eventyay.presale.signals.contact_form_fields_overrides = <eventyay.base.signals.EventPluginSignal object>

Arguments: request, order

This signal allows you to override fields of the contact form that is presented during checkout and by default only asks for the email address. It is also being used for the invoice address form. You are supposed to return a dictionary of dictionaries with globally unique keys. The value-dictionary should contain one or more of the following keys: initial, disabled, validators. The key of the dictionary should be the name of the form field.

As with all plugin signals, the sender keyword argument will contain the event. A request argument will contain the request object. The order argument is None during the checkout process and contains an order if the customer is trying to change an existing order.

eventyay.presale.signals.fee_calculation_for_cart = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’, ‘invoice_address’, ‘total’, ‘positions’

This signals allows you to add fees to a cart. You are expected to return a list of OrderFee objects that are not yet saved to the database (because there is no order yet).

As with all plugin signals, the sender keyword argument will contain the event. A request argument will contain the request object and invoice_address the invoice address (useful for tax calculation). The total keyword argument will contain the total cart sum without any fees. You should not rely on this total value for fee calculations as other fees might interfere. The positions argument will contain a list or queryset of CartPosition objects.

Arguments: request

The signal pretix.presale.signals.footer_link allows you to add links to the footer of an event page. You are expected to return a dictionary containing the keys label and url.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.front_page_bottom = <eventyay.base.signals.EventPluginSignal object>

Arguments: request, subevent

This signal is sent out to display additional information on the frontpage below the list of products.

As with all plugin signals, the sender keyword argument will contain the event. The receivers are expected to return HTML.

eventyay.presale.signals.front_page_bottom_widget = <eventyay.base.signals.EventPluginSignal object>

Arguments: request, subevent

This signal is sent out to display additional information on the frontpage below the list of products if the front page is shown in the widget.

As with all plugin signals, the sender keyword argument will contain the event. The receivers are expected to return HTML.

eventyay.presale.signals.front_page_top = <eventyay.base.signals.EventPluginSignal object>

Arguments: request, subevent

This signal is sent out to display additional information on the frontpage above the list of products and but below a custom frontpage text.

As with all plugin signals, the sender keyword argument will contain the event. The receivers are expected to return HTML.

Arguments: request

The signal pretix.presale.signals.global_footer_link allows you to add links to the footer of any page. You are expected to return a dictionary containing the keys label and url.

Arguments: request

This signal allows you to put code before the end of the HTML <body> tag of every page in the frontend. You will get the request as the keyword argument request and are expected to return plain HTML.

This signal is called regardless of whether your plugin is active for all pages of the system.

eventyay.presale.signals.global_html_head = <django.dispatch.dispatcher.Signal object>

Arguments: request

This signal allows you to put code inside the HTML <head> tag of every page in the frontend. You will get the request as the keyword argument request and are expected to return plain HTML.

This signal is called regardless of whether your plugin is active for all pages of the system.

eventyay.presale.signals.global_html_page_header = <django.dispatch.dispatcher.Signal object>

Arguments: request

This signal allows you to put code right in the beginning of the HTML <body> tag of every page in the frontend. You will get the request as the keyword argument request and are expected to return plain HTML.

This signal is called regardless of whether your plugin is active for all pages of the system.

Arguments: request

This signal allows you to put code before the end of the HTML <body> tag of every page in the frontend. You will get the request as the keyword argument request and are expected to return plain HTML.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.html_head = <eventyay.base.signals.EventPluginSignal object>

Arguments: request

This signal allows you to put code inside the HTML <head> tag of every page in the frontend. You will get the request as the keyword argument request and are expected to return plain HTML.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.html_page_header = <eventyay.base.signals.EventPluginSignal object>

Arguments: request

This signal allows you to put code right in the beginning of the HTML <body> tag of every page in the frontend. You will get the request as the keyword argument request and are expected to return plain HTML.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.order_info = <eventyay.base.signals.EventPluginSignal object>

Arguments: order, request

This signal is sent out to display additional information on the order detail page

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.order_info_top = <eventyay.base.signals.EventPluginSignal object>

Arguments: order, request

This signal is sent out to display additional information on top of the order detail page

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.order_meta_from_request = <eventyay.base.signals.EventPluginSignal object>

Arguments: request

This signal is sent before an order is created through the pretixpresale frontend. It allows you to return a dictionary that will be merged in the meta_info attribute of the order. You will receive the request triggering the order creation as the request keyword argument.

As with all event-plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.position_info = <eventyay.base.signals.EventPluginSignal object>

Arguments: order, position, request

This signal is sent out to display additional information on the position detail page

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.position_info_top = <eventyay.base.signals.EventPluginSignal object>

Arguments: order, position, request

This signal is sent out to display additional information on top of the position detail page

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.process_request = <eventyay.base.signals.EventPluginSignal object>

Arguments: request

This signal is sent out whenever a request is made to a event presale page. Most of the time, this will be called from the middleware layer (except on plugin-provided pages this will be called by the @event_view decorator). Similarly to Django’s process_request middleware method, if you return a Response, that response will be used and the request won’t be processed any further down the stack.

WARNING: Be very careful about using this signal as listening to it makes it really easy to cause serious performance problems.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.process_response = <eventyay.base.signals.EventPluginSignal object>

Arguments: request, response

This signal is sent out whenever a response is sent from a event presale page. Most of the time, this will be called from the middleware layer (except on plugin-provided pages this will be called by the @event_view decorator). Similarly to Django’s process_response middleware method you must return a response object, that will be passed further up the stack to other handlers of the signal. If you do not want to alter the response, just return the response parameter.

WARNING: Be very careful about using this signal as listening to it makes it really easy to cause serious performance problems.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.product_description = <eventyay.base.signals.EventPluginSignal object>

Arguments: product, variation

This signal is sent out when the description of an product or variation is rendered and allows you to append additional text to the description. You are passed the product and variation and expected to return HTML.

eventyay.presale.signals.question_form_fields = <eventyay.base.signals.EventPluginSignal object>

Arguments: position

This signals allows you to add form fields to the questions form that is presented during checkout and by default asks for the questions configured in the backend. You are supposed to return a dictionary of form fields with globally unique keys. The validated form results will be saved into the question_form_data entry of the position’s meta_info dictionary.

The position keyword argument will contain either a CartPosition object or an OrderPosition object, depending on whether the form is called as part of the order checkout or for changing an order later.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.question_form_fields_overrides = <eventyay.base.signals.EventPluginSignal object>

Arguments: position, request

This signal allows you to override fields of the questions form that is presented during checkout and by default only asks for the questions configured in the backend. You are supposed to return a dictionary of dictionaries with globally unique keys. The value-dictionary should contain one or more of the following keys: initial, disabled, validators. The key of the dictionary should be the form field name for system fields (e.g. company), or the question’s identifier for user-defined questions.

The position keyword argument will contain a CartPosition or OrderPosition object.

As with all plugin signals, the sender keyword argument will contain the event. A request argument will contain the request object.

eventyay.presale.signals.render_seating_plan = <eventyay.base.signals.EventPluginSignal object>

Arguments: request, subevent, voucher

This signal is sent out to render a seating plan, if one is configured for the specific event. You will be passed the request as a keyword argument. If applicable, a subevent or voucher argument might be given.

As with all plugin signals, the sender keyword argument will contain the event. The receivers are expected to return HTML.

eventyay.presale.signals.sass_postamble = <eventyay.base.signals.EventPluginSignal object>

Arguments: filename

This signal allows you to put SASS code at the end of the event-specific stylesheet. Keep in mind that this will only be called/rebuilt when the user changes display settings or pretix gets updated. You will get the filename that is being generated (usually “main.scss” or “widget.scss”). This SASS code will be loaded after all of pretix’ SASS code.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.sass_preamble = <eventyay.base.signals.EventPluginSignal object>

Arguments: filename

This signal allows you to put SASS code at the beginning of the event-specific stylesheet. Keep in mind that this will only be called/rebuilt when the user changes display settings or pretix gets updated. You will get the filename that is being generated (usually “main.scss” or “widget.scss”). This SASS code will be loaded after setting of user-defined variables like colors and fonts but before pretix’ SASS code.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.presale.signals.voucher_redeem_info = <eventyay.base.signals.EventPluginSignal object>

Arguments: voucher

This signal is sent out to display additional information on the “redeem a voucher” page

As with all plugin signals, the sender keyword argument will contain the event.

Talk Component (CfP & Organizer)

Call for Papers

eventyay.cfp.signals.cfp_steps = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to add CfP steps of your own. This signal will expect a list of pretalx.cfp.flow.BaseCfPStep objects. The integration of CfP steps in the CfP workflow is currently considered unstable and may change without notice between versions.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing.

eventyay.cfp.signals.footer_link = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to add links to the footer of an event page. You are expected to return a dictionary containing the keys label and url.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing.

eventyay.cfp.signals.html_above_profile_page = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to display additional information on the personal user profile page, above the submission list.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing. The receivers are expected to return HTML.

eventyay.cfp.signals.html_above_submission_list = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to display additional information on the personal user submission list page, above the submission list.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing. The receivers are expected to return HTML.

eventyay.cfp.signals.html_head = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to put code inside the HTML <head> tag of every page in the frontend (i.e. everything not in the organiser backend). You will get the request as the keyword argument request and are expected to return plain HTML.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing. The receivers are expected to return HTML.

Organizer Interface

eventyay.orga.signals.activate_event = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out before an event goes live. It allows any installed plugin to raise an Exception to prevent the event from going live. The exception message will be exposed to the user. If a string value is returned, eventyay will show it as a success message. You will get the request as a keyword argument request. Receivers are not expected to return a response.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.orga.signals.event_copy_data = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out when a new event is created as a clone of an existing event, i.e. the settings from the older event are copied to the newer one. You can listen to this signal to copy data or configuration stored within your plugin’s models as well.

You don’t need to copy data inside the general settings storage which is cloned automatically, but you might need to modify that data.

The sender keyword argument will contain the event of the new event. The other keyword argument will contain the event slug to copy from. The keyword arguments submission_type_map, question_map, track_map and speaker_information_map contain mappings from object IDs in the original event to objects in the new event of the respective types.

eventyay.orga.signals.html_head = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to put code inside the HTML <head> tag of every page in the organizer backend. You will get the request as the keyword argument request and are expected to return plain HTML.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing. The receivers are expected to return HTML.

eventyay.orga.signals.nav_event = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to add additional views to the admin panel navigation. You will get the request as a keyword argument request. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You can also return a ForkAwesome icon name with the key icon, it will be respected depending on the type of navigation. You should also return an active key with a boolean set to True, when this item should be marked as active. If the children key is present, the entries will be rendered as a dropdown menu. The request object will have an attribute event.

If you use this, you should read the documentation on how to deal with URLs in eventyay.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.orga.signals.nav_event_settings = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to collect additional settings sub-pages of an event. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You should also return an active key with a boolean set to True, when this item should be marked as active.

As with all plugin signals, the sender keyword argument will contain the event. A second keyword argument request will contain the request object.

eventyay.orga.signals.nav_global = <django.dispatch.dispatcher.Signal object>

This signal allows you to add additional views to the navigation bar when no event is selected. You will get the request as a keyword argument request. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You can also return a ForkAwesome icon name with the key icon, it will be respected depending on the type of navigation. You should also return an active key with a boolean set to True, when this item should be marked as active. If the children key is present, the entries will be rendered as a dropdown menu.

If you use this, you should read the documentation on how to deal with URLs in eventyay.

This is no EventPluginSignal, so you do not get the event in the sender argument and you may get the signal regardless of whether your plugin is active.

Submission Management

eventyay.submission.signals.submission_state_change = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to trigger additional events when a submission changes its state. You will receive the submission after it has been saved, the previous state, and the user triggering the change if available. Any exceptions raised will be ignored.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, you will receive the keyword arguments submission, old_state, and user (which may be None). When the submission is created or submitted from a draft state, old_state will be None.

Schedule Management

eventyay.schedule.signals.register_faved_ical_exporter(sender, **kwargs)
eventyay.schedule.signals.register_ical_exporter(sender, **kwargs)
eventyay.schedule.signals.register_json_exporter(sender, **kwargs)
eventyay.schedule.signals.register_my_ical_exporter(sender, **kwargs)
eventyay.schedule.signals.register_my_json_exporter(sender, **kwargs)
eventyay.schedule.signals.register_my_xcal_exporter(sender, **kwargs)
eventyay.schedule.signals.register_my_xml_exporter(sender, **kwargs)
eventyay.schedule.signals.register_xcal_exporter(sender, **kwargs)
eventyay.schedule.signals.register_xml_exporter(sender, **kwargs)
eventyay.schedule.signals.schedule_release = <eventyay.common.signals.EventPluginSignal object>

This signal allows you to trigger additional events when a new schedule version is released. You will receive the new schedule and the user triggering the change (if any). Any exceptions raised will be ignored.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, you will receive the keyword arguments schedule and user (which may be None).

Public Agenda

eventyay.agenda.signals.html_above_session_pages = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to display additional information on the public session pages.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing, and the submission which is currently displayed. The receivers are expected to return HTML.

eventyay.agenda.signals.html_below_session_pages = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to display additional information on the public session pages.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the signal will be called with the request it is processing, and the submission which is currently displayed. The receivers are expected to return HTML.

eventyay.agenda.signals.register_recording_provider = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to gather all known recording providers. Receivers should return a subclass of pretalx.agenda.recording.BaseRecordingProvider.

As with all event plugin signals, the sender keyword argument will contain the event.

eventyay.agenda.permissions.is_submission_visible_via_schedule(user, submission)
class eventyay.agenda.recording.BaseRecordingProvider(event)

Bases: object

RecordingProviders should subclass this class.

Register your procider with pretalx.agenda.signals.register_recording_provider.

get_recording(submission)

Returns a dictionary {“iframe”: …, “csp_header”: …} Both the iframe and the csp_header should be strings.

Person & Speaker Management

eventyay.person.signals.delete_user = <django.dispatch.dispatcher.Signal object>

This signal is sent out when a user is deleted - both when deleted on the frontend (“deactivated”) and actually removed (“shredded”).

You will get the user as a keyword argument user. Receivers are expected to delete any personal information they might have stored about this user.

Additionally, you will get the keyword argument db_delete when the user object will be deleted from the database. If you have any foreign keys to the user object, you should delete them here.

eventyay.person.signals.register_speaker_csv_exporter(sender, **kwargs)
eventyay.person.permissions.has_reviewer_teams(user, event)

Talk Rules & Permissions

eventyay.talk_rules.submission.annotate_assigned(queryset, event, user)
eventyay.talk_rules.submission.get_missing_reviews(event, user, ignore=None)
eventyay.talk_rules.submission.get_reviewable_submissions(event, user, queryset=None)

Returns all submissions the user is permitted to review.

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

eventyay.talk_rules.submission.get_reviewer_tracks(event, user)
eventyay.talk_rules.submission.limit_for_reviewers(queryset, event, user, reviewer_tracks=None, add_assignments=False)
eventyay.talk_rules.submission.questions_for_user(request, event, user)

Used to retrieve synced querysets in the orga list and the API list.

eventyay.talk_rules.submission.speaker_profiles_for_user(event, user, submissions=None)
eventyay.talk_rules.submission.submissions_for_user(event, user)

Control Panel (Admin Interface)

Control Views

Documentation for control panel views is available in the implementation section.

Control Signals

eventyay.control.signals.event_dashboard_top = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’

This signal is sent out to include custom HTML in the top part of the the event dashboard. Receivers should return HTML.

As with all plugin signals, the sender keyword argument will contain the event. An additional keyword argument subevent can contain a sub-event.

eventyay.control.signals.event_dashboard_widgets = <eventyay.base.signals.EventPluginSignal object>

This signal is sent out to include widgets in the event dashboard. Receivers should return a list of dictionaries, where each dictionary can have the keys:

  • content (str, containing HTML)

  • display_size (str, one of “full” (whole row), “big” (half a row) or “small” (quarter of a row). May be ignored on small displays, default is “small”)

  • priority (int, used for ordering, higher comes first, default is 1)

  • url (str, optional, if the full widget should be a link)

As with all plugin signals, the sender keyword argument will contain the event. An additional keyword argument subevent can contain a sub-event.

eventyay.control.signals.event_settings_widget = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’

This signal is sent out to include template snippets on the settings page of an event that allows generating a pretix Widget code.

As with all plugin signals, the sender keyword argument will contain the event. A second keyword argument request will contain the request object.

eventyay.control.signals.html_head = <eventyay.base.signals.EventPluginSignal object>

Arguments: request

This signal allows you to put code inside the HTML <head> tag of every page in the backend. You will get the request as the keyword argument request and are expected to return plain HTML.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.html_page_start = <django.dispatch.dispatcher.Signal object>

This signal allows you to put code in the beginning of the main page for every page in the backend. You are expected to return HTML.

The sender keyword argument will contain the request.

eventyay.control.signals.nav_event = <eventyay.base.signals.EventPluginSignal object>

Arguments: request

This signal allows you to add additional views to the admin panel navigation. You will get the request as a keyword argument request. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You can also return a fontawesome icon name with the key icon, it will be respected depending on the type of navigation. You should also return an active key with a boolean set to True, when this product should be marked as active. The request object will have an attribute event.

You can optionally create sub-products to create hierarchical navigation. There are two ways to achieve this: Either you specify a key children on your top navigation product that contains a list of navigation products (as dictionaries), or you specify a parent key with the url value of the designated parent product. The latter method also allows you to register navigation products as a sub-product of existing ones.

If you use this, you should read the documentation on how to deal with URLs in pretix.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.nav_event_settings = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’

This signal is sent out to include tab links on the settings page of an event. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You should also return an active key with a boolean set to True, when this product should be marked as active.

If your linked view should stay in the tab-like context of this page, we recommend that you use pretix.control.views.event.EventSettingsViewMixin for your view and your template inherits from pretixcontrol/event/settings_base.html.

As with all plugin signals, the sender keyword argument will contain the event. A second keyword argument request will contain the request object.

eventyay.control.signals.nav_global = <django.dispatch.dispatcher.Signal object>

Arguments: request

This signal allows you to add additional views to the navigation bar when no event is selected. You will get the request as a keyword argument request. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You can also return a fontawesome icon name with the key icon, it will be respected depending on the type of navigation. You should also return an active key with a boolean set to True, when this product should be marked as active.

You can optionally create sub-products to create hierarchical navigation. There are two ways to achieve this: Either you specify a key children on your top navigation product that contains a list of navigation products (as dictionaries), or you specify a parent key with the url value of the designated parent product. The latter method also allows you to register navigation products as a sub-product of existing ones.

If you use this, you should read the documentation on how to deal with URLs in pretix.

This is no EventPluginSignal, so you do not get the event in the sender argument and you may get the signal regardless of whether your plugin is active.

eventyay.control.signals.nav_organizer = <django.dispatch.dispatcher.Signal object>

Arguments: ‘organizer’, ‘request’

This signal is sent out to include tab links on the detail page of an organizer. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You should also return an active key with a boolean set to True, when this product should be marked as active.

You can optionally create sub-products to create hierarchical navigation. There are two ways to achieve this: Either you specify a key children on your top navigation product that contains a list of navigation products (as dictionaries), or you specify a parent key with the url value of the designated parent product. The latter method also allows you to register navigation products as a sub-product of existing ones.

If your linked view should stay in the tab-like context of this page, we recommend that you use pretix.control.views.organizer.OrganizerDetailViewMixin for your view and your template inherits from pretixcontrol/organizers/base.html.

This is a regular django signal (no pretix event signal). Receivers will be passed the keyword arguments organizer and request.

eventyay.control.signals.nav_topbar = <django.dispatch.dispatcher.Signal object>

Arguments: request

This signal allows you to add additional views to the top navigation bar. You will get the request as a keyword argument request. Receivers are expected to return a list of dictionaries. The dictionaries should contain at least the keys label and url. You can also return a fontawesome icon name with the key icon, it will be respected depending on the type of navigation. If set, on desktops only the icon will be shown. The title property can be used to set the alternative text.

If you use this, you should read the documentation on how to deal with URLs in pretix.

This is no EventPluginSignal, so you do not get the event in the sender argument and you may get the signal regardless of whether your plugin is active.

eventyay.control.signals.oauth_application_registered = <django.dispatch.dispatcher.Signal object>

Arguments: user, application

This signal will be called whenever a user registers a new OAuth application.

eventyay.control.signals.order_info = <eventyay.base.signals.EventPluginSignal object>

Arguments: order, request

This signal is sent out to display additional information on the order detail page

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the argument order and request are available.

eventyay.control.signals.order_position_buttons = <eventyay.base.signals.EventPluginSignal object>

Arguments: order, position, request

This signal is sent out to display additional buttons for a single position of an order.

As with all plugin signals, the sender keyword argument will contain the event. Additionally, the argument order and request are available.

eventyay.control.signals.order_search_filter_q = <django.dispatch.dispatcher.Signal object>

Arguments: query

This signal will be called whenever a free-text order search is performed. You are expected to return one Q object that will be OR-ed with existing search queries. As order search exists on a global level as well, this is not an Event signal and will be called even if your plugin is not active. sender will contain the event if the search is performed within an event, and None otherwise. The search query will be passed as query.

eventyay.control.signals.order_search_forms = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’

This signal allows you to return additional forms that should be rendered in the advanced order search. You are passed request argument and are expected to return an instance of a form class that you bind yourself when appropriate. Your form will be executed as part of the standard validation and rendering cycle and rendered using default bootstrap styles.

You are required to set prefix on your form instance. You are required to implement a filter_qs(queryset) method on your form that returns a new, filtered query set. You are required to implement a filter_to_strings() method on your form that returns a list of strings describing the currently active filters.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.organizer_edit_tabs = <eventyay.base.signals.DeprecatedSignal object>

Arguments: ‘organizer’, ‘request’

Deprecated signal, no longer works. We just keep the definition so old plugins don’t break the installation.

eventyay.control.signals.product_forms = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’, ‘product’

This signal allows you to return additional forms that should be rendered on the product modification page. You are passed request and product arguments and are expected to return an instance of a form class that you bind yourself when appropriate. Your form will be executed as part of the standard validation and rendering cycle and rendered using default bootstrap styles. It is advisable to set a prefix for your form to avoid clashes with other plugins.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.product_formsets = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’, ‘product’

This signal allows you to return additional formsets that should be rendered on the product modification page. You are passed request and product arguments and are expected to return an instance of a formset class that you bind yourself when appropriate. Your formset will be executed as part of the standard validation and rendering cycle and rendered using default bootstrap styles. It is advisable to set a prefix for your formset to avoid clashes with other plugins.

Your formset needs to have two special properties: template with a template that will be included to render the formset and title that will be used as a headline. Your template will be passed a formset variable with your formset.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.quota_detail_html = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘quota’

This signal allows you to append HTML to a Quota’s detail view. You receive the quota as argument in the quota keyword argument.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.subevent_forms = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘request’, ‘subevent’, ‘copy_from’

This signal allows you to return additional forms that should be rendered on the subevent creation or modification page. You are passed request and subevent arguments and are expected to return an instance of a form class that you bind yourself when appropriate. Your form will be executed as part of the standard validation and rendering cycle and rendered using default bootstrap styles. It is advisable to set a prefix for your form to avoid clashes with other plugins.

subevent can be None during creation. Before save() is called, a subevent property of your form instance will automatically being set to the subevent that has just been created. During creation, copy_from can be a subevent that is being copied from.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.user_dashboard_widgets = <django.dispatch.dispatcher.Signal object>

Arguments: ‘user’

This signal is sent out to include widgets in the personal user dashboard. Receivers should return a list of dictionaries, where each dictionary can have the keys:

  • content (str, containing HTML)

  • display_size (str, one of “full” (whole row), “big” (half a row) or “small” (quarter of a row). May be ignored on small displays, default is “small”)

  • priority (int, used for ordering, higher comes first, default is 1)

  • url (str, optional, if the full widget should be a link)

This is a regular django signal (no pretix event signal).

eventyay.control.signals.voucher_form_class = <eventyay.base.signals.EventPluginSignal object>

Arguments: cls

This signal allows you to replace the form class that is used for modifying vouchers. You will receive the default form class (or the class set by a previous plugin) in the cls argument so that you can inherit from it.

Note that this is also called for the voucher bulk creation form, which is executed in an asynchronous context. For the bulk creation form, save() is not called. Instead, you can implement post_bulk_save(saved_vouchers) which may be called multiple times for every batch persisted to the database.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.voucher_form_html = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘form’

This signal allows you to add additional HTML to the form that is used for modifying vouchers. You receive the form object in the form keyword argument.

As with all plugin signals, the sender keyword argument will contain the event.

eventyay.control.signals.voucher_form_validation = <eventyay.base.signals.EventPluginSignal object>

Arguments: ‘form’

This signal allows you to add additional validation to the form that is used for creating and modifying vouchers. You will receive the form instance in the form argument and the current data state in the data argument.

As with all plugin signals, the sender keyword argument will contain the event.

Control Permissions

class eventyay.control.permissions.AdministratorPermissionRequiredMixin

Bases: object

This mixin is equivalent to the administrator_permission_required view decorator but is in a form suitable for class-based views.

classmethod as_view(**initkwargs)
class eventyay.control.permissions.EventPermissionRequiredMixin

Bases: object

This mixin is equivalent to the event_permission_required view decorator but is in a form suitable for class-based views.

classmethod as_view(**initkwargs)
permission = ''
class eventyay.control.permissions.OrganizerPermissionRequiredMixin

Bases: object

This mixin is equivalent to the organizer_permission_required view decorator but is in a form suitable for class-based views.

classmethod as_view(**initkwargs)
permission = ''
class eventyay.control.permissions.StaffMemberRequiredMixin

Bases: object

This mixin is equivalent to the staff_memer_required view decorator but is in a form suitable for class-based views.

classmethod as_view(**initkwargs)
eventyay.control.permissions.administrator_permission_required()

This view decorator rejects all requests with a 403 response which are not from users with a current staff member session.

eventyay.control.permissions.current_url(request)
eventyay.control.permissions.event_permission_required(permission)

This view decorator rejects all requests with a 403 response which are not from users having the given permission for the event the request is associated with.

eventyay.control.permissions.organizer_permission_required(permission)

This view decorator rejects all requests with a 403 response which are not from users having the given permission for the event the request is associated with.

eventyay.control.permissions.staff_member_required()

This view decorator rejects all requests with a 403 response which are not staff members (but do not need to have an active session).

Navigation

eventyay.control.navigation.get_admin_navigation(request)
eventyay.control.navigation.get_event_navigation(request: HttpRequest)
eventyay.control.navigation.get_global_navigation(request)
eventyay.control.navigation.get_organizer_navigation(request)
eventyay.control.navigation.merge_in(nav, newnav)

Log Display

eventyay.control.logdisplay.eventyaycontrol_logentry_display(sender: Event, logentry: LogEntry, **kwargs)
eventyay.common.log_display.default_activitylog_display(sender: Event, activitylog: LogEntry, **kwargs)

Common Utilities

Common Signals

class eventyay.common.signals.EventPluginSignal(use_caching=False)

Bases: Signal

An extension to Django’s built-in signals.

It sends out it’s events only to receivers which belong to plugins that are enabled for the given Event.

get_live_receivers(sender)
send(sender: Event, **named) list[tuple[Callable, Any]]

Send signal from sender to all connected receivers that belong to plugins enabled for the given Event.

sender is required to be an instance of pretalx.event.models.Event.

send_chained(sender: Event, chain_kwarg_name, **named) list[tuple[Callable, Any]]

Send signal from sender to all connected receivers. The return value of the first receiver will be used as the keyword argument specified by chain_kwarg_name in the input to the second receiver and so on. The return value of the last receiver is returned by this method.

sender is required to be an instance of pretalx.event.models.Event.

send_robust(sender: Event, **named) list[tuple[Callable, Any]]

Send signal from sender to all connected receivers that belong to plugins enabled for the given Event. If a receiver raises an Exception, it is returned as the response instead of propagating.

sender is required to be an instance of pretalx.event.models.Event.

eventyay.common.signals.activitylog_display = <eventyay.common.signals.EventPluginSignal object>

To display an instance of the ActivityLog model to a human user, pretalx.common.signals.activitylog_display will be sent out with an activitylog argument.

The first received response that is not None will be used to display the log entry to the user. The receivers are expected to return plain (lazy) text.

As with all event plugin signals, the sender keyword argument will contain the event.

eventyay.common.signals.activitylog_object_link = <eventyay.common.signals.EventPluginSignal object>

To display the relationship of an instance of the ActivityLog model to another model to a human user, pretalx.common.signals.activitylog_object_link will be sent out with an activitylog argument.

The first received response that is not None will be used to display the related object to the user. The receivers are expected to return an HTML link as a string. Make sure that any user content in the HTML code you return is properly escaped!

As with all event-plugin signals, the sender keyword argument will contain the event.

eventyay.common.signals.auth_html = <django.dispatch.dispatcher.Signal object>

Responses to the pretalx.common.signals.auth_html signal will be displayed as additional content on any sign-up or login page, for example a login link to your custom authentication method (see Writing an authentication plugin).

As with all event-plugin signals, the sender keyword argument will contain the event if an event-specific login view is used (for the generic /orga/ login page, the sender is None).

Additionally, the signal is passed the request keyword argument, and an optional next_url keyword argument. If next_url is not empty, you should direct the user to the given link once they have completed the authentication.

eventyay.common.signals.minimum_interval(minutes_after_success, minutes_after_error=0, minutes_running_timeout=30)

Use this decorator on receivers of the periodic_task signal to ensure the receiver function has at least minutes_after_success minutes between two successful runs and at least minutes_after_error minutes between two failed runs. You also get a simple locking mechanism making sure the function is not called a second time while it is running, unless minutes_running_timeout have passed. This locking is naive and should not be completely relied upon.

eventyay.common.signals.periodic_task = <django.dispatch.dispatcher.Signal object>

This is a regular django signal (no pretalx event signal) that we send out every time the periodic task cronjob runs. This interval is not sharply defined, it can be everything between a minute and a day. The actions you perform should be idempotent, meaning it should not make a difference if this is sent out more often than expected.

eventyay.common.signals.profile_bottom_html = <django.dispatch.dispatcher.Signal object>

To display additional HTML content on the user profile/settings pages.

eventyay.common.signals.register_locales = <django.dispatch.dispatcher.Signal object>

To provide additional languages via plugins, you will have to provide some settings in the pretalx settings file, and return a list of the registered locales as response to this plugin signal. Every entry should be a tuple of two strings, the first being the locale code, the second being the display name of the locale. (Though pretalx will also accept just a locale code.)

You should always return your locale when no sender keyword argument is given to make your locale available to the makemessages command. Otherwise, check that your plugin is enabled in the current event context if your locale should be scoped to events with your plugin activated.

eventyay.common.signals.register_my_data_exporters = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to get all known data exporters. Receivers should return a subclass of pretalx.common.exporter.BaseExporter

As with all event plugin signals, the sender keyword argument will contain the event.

Common Tasks

Common Exceptions

exception eventyay.common.exceptions.AuthenticationFailedError

Bases: Exception

class eventyay.common.exceptions.PretalxAdminEmailHandler(include_html=False, email_backend=None, reporter_class=None)

Bases: AdminEmailHandler

emit(record)

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

reporter_class

alias of PretalxExceptionReporter

class eventyay.common.exceptions.PretalxCeleryExceptionReporter(*args, task_id=False, celery_args=None, **kwargs)

Bases: PretalxExceptionReporter

get_extra_intro()
get_tldr()
class eventyay.common.exceptions.PretalxExceptionReporter(request, exc_type, exc_value, tb, is_email=False)

Bases: ExceptionReporter

get_extra_intro()
get_tldr()
get_traceback_text()

Return plain text version of debug 500 HTTP error page.

user
exception eventyay.common.exceptions.SendMailException

Bases: Exception

exception eventyay.common.exceptions.SubmissionError

Bases: Exception

exception eventyay.common.exceptions.VideoIntegrationError

Bases: Exception

Text Processing

Text processing utilities are located in eventyay.common.text package.

Mail Handling

class eventyay.common.mail.CustomSMTPBackend(host=None, port=None, username=None, password=None, use_tls=None, fail_silently=False, use_ssl=None, timeout=None, ssl_keyfile=None, ssl_certfile=None, **kwargs)

Bases: EmailBackend

test(from_addr)
class eventyay.common.mail.TolerantDict

Bases: dict

eventyay.mail.signals.queuedmail_post_send = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out after a QueuedMail has been sent. Return value of receivers will be ignored. Receivers must not alter any data of the QueuedMail instance.

As with all event-plugin signals, the sender keyword argument will contain the event. Additionally, the mail keyword argument contains the QueuedMail instance itself.

eventyay.mail.signals.queuedmail_pre_send = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out before a QueuedMail will been sent. Receivers may set the sent timestamp to skip sending via the regular email backend. The email text and HTML is rendered after this signal has been processed, so you can also alter the email’s content here. Any exceptions raised by receivers will be ignored.

Please note that this signal is only sent for QueuedMail instances that are saved/persisted in the database and that belong to an event. This means that you will not receive this signals for emails like password resets or draft reminders, or anything else that pretalx thinks should be private between the sender and the recipient.

As with all event-plugin signals, the sender keyword argument will contain the event. Additionally, the mail keyword argument contains the QueuedMail instance itself.

eventyay.mail.signals.request_pre_send = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out before an email sending action is taken via the web interface – either bulk email or individual emails. The signal is not called when emails are just placed in the outbox without being sent.

Receivers may raise a pretalx.common.exceptions.SendMailException in order to stop emails from being sent. The exception message (if any) will be shown to the requesting user.

As with all event-plugin signals, the sender keyword argument will contain the event. Additionally, the request keyword argument contains the request that triggered the request to be sent.

eventyay.mail.signals.talk_register_mail_placeholders = <eventyay.common.signals.EventPluginSignal object>

This signal is sent out to get all known email text placeholders. Receivers should return an instance of a subclass of pretalx.mail.placeholder.BaseMailTextPlaceholder or a list of these.

As with all event-plugin signals, the sender keyword argument will contain the event.

Multi-domain Support

class eventyay.multidomain.models.KnownDomain(domainname, organizer, event)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

delete(*args, **kwargs)
domainname

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

event

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

event_id
objects = <django.db.models.manager.Manager object>
organizer

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

organizer_id
save(*args, **kwargs)

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

eventyay.multidomain.urlreverse.build_absolute_uri(obj, urlname, kwargs=None)
eventyay.multidomain.urlreverse.build_join_video_url(event: Event, order: Order) str
eventyay.multidomain.urlreverse.eventreverse(obj, name, kwargs=None)

Works similar to django.core.urlresolvers.reverse but takes into account that some organizers or events might have their own (sub)domain instead of a subpath.

Non-keyword arguments are not supported as we want do discourage using them for better readability.

Parameters:
  • obj – An Event or Organizer object

  • name (str) – The name of the URL route

  • kwargs – A dictionary of additional keyword arguments that should be used. You do not need to provide the organizer or event slug here, it will be added automatically as needed.

Returns:

An absolute URL (including scheme and host) as a string

eventyay.multidomain.urlreverse.generate_video_token_url(event: Event, customer_code: str, position: OrderPosition | None) str
eventyay.multidomain.urlreverse.generate_video_token_url_from_order(event: Event, order: Order, position: OrderPosition | None) str
eventyay.multidomain.urlreverse.get_event_domain(event, fallback=False, return_info=False)
eventyay.multidomain.urlreverse.get_organizer_domain(organizer)
eventyay.multidomain.urlreverse.mainreverse(name, kwargs=None)

Works similar to django.core.urlresolvers.reverse but uses the maindomain URLconf even if on a subpath.

Non-keyword arguments are not supported as we want do discourage using them for better readability.

Parameters:
  • name (str) – The name of the URL route

  • kwargs – A dictionary of additional keyword arguments that should be used. You do not need to provide the organizer or event slug here, it will be added automatically as needed.

Returns:

An absolute URL (including scheme and host) as a string

API Module

API Authentication

API authentication modules are located in eventyay.api.auth package.

API Middleware

class eventyay.api.middleware.ApiScopeMiddleware(get_response)

Bases: object

class eventyay.api.middleware.IdempotencyMiddleware(get_response)

Bases: object

OAuth

class eventyay.api.oauth.Validator

Bases: OAuth2Validator

save_authorization_code(client_id, code, request, *args, **kwargs)

Persist the authorization_code.

The code should at minimum be stored with:
  • the client_id (client_id)

  • the redirect URI used (request.redirect_uri)

  • a resource owner / user (request.user)

  • the authorized scopes (request.scopes)

To support PKCE, you MUST associate the code with:
  • Code Challenge (request.code_challenge) and

  • Code Challenge Method (request.code_challenge_method)

To support OIDC, you MUST associate the code with:
  • nonce, if present (code["nonce"])

The code argument is actually a dictionary, containing at least a code key with the actual authorization code:

{'code': 'sdf345jsdf0934f'}

It may also have a claims parameter which, when present, will be a dict deserialized from JSON as described at http://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter This value should be saved in this method and used again in .validate_code.

Parameters:
  • client_id – Unicode client identifier.

  • code – A dict of the authorization code grant and, optionally, state.

  • request (oauthlib.common.Request) – OAuthlib request.

Method is used by:
  • Authorization Code Grant

validate_code(client_id, code, client, request, *args, **kwargs)

Verify that the authorization_code is valid and assigned to the given client.

Before returning true, set the following based on the information stored with the code in ‘save_authorization_code’:

  • request.user

  • request.scopes

  • request.claims (if given)

OBS! The request.user attribute should be set to the resource owner associated with this authorization code. Similarly request.scopes must also be set.

The request.claims property, if it was given, should assigned a dict.

If PKCE is enabled (see ‘is_pkce_required’ and ‘save_authorization_code’) you MUST set the following based on the information stored:

  • request.code_challenge

  • request.code_challenge_method

Parameters:
  • client_id – Unicode client identifier.

  • code – Unicode authorization code.

  • client – Client object set by you, see .authenticate_client.

  • request (oauthlib.common.Request) – OAuthlib request.

Return type:

True or False

Method is used by:
  • Authorization Code Grant

Webhooks

class eventyay.api.webhooks.ParametrizedEventWebhookEvent(action_type, verbose_name)

Bases: WebhookEvent

property action_type

The action_type string that this notification handles, for example "pretix.event.order.paid". Only one notification type should be registered per action type.

build_payload(logentry: LogEntry)

This is the main function that you should override. It is supposed to turn a log entry object into a dictionary that can be used as the webhook payload.

property verbose_name

A human-readable name of this notification type.

class eventyay.api.webhooks.ParametrizedOrderPositionWebhookEvent(action_type, verbose_name)

Bases: ParametrizedOrderWebhookEvent

build_payload(logentry: LogEntry)

This is the main function that you should override. It is supposed to turn a log entry object into a dictionary that can be used as the webhook payload.

class eventyay.api.webhooks.ParametrizedOrderWebhookEvent(action_type, verbose_name)

Bases: WebhookEvent

property action_type

The action_type string that this notification handles, for example "pretix.event.order.paid". Only one notification type should be registered per action type.

build_payload(logentry: LogEntry)

This is the main function that you should override. It is supposed to turn a log entry object into a dictionary that can be used as the webhook payload.

property verbose_name

A human-readable name of this notification type.

class eventyay.api.webhooks.ParametrizedSubEventWebhookEvent(action_type, verbose_name)

Bases: WebhookEvent

property action_type

The action_type string that this notification handles, for example "pretix.event.order.paid". Only one notification type should be registered per action type.

build_payload(logentry: LogEntry)

This is the main function that you should override. It is supposed to turn a log entry object into a dictionary that can be used as the webhook payload.

property verbose_name

A human-readable name of this notification type.

class eventyay.api.webhooks.WebhookEvent

Bases: object

property action_type: str

The action_type string that this notification handles, for example "pretix.event.order.paid". Only one notification type should be registered per action type.

build_payload(logentry: LogEntry) dict

This is the main function that you should override. It is supposed to turn a log entry object into a dictionary that can be used as the webhook payload.

property verbose_name: str

A human-readable name of this notification type.

eventyay.api.webhooks.get_all_webhook_events()
eventyay.api.webhooks.register_default_webhook_events(sender, **kwargs)

API Serializers

class eventyay.api.serializers.event.CloneEventSerializer(*args, **kwargs)

Bases: EventSerializer

class eventyay.api.serializers.event.DeviceEventSettingsSerializer(*args, **kwargs)

Bases: EventSettingsSerializer

default_fields = ['locales', 'locale', 'last_order_modification_date', 'show_quota_left', 'max_products_per_order', 'attendee_names_asked', 'attendee_names_required', 'attendee_emails_asked', 'attendee_emails_required', 'attendee_addresses_asked', 'attendee_addresses_required', 'attendee_company_asked', 'attendee_company_required', 'ticket_download', 'ticket_download_addons', 'ticket_download_nonadm', 'ticket_download_pending', 'invoice_address_asked', 'invoice_address_required', 'invoice_address_vatid', 'invoice_address_company_required', 'invoice_address_beneficiary', 'invoice_address_custom_field', 'invoice_name_required', 'invoice_address_not_asked_free', 'invoice_address_from_name', 'invoice_address_from', 'invoice_address_from_zipcode', 'invoice_address_from_city', 'invoice_address_from_country', 'invoice_address_from_tax_id', 'invoice_address_from_vat_id']
class eventyay.api.serializers.event.EventSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('name', 'slug', 'live', 'testmode', 'currency', 'date_from', 'date_to', 'date_admission', 'is_public', 'presale_start', 'presale_end', 'location', 'geo_lat', 'geo_lon', 'has_subevents', 'meta_data', 'seating_plan', 'plugins', 'seat_category_mapping', 'timezone', 'product_meta_properties', 'valid_keys', 'sales_channels')
model

alias of Event

ignored_meta_properties
meta_properties
product_meta_props
update(instance, validated_data)
validate(data)
validate_has_subevents(value)
validate_live(value)
validate_meta_data(value)
validate_plugins(value)
validate_seat_category_mapping(value)
validate_seating_plan(value)
validate_slug(value)
class eventyay.api.serializers.event.EventSettingsSerializer(*args, **kwargs)

Bases: SettingsSerializer

default_fields = ['imprint_url', 'checkout_email_helptext', 'presale_has_ended_text', 'voucher_explanation_text', 'checkout_success_text', 'banner_text', 'banner_text_bottom', 'show_dates_on_frontpage', 'show_date_to', 'show_times', 'show_products_outside_presale_period', 'display_net_prices', 'presale_start_show_date', 'locales', 'locale', 'region', 'allow_modifications', 'last_order_modification_date', 'allow_modifications_after_checkin', 'show_quota_left', 'waiting_list_enabled', 'waiting_list_hours', 'waiting_list_auto', 'waiting_list_names_asked', 'waiting_list_names_required', 'waiting_list_phones_asked', 'waiting_list_phones_required', 'waiting_list_phones_explanation_text', 'max_products_per_order', 'reservation_time', 'contact_mail', 'show_variations_expanded', 'hide_sold_out', 'meta_noindex', 'redirect_to_checkout_directly', 'frontpage_subevent_ordering', 'event_list_type', 'event_list_available_only', 'frontpage_text', 'event_info_text', 'attendee_names_asked', 'attendee_names_required', 'attendee_emails_asked', 'attendee_emails_required', 'attendee_addresses_asked', 'attendee_addresses_required', 'attendee_company_asked', 'attendee_company_required', 'attendee_data_explanation_text', 'confirm_texts', 'order_email_asked', 'order_email_required', 'order_email_asked_twice', 'order_phone_asked', 'order_phone_required', 'checkout_phone_helptext', 'payment_term_mode', 'payment_term_days', 'payment_term_weekdays', 'payment_term_minutes', 'payment_term_last', 'payment_term_expire_automatically', 'payment_term_accept_late', 'payment_explanation', 'payment_pending_hidden', 'ticket_download', 'ticket_download_date', 'ticket_download_addons', 'ticket_download_nonadm', 'ticket_download_pending', 'ticket_download_require_validated_email', 'require_registered_account_for_tickets', 'mail_prefix', 'mail_from', 'mail_from_name', 'mail_attach_ical', 'mail_attach_tickets', 'invoice_address_asked', 'invoice_address_required', 'invoice_address_vatid', 'invoice_address_company_required', 'invoice_address_beneficiary', 'invoice_address_custom_field', 'invoice_name_required', 'invoice_address_not_asked_free', 'invoice_show_payments', 'invoice_reissue_after_modify', 'invoice_include_free', 'invoice_generate', 'invoice_numbers_consecutive', 'invoice_numbers_prefix', 'invoice_numbers_prefix_cancellations', 'invoice_numbers_counter_length', 'invoice_attendee_name', 'invoice_include_expire_date', 'invoice_address_explanation_text', 'invoice_email_attachment', 'invoice_address_from_name', 'invoice_address_from', 'invoice_address_from_zipcode', 'invoice_address_from_city', 'invoice_address_from_country', 'invoice_address_from_tax_id', 'invoice_address_from_vat_id', 'invoice_introductory_text', 'invoice_additional_text', 'invoice_footer_text', 'invoice_eu_currencies', 'invoice_logo_image', 'cancel_allow_user', 'cancel_allow_user_until', 'cancel_allow_user_paid', 'cancel_allow_user_paid_until', 'cancel_allow_user_paid_keep', 'cancel_allow_user_paid_keep_fees', 'cancel_allow_user_paid_keep_percentage', 'cancel_allow_user_paid_adjust_fees', 'cancel_allow_user_paid_adjust_fees_explanation', 'cancel_allow_user_paid_adjust_fees_step', 'cancel_allow_user_paid_refund_as_giftcard', 'cancel_allow_user_paid_require_approval', 'change_allow_user_variation', 'change_allow_user_until', 'change_allow_user_price', 'primary_color', 'theme_color_success', 'theme_color_danger', 'theme_color_background', 'theme_round_borders', 'hover_button_color', 'primary_font', 'logo_image', 'logo_image_large', 'event_logo_image', 'logo_show_title', 'og_image']
get_new_filename(name: str) str
validate(data)
class eventyay.api.serializers.event.MetaDataField(*args, **kwargs)

Bases: Field

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(value)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.event.MetaPropertyField(*args, **kwargs)

Bases: Field

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(value)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.event.PluginsField(*args, **kwargs)

Bases: Field

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(obj)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.event.SeatCategoryMappingField(*args, **kwargs)

Bases: Field

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(value)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.event.SubEventProductSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('product', 'price', 'disabled')
model

alias of SubEventProduct

class eventyay.api.serializers.event.SubEventProductVariationSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('variation', 'price', 'disabled')
model

alias of SubEventProductVariation

class eventyay.api.serializers.event.SubEventSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'name', 'date_from', 'date_to', 'active', 'date_admission', 'presale_start', 'presale_end', 'location', 'geo_lat', 'geo_lon', 'event', 'is_public', 'frontpage_text', 'seating_plan', 'product_price_overrides', 'variation_price_overrides', 'meta_data', 'seat_category_mapping', 'last_modified')
model

alias of SubEvent

ignored_meta_properties
meta_properties
update(instance, validated_data)
validate(data)
validate_meta_data(value)
validate_product_price_overrides(data)
validate_seat_category_mapping(value)
validate_seating_plan(value)
validate_variation_price_overrides(data)
class eventyay.api.serializers.event.TaxRuleSerializer(*args, **kwargs)

Bases: CountryFieldMixin, I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'name', 'rate', 'price_includes_tax', 'eu_reverse_charge', 'home_country')
model

alias of TaxRule

class eventyay.api.serializers.event.TimeZoneField(*args, **kwargs)

Bases: ChoiceField

get_attribute(instance)

Given the outgoing object instance, return the primitive value that should be used for this field.

class eventyay.api.serializers.event.ValidKeysField(*args, **kwargs)

Bases: Field

to_representation(value)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.AnswerCreateSerializer(*args, **kwargs)

Bases: AnswerSerializer

class eventyay.api.serializers.order.AnswerQuestionIdentifierField(*args, **kwargs)

Bases: Field

to_representation(instance: QuestionAnswer)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.AnswerQuestionOptionsField(*args, **kwargs)

Bases: Field

to_representation(instance: QuestionAnswer)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.AnswerQuestionOptionsIdentifierField(*args, **kwargs)

Bases: Field

to_representation(instance: QuestionAnswer)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.AnswerSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('question', 'answer', 'question_identifier', 'options', 'option_identifiers')
model

alias of QuestionAnswer

to_representation(instance)

Object instance -> Dict of primitive datatypes.

validate(data)
validate_question(q)
class eventyay.api.serializers.order.AttendeeNameField(*args, **kwargs)

Bases: Field

to_representation(instance: OrderPosition)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.AttendeeNamePartsField(*args, **kwargs)

Bases: Field

to_representation(instance: OrderPosition)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.CheckinListOrderPositionSerializer(*args, **kwargs)

Bases: OrderPositionSerializer

class Meta

Bases: object

fields = ('id', 'order', 'positionid', 'product', 'variation', 'price', 'attendee_name', 'attendee_name_parts', 'company', 'street', 'zipcode', 'city', 'country', 'state', 'attendee_email', 'voucher', 'tax_rate', 'tax_value', 'secret', 'addon_to', 'subevent', 'checkins', 'downloads', 'answers', 'tax_rule', 'pseudonymization_id', 'pdf_data', 'seat', 'require_attention', 'order__status')
model

alias of OrderPosition

class eventyay.api.serializers.order.CheckinSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'datetime', 'list', 'auto_checked_in', 'type')
model

alias of Checkin

class eventyay.api.serializers.order.CompatibleCountryField(*args, **kwargs)

Bases: Field

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(instance: InvoiceAddress)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.CompatibleJSONField(*args, **kwargs)

Bases: JSONField

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(value)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.CountryField(*args, **kwargs)

Bases: Field

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(src)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.InlineInvoiceLineSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('position', 'description', 'product', 'variation', 'attendee_name', 'event_date_from', 'event_date_to', 'gross_value', 'tax_value', 'tax_rate', 'tax_name')
model

alias of InvoiceLine

class eventyay.api.serializers.order.InlineSeatSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'name', 'seat_guid')
model

alias of Seat

class eventyay.api.serializers.order.InvoiceAddressSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('last_modified', 'is_business', 'company', 'name', 'name_parts', 'street', 'zipcode', 'city', 'country', 'state', 'vat_id', 'vat_id_validated', 'internal_reference')
model

alias of InvoiceAddress

read_only_fields = ('last_modified',)
validate(data)
class eventyay.api.serializers.order.InvoiceSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('order', 'number', 'is_cancellation', 'invoice_from', 'invoice_from_name', 'invoice_from_zipcode', 'invoice_from_city', 'invoice_from_country', 'invoice_from_tax_id', 'invoice_from_vat_id', 'invoice_to', 'invoice_to_company', 'invoice_to_name', 'invoice_to_street', 'invoice_to_zipcode', 'invoice_to_city', 'invoice_to_state', 'invoice_to_country', 'invoice_to_vat_id', 'invoice_to_beneficiary', 'custom_field', 'date', 'refers', 'locale', 'introductory_text', 'additional_text', 'payment_provider_text', 'footer_text', 'lines', 'foreign_currency_display', 'foreign_currency_rate', 'foreign_currency_rate_date', 'internal_reference')
model

alias of Invoice

class eventyay.api.serializers.order.LinePositionField(*args, **kwargs)

Bases: IntegerField

Internally, the position field is stored starting at 0, but for the API, starting at 1 makes it more consistent with other models

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(value)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.OrderCreateSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('code', 'status', 'testmode', 'email', 'phone', 'locale', 'payment_provider', 'fees', 'comment', 'sales_channel', 'invoice_address', 'positions', 'checkin_attention', 'payment_info', 'payment_date', 'consume_carts', 'force', 'send_email', 'simulate')
model

alias of Order

validate_code(code)
validate_payment_provider(pp)
validate_positions(data)
validate_sales_channel(channel)
validate_testmode(testmode)
class eventyay.api.serializers.order.OrderDownloadsField(*args, **kwargs)

Bases: Field

to_representation(instance: Order)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.OrderFeeCreateSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('fee_type', 'value', 'description', 'internal_type', 'tax_rule', '_treat_value_as_percentage', '_split_taxes_like_products')
model

alias of OrderFee

validate_tax_rule(tr)
class eventyay.api.serializers.order.OrderFeeSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'fee_type', 'value', 'description', 'internal_type', 'tax_rate', 'tax_value', 'tax_rule', 'canceled')
model

alias of OrderFee

class eventyay.api.serializers.order.OrderPaymentCreateSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('state', 'amount', 'payment_date', 'provider', 'info')
model

alias of OrderPayment

class eventyay.api.serializers.order.OrderPaymentDateField(*args, **kwargs)

Bases: DateField

to_representation(instance: Order)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.OrderPaymentSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('local_id', 'state', 'amount', 'created', 'payment_date', 'provider', 'payment_url', 'details')
model

alias of OrderPayment

class eventyay.api.serializers.order.OrderPaymentTypeField(*args, **kwargs)

Bases: Field

to_representation(instance: Order)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.OrderPositionCreateSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('positionid', 'product', 'variation', 'price', 'attendee_name', 'attendee_name_parts', 'attendee_email', 'company', 'street', 'zipcode', 'city', 'country', 'state', 'secret', 'addon_to', 'subevent', 'answers', 'seat', 'voucher')
model

alias of OrderPosition

validate(data)
validate_product(product)
validate_secret(secret)
validate_subevent(subevent)
class eventyay.api.serializers.order.OrderPositionSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'order', 'positionid', 'product', 'variation', 'price', 'attendee_name', 'attendee_name_parts', 'job_title', 'company', 'street', 'zipcode', 'city', 'country', 'state', 'attendee_email', 'voucher', 'tax_rate', 'tax_value', 'secret', 'addon_to', 'subevent', 'checkins', 'downloads', 'answers', 'tax_rule', 'pseudonymization_id', 'pdf_data', 'seat', 'canceled')
model

alias of OrderPosition

read_only_fields = ('id', 'order', 'positionid', 'product', 'variation', 'price', 'voucher', 'tax_rate', 'tax_value', 'secret', 'addon_to', 'subevent', 'checkins', 'downloads', 'answers', 'tax_rule', 'pseudonymization_id', 'pdf_data', 'seat', 'canceled')
update(instance, validated_data)
validate(data)
class eventyay.api.serializers.order.OrderRefundCreateSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('state', 'source', 'amount', 'payment', 'execution_date', 'provider', 'info', 'comment')
model

alias of OrderRefund

class eventyay.api.serializers.order.OrderRefundSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('local_id', 'state', 'source', 'amount', 'payment', 'created', 'execution_date', 'comment', 'provider')
model

alias of OrderRefund

class eventyay.api.serializers.order.OrderSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('code', 'status', 'testmode', 'secret', 'email', 'phone', 'locale', 'datetime', 'expires', 'payment_date', 'payment_provider', 'fees', 'total', 'comment', 'invoice_address', 'positions', 'downloads', 'checkin_attention', 'last_modified', 'payments', 'refunds', 'require_approval', 'sales_channel', 'url')
model

alias of Order

read_only_fields = ('code', 'status', 'testmode', 'secret', 'datetime', 'expires', 'payment_date', 'payment_provider', 'fees', 'total', 'positions', 'downloadslast_modified', 'payments', 'refunds', 'require_approval', 'sales_channel')
update(instance, validated_data)
validate_locale(l)
class eventyay.api.serializers.order.OrderURLField(*args, **kwargs)

Bases: URLField

to_representation(instance: Order)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.PaymentDetailsField(*args, **kwargs)

Bases: Field

to_representation(value: OrderPayment)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.PaymentURLField(*args, **kwargs)

Bases: URLField

to_representation(instance: OrderPayment)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.PdfDataSerializer(*args, **kwargs)

Bases: Field

to_representation(instance: OrderPosition)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.PositionDownloadsField(*args, **kwargs)

Bases: Field

to_representation(instance: OrderPosition)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.PriceCalcSerializer(*args, **kwargs)

Bases: Serializer

class eventyay.api.serializers.order.RequireAttentionField(*args, **kwargs)

Bases: Field

to_representation(instance: OrderPosition)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.order.RevokedTicketSecretSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'secret', 'created')
model

alias of RevokedTicketSecret

class eventyay.api.serializers.order.SimulatedAnswerSerializer(*args, **kwargs)

Bases: AnswerSerializer

class eventyay.api.serializers.order.SimulatedOrderPositionSerializer(*args, **kwargs)

Bases: OrderPositionSerializer

class eventyay.api.serializers.order.SimulatedOrderSerializer(*args, **kwargs)

Bases: OrderSerializer

class eventyay.api.serializers.order.WrappedList(data)

Bases: object

all()
class eventyay.api.serializers.order.WrappedModel(model)

Bases: object

delete(*args, **kwargs)
save(*args, **kwargs)
class eventyay.api.serializers.product.InlineProductAddOnSerializer(*args, **kwargs)

Bases: ModelSerializer

class Meta

Bases: object

fields = ('addon_category', 'min_count', 'max_count', 'position', 'price_included', 'multi_allowed')
model

alias of ProductAddOn

class eventyay.api.serializers.product.InlineProductBundleSerializer(*args, **kwargs)

Bases: ModelSerializer

class Meta

Bases: object

fields = ('bundled_product', 'bundled_variation', 'count', 'designated_price')
model

alias of ProductBundle

class eventyay.api.serializers.product.InlineProductVariationSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'value', 'active', 'description', 'position', 'default_price', 'price', 'original_price')
model

alias of ProductVariation

class eventyay.api.serializers.product.InlineQuestionOptionSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'identifier', 'answer', 'position')
model

alias of QuestionOption

class eventyay.api.serializers.product.LegacyDependencyValueField(*args, **kwargs)

Bases: CharField

to_internal_value(data)

Transform the incoming primitive data into a native value.

to_representation(obj)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.product.ProductAddOnSerializer(*args, **kwargs)

Bases: ModelSerializer

class Meta

Bases: object

fields = ('id', 'addon_category', 'min_count', 'max_count', 'position', 'price_included', 'multi_allowed')
model

alias of ProductAddOn

validate(data)
validate_addon_category(value)
validate_max_count(value)
validate_min_count(value)
class eventyay.api.serializers.product.ProductBundleSerializer(*args, **kwargs)

Bases: ModelSerializer

class Meta

Bases: object

fields = ('id', 'bundled_product', 'bundled_variation', 'count', 'designated_price')
model

alias of ProductBundle

validate(data)
class eventyay.api.serializers.product.ProductCategorySerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'name', 'internal_name', 'description', 'position', 'is_addon')
model

alias of ProductCategory

class eventyay.api.serializers.product.ProductSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'category', 'name', 'internal_name', 'active', 'sales_channels', 'description', 'default_price', 'free_price', 'tax_rate', 'tax_rule', 'admission', 'position', 'picture', 'available_from', 'available_until', 'require_voucher', 'hide_without_voucher', 'allow_cancel', 'require_bundling', 'min_per_order', 'max_per_order', 'checkin_attention', 'has_variations', 'variations', 'addons', 'bundles', 'original_price', 'require_approval', 'generate_tickets', 'show_quota_left', 'hidden_if_available', 'allow_waitinglist', 'issue_giftcard', 'meta_data')
model

alias of Product

read_only_fields = ('has_variations',)
product_meta_properties
update(instance, validated_data)
validate(data)
validate_addons(value)
validate_bundles(value)
validate_category(value)
validate_meta_data(value)
validate_tax_rule(value)
class eventyay.api.serializers.product.ProductTaxRateField(*args, **kwargs)

Bases: Field

to_representation(i)

Transform the outgoing native value into primitive data.

class eventyay.api.serializers.product.ProductVariationSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'value', 'active', 'description', 'position', 'default_price', 'price', 'original_price')
model

alias of ProductVariation

class eventyay.api.serializers.product.QuestionOptionSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'identifier', 'answer', 'position')
model

alias of QuestionOption

validate_identifier(value)
class eventyay.api.serializers.product.QuestionSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'question', 'type', 'required', 'products', 'options', 'position', 'ask_during_checkin', 'identifier', 'dependency_question', 'dependency_values', 'hidden', 'dependency_value', 'print_on_invoice', 'help_text', 'valid_number_min', 'valid_number_max', 'valid_date_min', 'valid_date_max', 'valid_datetime_min', 'valid_datetime_max')
model

alias of Question

validate(data)
validate_dependency_question(value)
validate_identifier(value)
validate_options(value)
class eventyay.api.serializers.product.QuotaSerializer(*args, **kwargs)

Bases: I18nAwareModelSerializer

class Meta

Bases: object

fields = ('id', 'name', 'size', 'products', 'variations', 'subevent', 'closed', 'close_when_sold_out', 'release_after_exit')
model

alias of Quota

validate(data)

Event Management

Event Services

eventyay.event.services.clean_cached_files(sender, **kwargs)
eventyay.event.services.periodic_event_services(sender, **kwargs)
eventyay.event.stages.build_event_url(event, url)
eventyay.event.stages.get_stages(event)
eventyay.event.stages.in_stage(event, stage)
eventyay.event.utils.create_organizer_with_team(*, name, slug, users=None)

Helpers & Utilities

Helper Modules

class eventyay.helpers.countries.CachedCountries

Bases: Countries

cache_subkey = None
class eventyay.helpers.countries.FastCountryField(*args, **kwargs)

Bases: CountryField

check(**kwargs)
eventyay.helpers.countries.get_country_name(country_code)
class eventyay.helpers.http.ChunkBasedFileResponse(streaming_content=(), *args, **kwargs)

Bases: StreamingHttpResponse

block_size = 4096
eventyay.helpers.http.get_client_ip(request)
eventyay.helpers.http.redirect_to_url(to, permanent=False)
class eventyay.helpers.json.CustomJSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)

Bases: I18nJSONEncoder

default(obj)

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

1def default(self, o):
2    try:
3        iterable = iter(o)
4    except TypeError:
5        pass
6    else:
7        return list(iterable)
8    # Let the base class default method raise the TypeError
9    return super().default(o)
eventyay.helpers.json.safe_string(original)
exception eventyay.helpers.security.SessionInvalid

Bases: Exception

exception eventyay.helpers.security.SessionReauthRequired

Bases: Exception

eventyay.helpers.security.assert_session_valid(request)
eventyay.helpers.security.get_user_agent_hash(request)
exception eventyay.helpers.thumb.ThumbnailError

Bases: Exception

eventyay.helpers.thumb.create_thumbnail(sourcename, size)
eventyay.helpers.thumb.get_sizes(size, imgsize)
eventyay.helpers.thumb.get_thumbnail(source, size)

Formats

Template Tags

eventyay.base.templatetags.money.money_filter(value: Decimal, arg='', hide_currency=False)
eventyay.base.templatetags.money.money_numberfield_filter(value: Decimal, arg='')
class eventyay.base.templatetags.rich_text.StrikeThroughExtension(**kwargs)

Bases: Extension

extendMarkdown(md)

Add the various processors and patterns to the Markdown Instance.

This method must be overridden by every extension.

Arguments:

md: The Markdown instance.

eventyay.base.templatetags.rich_text.append_colon(text: LazyI18nString) str
eventyay.base.templatetags.rich_text.html_to_markdown_filter(html_text: str) str

Convert HTML to markdown format.

eventyay.base.templatetags.rich_text.markdown_compile_email(source)
eventyay.base.templatetags.rich_text.render_markdown(text: str, cleaner=<bleach.sanitizer.Cleaner object>) str
eventyay.base.templatetags.rich_text.rich_text(text: str)
eventyay.base.templatetags.rich_text.rich_text_snippet(text: str)
eventyay.helpers.templatetags.thumb.thumb(source, arg)
eventyay.common.templatetags.times.times(text: str)

Add a tag that really really really could be a standard tag.