mirror of
https://github.com/pretix/pretix.git
synced 2026-01-03 18:52:26 +00:00
Compare commits
6 Commits
fix-datasy
...
update-sig
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7148ac040c | ||
|
|
dedcb7efc4 | ||
|
|
2185e1c2e1 | ||
|
|
9d2be89418 | ||
|
|
c0771ab819 | ||
|
|
38292bc501 |
@@ -42,7 +42,7 @@ dependencies = [
|
||||
"django-filter==25.1",
|
||||
"django-formset-js-improved==0.5.0.3",
|
||||
"django-formtools==2.5.1",
|
||||
"django-hierarkey==2.0.*,>=2.0.1",
|
||||
"django-hierarkey==2.0.*",
|
||||
"django-hijack==3.7.*",
|
||||
"django-i18nfield==1.10.*",
|
||||
"django-libsass==0.9",
|
||||
|
||||
@@ -197,7 +197,6 @@ def order_overview(
|
||||
item.all_variations = list(item.variations.all())
|
||||
item.has_variations = (len(item.all_variations) > 0)
|
||||
item.num = {}
|
||||
item.subevent = subevent
|
||||
if item.has_variations:
|
||||
for var in item.all_variations:
|
||||
variid = var.id
|
||||
|
||||
@@ -99,24 +99,24 @@ def is_app_active(sender, app, allow_legacy_plugins=False):
|
||||
elif isinstance(sender, Organizer) and allow_legacy_plugins:
|
||||
# Deprecated behaviour: Event plugins that are registered on organizer level are considered active for
|
||||
# all organizers in the context of signals that used to be global signals before the introduction of
|
||||
# organizer-level plugin. A deprecation warning is emitted at .connect() time.
|
||||
# organizer plugins. A deprecation warning is emitted at .connect() time.
|
||||
enabled = True
|
||||
else:
|
||||
raise ImproperlyConfigured(f"Cannot check if event-level plugin is active on {type(sender)}")
|
||||
raise ImproperlyConfigured(f"Cannot check if event plugin is active on {type(sender)}")
|
||||
elif level == PLUGIN_LEVEL_ORGANIZER:
|
||||
if isinstance(sender, Organizer):
|
||||
enabled = app.name in sender.get_plugins()
|
||||
elif isinstance(sender, Event):
|
||||
enabled = app.name in sender.organizer.get_plugins()
|
||||
else:
|
||||
raise ImproperlyConfigured(f"Cannot check if organizer-level plugin is active on {type(sender)}")
|
||||
raise ImproperlyConfigured(f"Cannot check if organizer plugin is active on {type(sender)}")
|
||||
elif level == PLUGIN_LEVEL_EVENT_ORGANIZER_HYBRID:
|
||||
if isinstance(sender, Organizer):
|
||||
enabled = app.name in sender.get_plugins()
|
||||
elif isinstance(sender, Event):
|
||||
enabled = app.name in sender.get_plugins() and app.name in sender.organizer.get_plugins()
|
||||
else:
|
||||
raise ImproperlyConfigured(f"Cannot check if hybrid event/organizer-level plugin is active on {type(sender)}")
|
||||
raise ImproperlyConfigured(f"Cannot check if hybrid event/organizer plugin is active on {type(sender)}")
|
||||
else:
|
||||
raise ImproperlyConfigured("Unknown plugin level")
|
||||
|
||||
@@ -230,7 +230,7 @@ class PluginSignal(Generic[T], django.dispatch.Signal):
|
||||
class EventPluginSignal(PluginSignal[Event]):
|
||||
"""
|
||||
This is an extension to Django's built-in signals which differs in a way that it sends
|
||||
out it's events only to receivers which belong to plugins that are enabled for the given
|
||||
out its events only to receivers which belong to plugins that are enabled for the given
|
||||
Event.
|
||||
"""
|
||||
type = Event
|
||||
@@ -254,7 +254,7 @@ class EventPluginSignal(PluginSignal[Event]):
|
||||
class OrganizerPluginSignal(PluginSignal[Organizer]):
|
||||
"""
|
||||
This is an extension to Django's built-in signals which differs in a way that it sends
|
||||
out it's events only to receivers which belong to plugins that are enabled for the given
|
||||
out its events only to receivers which belong to plugins that are enabled for the given
|
||||
Organizer.
|
||||
"""
|
||||
type = Organizer
|
||||
@@ -898,7 +898,7 @@ This signals allows you to add fees to an order while it is being created. You a
|
||||
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 ``positions``
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. A ``positions``
|
||||
argument will contain the cart positions and ``invoice_address`` the invoice address (useful for
|
||||
tax calculation). The argument ``meta_info`` contains the order's meta dictionary. The ``total``
|
||||
keyword argument will contain the total cart sum without any fees. You should not rely on this
|
||||
@@ -916,7 +916,7 @@ This signals allows you to return a human-readable description for a fee type ba
|
||||
and ``internal_type`` attributes of the ``OrderFee`` model that you get as keyword arguments. You are
|
||||
expected to return a string or None, if you don't know about this fee.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
allow_ticket_download = EventPluginSignal()
|
||||
|
||||
@@ -107,16 +107,11 @@ def get_all_payment_providers():
|
||||
return Event
|
||||
|
||||
with rolledback_transaction():
|
||||
plugins = ",".join([app.name for app in apps.get_app_configs()])
|
||||
organizer = Organizer.objects.create(
|
||||
name="INTERNAL",
|
||||
plugins=plugins,
|
||||
)
|
||||
event = Event.objects.create(
|
||||
plugins=plugins,
|
||||
plugins=",".join([app.name for app in apps.get_app_configs()]),
|
||||
name="INTERNAL",
|
||||
date_from=now(),
|
||||
organizer=organizer,
|
||||
organizer=Organizer.objects.create(name="INTERNAL")
|
||||
)
|
||||
event = FakeEvent(event)
|
||||
provs = register_payment_providers.send(
|
||||
@@ -225,7 +220,6 @@ class OrderFilterForm(FilterForm):
|
||||
(_('Cancellations'), (
|
||||
(Order.STATUS_CANCELED, _('Canceled (fully)')),
|
||||
('cp', _('Canceled (fully or with paid fee)')),
|
||||
('cany', _('Canceled (at least one position)')),
|
||||
('rc', _('Cancellation requested')),
|
||||
('cni', _('Fully canceled but invoice not canceled')),
|
||||
)),
|
||||
@@ -402,16 +396,6 @@ class OrderFilterForm(FilterForm):
|
||||
).filter(
|
||||
Q(status=Order.STATUS_PAID, has_pc=False) | Q(status=Order.STATUS_CANCELED)
|
||||
)
|
||||
elif s == 'cany':
|
||||
s = OrderPosition.all.filter(
|
||||
order=OuterRef('pk'),
|
||||
canceled=True,
|
||||
)
|
||||
qs = qs.annotate(
|
||||
has_pc_c=Exists(s)
|
||||
).filter(
|
||||
Q(has_pc_c=True) | Q(status=Order.STATUS_CANCELED)
|
||||
)
|
||||
|
||||
if fdata.get('ordering'):
|
||||
qs = qs.order_by(*get_deterministic_ordering(Order, self.get_order_by()))
|
||||
@@ -490,31 +474,16 @@ class EventOrderFilterForm(OrderFilterForm):
|
||||
fdata = self.cleaned_data
|
||||
qs = super().filter_qs(qs)
|
||||
|
||||
# This is a little magic, but there's no option that does not confuse people and let's hope this confuses less
|
||||
# people.
|
||||
only_match_noncanceled_products = fdata.get('status') in (
|
||||
Order.STATUS_PAID,
|
||||
Order.STATUS_PAID + 'v',
|
||||
Order.STATUS_PENDING,
|
||||
Order.STATUS_PENDING + Order.STATUS_PAID,
|
||||
)
|
||||
if only_match_noncanceled_products:
|
||||
canceled_filter = Q(all_positions__canceled=False)
|
||||
elif fdata.get('status') in ('cp', 'cany'):
|
||||
canceled_filter = Q(all_positions__canceled=True) | Q(status=Order.STATUS_CANCELED)
|
||||
else:
|
||||
canceled_filter = Q()
|
||||
|
||||
item = fdata.get('item')
|
||||
if item:
|
||||
if '-' in item:
|
||||
var = item.split('-')[1]
|
||||
qs = qs.filter(canceled_filter, all_positions__variation_id=var).distinct()
|
||||
qs = qs.filter(all_positions__variation_id=var, all_positions__canceled=False).distinct()
|
||||
else:
|
||||
qs = qs.filter(canceled_filter, all_positions__item_id=fdata.get('item')).distinct()
|
||||
qs = qs.filter(all_positions__item_id=fdata.get('item'), all_positions__canceled=False).distinct()
|
||||
|
||||
if fdata.get('subevent'):
|
||||
qs = qs.filter(canceled_filter, all_positions__subevent=fdata.get('subevent')).distinct()
|
||||
qs = qs.filter(all_positions__subevent=fdata.get('subevent'), all_positions__canceled=False).distinct()
|
||||
|
||||
if fdata.get('question') and fdata.get('answer') is not None:
|
||||
q = fdata.get('question')
|
||||
|
||||
@@ -52,7 +52,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
nav_event = EventPluginSignal()
|
||||
@@ -77,7 +77,7 @@ The latter method also allows you to register navigation items as a sub-item of
|
||||
If you use this, you should read the documentation on :ref:`how to deal with URLs <urlconf>`
|
||||
in pretix.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
nav_topbar = GlobalSignal()
|
||||
@@ -131,7 +131,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
An additional keyword argument ``subevent`` *can* contain a sub-event.
|
||||
"""
|
||||
|
||||
@@ -146,7 +146,7 @@ should return a list of dictionaries, where each dictionary can have the keys:
|
||||
* 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
An additional keyword argument ``subevent`` *can* contain a sub-event.
|
||||
"""
|
||||
|
||||
@@ -173,7 +173,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
voucher_form_class = EventPluginSignal()
|
||||
@@ -189,7 +189,7 @@ an asynchronous context. For the bulk creation form, ``save()`` is not called. I
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
voucher_form_validation = EventPluginSignal()
|
||||
@@ -200,7 +200,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
quota_detail_html = EventPluginSignal()
|
||||
@@ -210,7 +210,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
organizer_edit_tabs = DeprecatedSignal()
|
||||
@@ -241,8 +241,14 @@ If your linked view should stay in the tab-like context of this page, we recomme
|
||||
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``.
|
||||
This is an organizer plugin signal (not an event-level signal). Organizer and
|
||||
hybrid plugins, will receive it if they're active for the current organizer.
|
||||
|
||||
**Deprecation Notice:** Currently, event plugins can always receive this signal,
|
||||
regardless of activation. In the future, event plugins will not be allowed to register
|
||||
to organizer-level signals.
|
||||
|
||||
Receivers will be passed the keyword arguments ``organizer`` and ``request``.
|
||||
"""
|
||||
|
||||
order_info = EventPluginSignal()
|
||||
@@ -251,7 +257,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
Additionally, the argument ``order`` and ``request`` are available.
|
||||
"""
|
||||
|
||||
@@ -261,7 +267,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
Additionally, the argument ``order`` and ``request`` are available.
|
||||
"""
|
||||
|
||||
@@ -279,7 +285,7 @@ If your linked view should stay in the tab-like context of this page, we recomme
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
A second keyword argument ``request`` will contain the request object.
|
||||
"""
|
||||
|
||||
@@ -290,7 +296,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
A second keyword argument ``request`` will contain the request object.
|
||||
"""
|
||||
|
||||
@@ -308,7 +314,7 @@ Your forms may also have two special properties: ``template`` with a template th
|
||||
included to render the form, and ``title``, which will be used as a headline. Your template
|
||||
will be passed a ``form`` variable with your form.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
item_formsets = EventPluginSignal()
|
||||
@@ -326,7 +332,7 @@ Your formset needs to have two special properties: ``template`` with a template
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
subevent_forms = EventPluginSignal()
|
||||
@@ -347,7 +353,7 @@ Your forms may also have two special properties: ``template`` with a template th
|
||||
included to render the form, and ``title``, which will be used as a headline. Your template
|
||||
will be passed a ``form`` variable with your form.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
oauth_application_registered = GlobalSignal()
|
||||
@@ -381,5 +387,5 @@ You are required to set ``prefix`` on your form instance. You are required to im
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Product" %}</th>
|
||||
<th>{% trans "Canceled" %}</th>
|
||||
<th>{% trans "Canceled" %}¹</th>
|
||||
<th>{% trans "Expired" %}</th>
|
||||
<th>{% trans "Approval pending" %}</th>
|
||||
<th colspan="3" class="text-center">{% trans "Purchased" %}</th>
|
||||
@@ -106,27 +106,27 @@
|
||||
<tr class="item {% if tup.0 %}categorized{% endif %}">
|
||||
<td>{{ item }}</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=cany&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=c&provider={{ item.provider }}">
|
||||
{{ item.num.canceled|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=e&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=e&provider={{ item.provider }}">
|
||||
{{ item.num.expired|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=pa&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=pa&provider={{ item.provider }}">
|
||||
{{ item.num.unapproved|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=na&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=na&provider={{ item.provider }}">
|
||||
{{ item.num.pending|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=p&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}&status=p&provider={{ item.provider }}">
|
||||
{{ item.num.paid|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
@@ -139,27 +139,27 @@
|
||||
<tr class="variation {% if tup.0 %}categorized{% endif %}">
|
||||
<td>{{ var }}</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=cany&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=c&provider={{ item.provider }}">
|
||||
{{ var.num.canceled|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=e&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=e&provider={{ item.provider }}">
|
||||
{{ var.num.expired|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=pa&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=pa&provider={{ item.provider }}">
|
||||
{{ var.num.unapproved|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=na&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=na&provider={{ item.provider }}">
|
||||
{{ var.num.pending|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=p&provider={{ item.provider }}{% if subevent %}&subevent={{ subevent.pk }}{% endif %}">
|
||||
<a href="{{ listurl }}?item={{ item.id }}-{{ var.id }}&status=p&provider={{ item.provider }}">
|
||||
{{ var.num.paid|togglesum:request.event.currency }}
|
||||
</a>
|
||||
</td>
|
||||
@@ -185,4 +185,7 @@
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
¹ {% trans "If you click links in this column, you will only find orders that are canceled completely, while the numbers also include single canceled positions within valid orders." %}
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -69,36 +69,34 @@
|
||||
{% if show_meta %}
|
||||
<span class="text-muted text-sm">{{ plugin.version }}</span>
|
||||
{% endif %}
|
||||
{% if is_active or plugin.level == "event" %}
|
||||
{% if plugin.level == "organizer" %}
|
||||
<span class="label label-success" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% trans "Active" %}
|
||||
</span>
|
||||
{% elif events_total and events_counter == events_total %}
|
||||
<span class="label label-success" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% trans "Active (all events)" %}
|
||||
</span>
|
||||
{% elif events_counter %}
|
||||
<span class="label label-info" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% blocktrans trimmed count count=events_counter %}
|
||||
Active ({{ count }} event)
|
||||
{% plural %}
|
||||
Active ({{ count }} events)
|
||||
{% endblocktrans %}
|
||||
</span>
|
||||
{% elif level == "event_organizer" %}
|
||||
<span class="label label-info" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% blocktrans trimmed count count=0 %}
|
||||
Active ({{ count }} event)
|
||||
{% plural %}
|
||||
Active ({{ count }} events)
|
||||
{% endblocktrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if is_active and level == "organizer" %}
|
||||
<span class="label label-success" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% trans "Active" %}
|
||||
</span>
|
||||
{% elif events_counter == events_total %}
|
||||
<span class="label label-success" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% trans "Active (all events)" %}
|
||||
</span>
|
||||
{% elif events_counter %}
|
||||
<span class="label label-info" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% blocktrans trimmed count count=events_counter %}
|
||||
Active ({{ count }} event)
|
||||
{% plural %}
|
||||
Active ({{ count }} events)
|
||||
{% endblocktrans %}
|
||||
</span>
|
||||
{% elif level == "event_organizer" %}
|
||||
<span class="label label-info" data-is-active>
|
||||
<span class="fa fa-check" aria-hidden="true"></span>
|
||||
{% blocktrans trimmed count count=0 %}
|
||||
Active ({{ count }} event)
|
||||
{% plural %}
|
||||
Active ({{ count }} events)
|
||||
{% endblocktrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
{% include "pretixcontrol/event/fragment_plugin_description.html" with plugin=plugin %}
|
||||
|
||||
@@ -82,35 +82,27 @@ class ControlSyncJob(OrderView):
|
||||
messages.success(self.request, _('The sync job has been enqueued and will run in the next minutes.'))
|
||||
elif self.request.POST.get("cancel_job"):
|
||||
with transaction.atomic():
|
||||
try:
|
||||
job = self.order.queued_sync_jobs.select_for_update(of=OF_SELF).get(
|
||||
pk=self.request.POST.get("cancel_job")
|
||||
)
|
||||
except OrderSyncQueue.DoesNotExist:
|
||||
messages.info(self.request, _('The sync job could not be found. It may have been processed in the meantime.'))
|
||||
job = self.order.queued_sync_jobs.select_for_update(of=OF_SELF).get(
|
||||
pk=self.request.POST.get("cancel_job")
|
||||
)
|
||||
if job.in_flight:
|
||||
messages.warning(self.request, _('The sync job is already in progress.'))
|
||||
else:
|
||||
if job.in_flight:
|
||||
messages.warning(self.request, _('The sync job is already in progress.'))
|
||||
else:
|
||||
job.delete()
|
||||
messages.success(self.request, _('The sync job has been canceled.'))
|
||||
job.delete()
|
||||
messages.success(self.request, _('The sync job has been canceled.'))
|
||||
elif self.request.POST.get("run_job_now"):
|
||||
with transaction.atomic():
|
||||
try:
|
||||
job = self.order.queued_sync_jobs.select_for_update(of=OF_SELF).get(
|
||||
pk=self.request.POST.get("run_job_now")
|
||||
)
|
||||
except OrderSyncQueue.DoesNotExist:
|
||||
messages.info(self.request, _('The sync job could not be found. It may have been processed in the meantime.'))
|
||||
job = self.order.queued_sync_jobs.select_for_update(of=OF_SELF).get(
|
||||
pk=self.request.POST.get("run_job_now")
|
||||
)
|
||||
if job.in_flight:
|
||||
messages.success(self.request, _('The sync job is already in progress.'))
|
||||
else:
|
||||
if job.in_flight:
|
||||
messages.success(self.request, _('The sync job is already in progress.'))
|
||||
else:
|
||||
job.not_before = now()
|
||||
job.need_manual_retry = None
|
||||
job.save()
|
||||
sync_single.apply_async(args=(job.pk,))
|
||||
messages.success(self.request, _('The sync job has been set to run as soon as possible.'))
|
||||
job.not_before = now()
|
||||
job.need_manual_retry = None
|
||||
job.save()
|
||||
sync_single.apply_async(args=(job.pk,))
|
||||
messages.success(self.request, _('The sync job has been set to run as soon as possible.'))
|
||||
|
||||
return redirect(self.get_order_url())
|
||||
|
||||
|
||||
@@ -2575,11 +2575,6 @@ class OverView(EventPermissionRequiredMixin, TemplateView):
|
||||
self.request.event,
|
||||
fees=True
|
||||
)
|
||||
ctx['subevent'] = (
|
||||
self.request.event.has_subevents and
|
||||
self.filter_form.is_valid() and
|
||||
self.filter_form.cleaned_data.get('subevent')
|
||||
)
|
||||
ctx['subevent_warning'] = (
|
||||
self.request.event.has_subevents and
|
||||
self.filter_form.is_valid() and
|
||||
|
||||
@@ -174,38 +174,21 @@ class SubEventDelete(EventPermissionRequiredMixin, CompatDeleteView):
|
||||
return HttpResponseRedirect(self.get_success_url())
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
@transaction.atomic
|
||||
def delete(self, request, *args, **kwargs):
|
||||
self.object = self.get_object()
|
||||
success_url = self.get_success_url()
|
||||
|
||||
try:
|
||||
with transaction.atomic():
|
||||
if not self.object.allow_delete():
|
||||
messages.error(request, pgettext_lazy('subevent', 'A date can not be deleted if orders already have been '
|
||||
'placed.'))
|
||||
return HttpResponseRedirect(success_url)
|
||||
self.object.log_action('pretix.subevent.deleted', user=self.request.user)
|
||||
CartPosition.objects.filter(addon_to__subevent=self.object).delete()
|
||||
self.object.cartposition_set.all().delete()
|
||||
self.object.delete()
|
||||
except ProtectedError:
|
||||
if self.object.active:
|
||||
with transaction.atomic():
|
||||
self.object.log_action(
|
||||
'pretix.subevent.changed', user=self.request.user, data={
|
||||
'active': False
|
||||
},
|
||||
)
|
||||
self.object.active = False
|
||||
self.object.save(update_fields=['active'])
|
||||
messages.error(self.request, pgettext_lazy(
|
||||
'subevent',
|
||||
'The date could not be deleted as some constraints (e.g. data created by plug-ins) did not allow '
|
||||
'it. The date was disabled instead.'
|
||||
))
|
||||
if not self.object.allow_delete():
|
||||
messages.error(request, pgettext_lazy('subevent', 'A date can not be deleted if orders already have been '
|
||||
'placed.'))
|
||||
return HttpResponseRedirect(self.get_success_url())
|
||||
else:
|
||||
self.object.log_action('pretix.subevent.deleted', user=self.request.user)
|
||||
CartPosition.objects.filter(addon_to__subevent=self.object).delete()
|
||||
self.object.cartposition_set.all().delete()
|
||||
self.object.delete()
|
||||
messages.success(request, pgettext_lazy('subevent', 'The selected date has been deleted.'))
|
||||
|
||||
return HttpResponseRedirect(success_url)
|
||||
|
||||
def get_success_url(self) -> str:
|
||||
|
||||
@@ -5,8 +5,8 @@ msgstr ""
|
||||
"Project-Id-Version: 1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-08-19 16:35+0000\n"
|
||||
"PO-Revision-Date: 2025-08-21 21:00+0000\n"
|
||||
"Last-Translator: Luca Hammer <hammer@rami.io>\n"
|
||||
"PO-Revision-Date: 2025-08-19 17:11+0000\n"
|
||||
"Last-Translator: Raphael Michel <michel@rami.io>\n"
|
||||
"Language-Team: German <https://translate.pretix.eu/projects/pretix/pretix/de/"
|
||||
">\n"
|
||||
"Language: de\n"
|
||||
@@ -34943,7 +34943,7 @@ msgstr "Ihre Bestellung war erfolgreich! Sie finden weiter unten alle Details."
|
||||
#: pretix/presale/templates/pretixpresale/event/order.html:19
|
||||
#: pretix/presale/templates/pretixpresale/event/order.html:50
|
||||
msgid "We successfully received your payment. See below for details."
|
||||
msgstr "Wir haben Ihre Zahlung erfolgreich erhalten. Details siehe unten."
|
||||
msgstr "Wir haben Ihre Zahlung erfolgreich erhalten."
|
||||
|
||||
#: pretix/presale/templates/pretixpresale/event/order.html:35
|
||||
msgid ""
|
||||
|
||||
@@ -24,7 +24,6 @@ from django.utils.functional import cached_property
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from pretix import __version__ as version
|
||||
from pretix.base.plugins import PLUGIN_LEVEL_EVENT_ORGANIZER_HYBRID
|
||||
|
||||
|
||||
class BankTransferApp(AppConfig):
|
||||
@@ -46,7 +45,6 @@ class BankTransferApp(AppConfig):
|
||||
((_("Bank transfer"), _("Import bank data")), "plugins:banktransfer:import", {}),
|
||||
((_("Bank transfer"), _("Export refunds")), "plugins:banktransfer:refunds.list", {}),
|
||||
]
|
||||
level = PLUGIN_LEVEL_EVENT_ORGANIZER_HYBRID
|
||||
|
||||
def ready(self):
|
||||
from . import signals # NOQA
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Generated by Django 4.2.16 on 2025-08-20 11:35
|
||||
|
||||
from django.db import migrations
|
||||
from django.db.models import Exists, OuterRef
|
||||
|
||||
|
||||
def activate_plugin(apps, schema_editor):
|
||||
Event = apps.get_model('pretixbase', 'Event')
|
||||
Organizer = apps.get_model('pretixbase', 'Organizer')
|
||||
qs = Organizer.objects.filter(
|
||||
Exists(Event.objects.filter(organizer_id=OuterRef("pk"), plugins__contains="pretix.plugins.banktransfer"))
|
||||
)
|
||||
for org in qs:
|
||||
if "pretix.plugins.banktransfer" not in org.plugins:
|
||||
org.plugins = ",".join(org.plugins.split(",") + ["pretix.plugins.banktransfer"])
|
||||
org.save(update_fields=["plugins"])
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("banktransfer", "0011_banktransaction_external_id"),
|
||||
("pretixbase", "0287_organizer_plugins"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
activate_plugin,
|
||||
migrations.RunPython.noop,
|
||||
)
|
||||
]
|
||||
@@ -78,6 +78,8 @@ def control_nav_orga_import(sender, request=None, **kwargs):
|
||||
url = resolve(request.path_info)
|
||||
if not request.user.has_organizer_permission(request.organizer, 'can_change_orders', request=request):
|
||||
return []
|
||||
if not request.organizer.events.filter(plugins__icontains='pretix.plugins.banktransfer'):
|
||||
return []
|
||||
return [
|
||||
{
|
||||
'label': _("Bank transfer"),
|
||||
|
||||
@@ -247,7 +247,7 @@ sendmail_view_classes = EventPluginSignal()
|
||||
This signal allows you to register subclasses of ``pretix.plugins.sendmail.views.BaseSenderView`` that should be
|
||||
discovered by this plugin.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword will contain the event.
|
||||
"""
|
||||
|
||||
|
||||
|
||||
@@ -205,5 +205,5 @@ The ``layout`` keyword argument will contain the layout which has been originall
|
||||
If you implement this signal and do not want to override the layout, make sure to return the ``layout`` keyword argument
|
||||
which you have been passed.
|
||||
|
||||
As with all plugin signals, the ``sender`` keyword will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword will contain the event.
|
||||
"""
|
||||
|
||||
@@ -74,7 +74,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
|
||||
**Note:** If PCI DSS compliance is important to you and you keep an inventory according to
|
||||
rule 6.4.3 of PCI DSS, all plugins that are not required to load on a payment page should
|
||||
@@ -91,7 +91,7 @@ This signal allows you to put code inside the HTML ``<head>`` tag
|
||||
of the seatingframe 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
html_page_header = EventPluginSignal()
|
||||
@@ -102,7 +102,7 @@ This signal allows you to put code right in the beginning of the HTML ``<body>``
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
html_footer = EventPluginSignal()
|
||||
@@ -113,7 +113,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
|
||||
**Note:** If PCI DSS compliance is important to you and you keep an inventory according to
|
||||
rule 6.4.3 of PCI DSS, all plugins that are not required to load on a payment page should
|
||||
@@ -128,7 +128,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
global_footer_link = GlobalSignal()
|
||||
@@ -146,7 +146,7 @@ order can be completed. This is typically used for something like "accept the te
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
checkout_flow_steps = EventPluginSignal()
|
||||
@@ -154,7 +154,7 @@ checkout_flow_steps = EventPluginSignal()
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
voucher_redeem_info = EventPluginSignal()
|
||||
@@ -163,7 +163,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
order_meta_from_request = EventPluginSignal()
|
||||
@@ -195,7 +195,7 @@ 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``
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. A ``request``
|
||||
argument will contain the request object.
|
||||
"""
|
||||
|
||||
@@ -206,7 +206,7 @@ Arguments: ``request``, ``invoice_address``, ``total``, ``positions``, ``payment
|
||||
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``
|
||||
As with all event 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.
|
||||
@@ -220,7 +220,7 @@ and by default only asks for the email address. You are supposed to return a dic
|
||||
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``
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. A ``request``
|
||||
argument will contain the request object.
|
||||
"""
|
||||
|
||||
@@ -234,7 +234,7 @@ form. You are supposed to return a dictionary of dictionaries with globally uniq
|
||||
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``
|
||||
As with all event 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.
|
||||
"""
|
||||
@@ -252,7 +252,7 @@ The ``position`` keyword argument will contain either a ``CartPosition`` object
|
||||
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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
question_form_fields_overrides = EventPluginSignal()
|
||||
@@ -268,7 +268,7 @@ 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``
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. A ``request``
|
||||
argument will contain the request object.
|
||||
"""
|
||||
|
||||
@@ -278,7 +278,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
position_info = EventPluginSignal()
|
||||
@@ -287,7 +287,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
order_info_top = EventPluginSignal()
|
||||
@@ -296,7 +296,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
position_info_top = EventPluginSignal()
|
||||
@@ -305,7 +305,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
process_request = EventPluginSignal()
|
||||
@@ -321,7 +321,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
process_response = EventPluginSignal()
|
||||
@@ -338,7 +338,7 @@ 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.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
"""
|
||||
|
||||
front_page_top = EventPluginSignal()
|
||||
@@ -348,7 +348,7 @@ 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
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. The
|
||||
receivers are expected to return HTML.
|
||||
"""
|
||||
|
||||
@@ -360,7 +360,7 @@ This signal is sent out to render a seating plan, if one is configured for the s
|
||||
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
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. The
|
||||
receivers are expected to return HTML.
|
||||
"""
|
||||
|
||||
@@ -371,7 +371,7 @@ 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
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. The
|
||||
receivers are expected to return HTML.
|
||||
"""
|
||||
|
||||
@@ -382,7 +382,7 @@ 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
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. The
|
||||
receivers are expected to return HTML.
|
||||
"""
|
||||
|
||||
@@ -393,7 +393,7 @@ 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``
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event. A ``request``
|
||||
argument will contain the request object.
|
||||
"""
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ register_event_fonts = EventPluginSignal()
|
||||
"""
|
||||
Return a dictionaries of the following structure. Paths should be relative to static root or an absolute URL. In the
|
||||
latter case, the fonts won't be available for PDF-rendering.
|
||||
As with all plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||
|
||||
{
|
||||
"font name": {
|
||||
|
||||
@@ -8,16 +8,15 @@ var async_task_is_long = false;
|
||||
var async_task_dont_redirect = false;
|
||||
|
||||
var async_task_status_messages = {
|
||||
// These are functions in order to be lazily evaluated after the gettext file is loaded
|
||||
long_task_started: () => gettext(
|
||||
long_task_started: gettext(
|
||||
'Your request is currently being processed. Depending on the size of your event, this might take up to ' +
|
||||
'a few minutes.'
|
||||
),
|
||||
long_task_pending: () => gettext(
|
||||
long_task_pending: gettext(
|
||||
'Your request has been queued on the server and will soon be ' +
|
||||
'processed.'
|
||||
),
|
||||
short_task: () => gettext(
|
||||
short_task: gettext(
|
||||
'Your request arrived on the server but we still wait for it to be ' +
|
||||
'processed. If this takes longer than two minutes, please contact us or go ' +
|
||||
'back in your browser and try again.'
|
||||
@@ -74,12 +73,12 @@ function async_task_check_callback(data, textStatus, jqXHR) {
|
||||
function async_task_update_status(data) {
|
||||
if (async_task_is_long) {
|
||||
if (data.started) {
|
||||
waitingDialog.setStatus(async_task_status_messages.long_task_started());
|
||||
waitingDialog.setStatus(async_task_status_messages.long_task_started);
|
||||
} else {
|
||||
waitingDialog.setStatus(async_task_status_messages.long_task_pending());
|
||||
waitingDialog.setStatus(async_task_status_messages.long_task_pending);
|
||||
}
|
||||
} else {
|
||||
waitingDialog.setStatus(async_task_status_messages.short_task());
|
||||
waitingDialog.setStatus(async_task_status_messages.short_task);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ def client():
|
||||
@pytest.fixture
|
||||
@scopes_disabled()
|
||||
def organizer():
|
||||
return Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
return Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -31,7 +31,7 @@ TEST_ORGANIZER_RES = {
|
||||
"name": "Dummy",
|
||||
"slug": "dummy",
|
||||
"public_url": "http://example.com/dummy/",
|
||||
"plugins": ["pretix.plugins.banktransfer"],
|
||||
"plugins": [],
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ TZ = ZoneInfo('Europe/Berlin')
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def event():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
o.settings.customer_accounts = True
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
|
||||
@@ -64,7 +64,7 @@ from pretix.testutils.scope import classscope
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def event():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(),
|
||||
@@ -1441,7 +1441,7 @@ class OrderCancelTests(TestCase):
|
||||
class OrderChangeManagerTests(TestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
self.o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
with scope(organizer=self.o):
|
||||
self.event = Event.objects.create(organizer=self.o, name='Dummy', slug='dummy', date_from=now(),
|
||||
plugins='pretix.plugins.banktransfer')
|
||||
|
||||
@@ -45,7 +45,7 @@ from pretix.base.shredder import (
|
||||
|
||||
@pytest.fixture
|
||||
def event():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer,pretix.plugins.ticketoutputpdf'
|
||||
|
||||
@@ -45,7 +45,7 @@ def autoskip(request, settings):
|
||||
@pytest.fixture
|
||||
@scopes_disabled()
|
||||
def organizer():
|
||||
return Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
return Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -60,8 +60,8 @@ class EventsTest(SoupTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.user = User.objects.create_user('dummy@dummy.dummy', 'dummy')
|
||||
self.orga1 = Organizer.objects.create(name='CCC', slug='ccc', plugins='pretix.plugins.banktransfer')
|
||||
self.orga2 = Organizer.objects.create(name='MRM', slug='mrm', plugins='pretix.plugins.banktransfer')
|
||||
self.orga1 = Organizer.objects.create(name='CCC', slug='ccc')
|
||||
self.orga2 = Organizer.objects.create(name='MRM', slug='mrm')
|
||||
self.event1 = Event.objects.create(
|
||||
organizer=self.orga1, name='30C3', slug='30c3',
|
||||
date_from=datetime.datetime(2013, 12, 26, tzinfo=datetime.timezone.utc),
|
||||
|
||||
@@ -60,7 +60,7 @@ from pretix.base.services.tax import VATIDFinalError, VATIDTemporaryError
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer,pretix.plugins.stripe,tests.testdummy'
|
||||
|
||||
@@ -49,7 +49,7 @@ from pretix.base.models import (
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer,pretix.plugins.stripe,tests.testdummy'
|
||||
|
||||
@@ -43,8 +43,8 @@ class OrganizerTest(SoupTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.user = User.objects.create_user('dummy@dummy.dummy', 'dummy')
|
||||
self.orga1 = Organizer.objects.create(name='CCC', slug='ccc', plugins='pretix.plugins.banktransfer')
|
||||
self.orga2 = Organizer.objects.create(name='MRM', slug='mrm', plugins='pretix.plugins.banktransfer')
|
||||
self.orga1 = Organizer.objects.create(name='CCC', slug='ccc')
|
||||
self.orga2 = Organizer.objects.create(name='MRM', slug='mrm')
|
||||
self.event1 = Event.objects.create(
|
||||
organizer=self.orga1, name='30C3', slug='30c3',
|
||||
date_from=datetime.datetime(2013, 12, 26, tzinfo=datetime.timezone.utc),
|
||||
|
||||
@@ -31,7 +31,7 @@ from pretix.base.models import Event, Organizer, Team
|
||||
@pytest.fixture
|
||||
@scopes_disabled()
|
||||
def organizer():
|
||||
return Organizer.objects.create(name="Dummy", slug="dummy", plugins='pretix.plugins.banktransfer')
|
||||
return Organizer.objects.create(name="Dummy", slug="dummy")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -35,7 +35,7 @@ from pretix.plugins.banktransfer.models import BankImportJob, BankTransaction
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer'
|
||||
|
||||
@@ -36,7 +36,7 @@ from pretix.plugins.banktransfer.models import BankImportJob, BankTransaction
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer'
|
||||
|
||||
@@ -53,7 +53,7 @@ from pretix.plugins.banktransfer.tasks import process_banktransfers
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer,pretix.plugins.paypal'
|
||||
|
||||
@@ -34,7 +34,7 @@ from pretix.base.models import (
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer,pretix.plugins.paypal'
|
||||
|
||||
@@ -35,7 +35,7 @@ from pretix.plugins.banktransfer.views import (
|
||||
|
||||
@pytest.fixture
|
||||
def env():
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy', plugins='pretix.plugins.banktransfer')
|
||||
o = Organizer.objects.create(name='Dummy', slug='dummy')
|
||||
event = Event.objects.create(
|
||||
organizer=o, name='Dummy', slug='dummy',
|
||||
date_from=now(), plugins='pretix.plugins.banktransfer,pretix.plugins.paypal'
|
||||
|
||||
@@ -70,7 +70,7 @@ class BaseCheckoutTestCase:
|
||||
@scopes_disabled()
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.orga = Organizer.objects.create(name='CCC', slug='ccc', plugins='pretix.plugins.banktransfer')
|
||||
self.orga = Organizer.objects.create(name='CCC', slug='ccc')
|
||||
self.event = Event.objects.create(
|
||||
organizer=self.orga, name='30C3', slug='30c3',
|
||||
date_from=datetime.datetime(now().year + 1, 12, 26, tzinfo=datetime.timezone.utc),
|
||||
|
||||
@@ -55,7 +55,7 @@ class BaseOrdersTest(TestCase):
|
||||
@scopes_disabled()
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.orga = Organizer.objects.create(name='CCC', slug='ccc', plugins='pretix.plugins.banktransfer')
|
||||
self.orga = Organizer.objects.create(name='CCC', slug='ccc')
|
||||
self.event = Event.objects.create(
|
||||
organizer=self.orga, name='30C3', slug='30c3',
|
||||
date_from=datetime.datetime(2013, 12, 26, tzinfo=datetime.timezone.utc),
|
||||
|
||||
@@ -56,7 +56,7 @@ class BaseOrdersTest(TestCase):
|
||||
@scopes_disabled()
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.orga = Organizer.objects.create(name='CCC', slug='ccc', plugins='pretix.plugins.banktransfer')
|
||||
self.orga = Organizer.objects.create(name='CCC', slug='ccc')
|
||||
self.event = Event.objects.create(
|
||||
organizer=self.orga, name='30C3', slug='30c3',
|
||||
date_from=datetime.datetime(2013, 12, 26, tzinfo=datetime.timezone.utc),
|
||||
|
||||
Reference in New Issue
Block a user