Compare commits

..

1 Commits

Author SHA1 Message Date
Raphael Michel
df656d1580 Avoid showing empty add-on step (Z#23167007)
Do not show add-on step if none of the add-on items is available. This
is not a perfect solution, there are still cases where an empty add-on
step will show up, e.g.:

- Products disabled only for a specific subevent
- Sold-out add-ons combined with the "hide sold-out products" flag
2024-09-27 13:44:42 +02:00
42 changed files with 1010 additions and 1898 deletions

View File

@@ -294,10 +294,6 @@ Example::
setting is not provided, pretix will generate a random secret on the first start
and will store it in the filesystem for later usage.
``secret_fallback0`` ... ``secret_fallback9``
Prior versions of the secret to be used by Django for signing and verification purposes that will still
be accepted but no longer be used for new signing.
``debug``
Whether or not to run in debug mode. Default is ``False``.

View File

@@ -51,7 +51,7 @@ Endpoints
"results": [
{
"identifier": "web",
"label": {
"name": {
"en": "Online shop"
},
"type": "web",
@@ -88,7 +88,7 @@ Endpoints
{
"identifier": "web",
"label": {
"name": {
"en": "Online shop"
},
"type": "web",
@@ -116,7 +116,7 @@ Endpoints
{
"identifier": "api.custom",
"label": {
"name": {
"en": "Custom integration"
},
"type": "api",
@@ -133,7 +133,7 @@ Endpoints
{
"identifier": "api.custom",
"label": {
"name": {
"en": "Custom integration"
},
"type": "api",
@@ -178,7 +178,7 @@ Endpoints
{
"identifier": "web",
"label": {
"name": {
"en": "Online shop"
},
"type": "web",

View File

@@ -14,7 +14,7 @@ Core
:members: periodic_task, event_live_issues, event_copy_data, email_filter, register_notification_types, notification,
item_copy_data, register_sales_channel_types, register_global_settings, quota_availability, global_email_filter,
register_ticket_secret_generators, gift_card_transaction_display,
register_text_placeholders, register_mail_placeholders, device_info_updated
register_text_placeholders, register_mail_placeholders
Order events
""""""""""""

View File

@@ -29,8 +29,8 @@ item_assignments list of objects Products this l
===================================== ========================== =======================================================
Layout endpoints
----------------
Endpoints
---------
.. http:get:: /api/v1/organizers/(organizer)/events/(event)/ticketlayouts/
@@ -268,75 +268,5 @@ Layout endpoints
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to delete this resource.
Ticket rendering endpoint
-----------------------------
.. http:post:: /api/v1/organizers/(organizer)/events/(event)/ticketpdfrenderer/render_batch/
With this API call, you can instruct the system to render a set of tickets into one combined PDF file. To specify
which tickets to render, you need to submit a list of "parts". For every part, the following fields are supported:
* ``orderposition`` (``integer``, required): The ID of the order position to render.
* ``override_channel`` (``string``, optional): The sales channel ID to be used for layout selection instead of the
original channel of the order.
* ``override_layout`` (``integer``, optional): The ticket layout ID to be used instead of the auto-selected one.
If your input parameters validate correctly, a ``202 Accepted`` status code is returned.
The body points you to the download URL of the result. Running a ``GET`` request on that result URL will
yield one of the following status codes:
* ``200 OK`` The export succeeded. The body will be your resulting file. Might be large!
* ``409 Conflict`` Your export is still running. The body will be JSON with the structure ``{"status": "running"}``. ``status`` can be ``waiting`` before the task is actually being processed. Please retry, but wait at least one second before you do.
* ``410 Gone`` Running the export has failed permanently. The body will be JSON with the structure ``{"status": "failed", "message": "Error message"}``
* ``404 Not Found`` The export does not exist / is expired.
.. warning:: This endpoint is considered **experimental**. It might change at any time without prior notice.
.. note:: To avoid performance issues, a maximum number of 1000 parts is currently allowed.
**Example request**:
.. sourcecode:: http
POST /api/v1/organizers/bigevents/events/sampleconf/ticketpdfrenderer/render_batch/ HTTP/1.1
Host: pretix.eu
Accept: application/json, text/javascript
Content-Type: application/json
{
"parts": [
{
"orderposition": 55412
},
{
"orderposition": 55412,
"override_channel": "web"
},
{
"orderposition": 55412,
"override_layout": 56
}
]
}
**Example response**:
.. sourcecode:: http
HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
{
"download": "https://pretix.eu/api/v1/organizers/bigevents/events/sampleconf/ticketpdfrenderer/download/29891ede-196f-4942-9e26-d055a36e98b8/3f279f13-c198-4137-b49b-9b360ce9fcce/"
}
:param organizer: The ``slug`` field of the organizer to fetch
:param event: The ``slug`` field of the event to fetch
:statuscode 202: no error
:statuscode 400: Invalid input options
:statuscode 401: Authentication failure
:statuscode 403: The requested organizer/event does not exist **or** you have no permission to view this resource.
.. _here: https://github.com/pretix/pretix/blob/master/src/pretix/static/schema/pdf-layout.schema.json

View File

@@ -80,18 +80,18 @@ dependencies = [
"psycopg2-binary",
"pycountry",
"pycparser==2.22",
"pycryptodome==3.21.*",
"pycryptodome==3.20.*",
"pypdf==5.0.*",
"python-bidi==0.6.*", # Support for Arabic in reportlab
"python-dateutil==2.9.*",
"pytz",
"pytz-deprecation-shim==0.1.*",
"pyuca",
"qrcode==8.0",
"redis==5.1.*",
"qrcode==7.4.*",
"redis==5.0.*",
"reportlab==4.2.*",
"requests==2.31.*",
"sentry-sdk==2.15.*",
"sentry-sdk==2.14.*",
"sepaxml==2.6.*",
"slimit",
"stripe==7.9.*",

View File

@@ -88,20 +88,16 @@ class SalesChannelMigrationMixin:
}
if data.get("all_sales_channels") and set(data["sales_channels"]) != all_channels:
raise ValidationError({
"limit_sales_channels": [
"If 'all_sales_channels' is set, the legacy attribute 'sales_channels' must not be set or set to "
"the list of all sales channels."
]
})
raise ValidationError(
"If 'all_sales_channels' is set, the legacy attribute 'sales_channels' must not be set or set to "
"the list of all sales channels."
)
if data.get("limit_sales_channels") and set(data["sales_channels"]) != set(data["limit_sales_channels"]):
raise ValidationError({
"limit_sales_channels": [
"If 'limit_sales_channels' is set, the legacy attribute 'sales_channels' must not be set or set to "
"the same list."
]
})
raise ValidationError(
"If 'limit_sales_channels' is set, the legacy attribute 'sales_channels' must not be set or set to "
"the same list."
)
if data["sales_channels"] == all_channels:
data["all_sales_channels"] = True

View File

@@ -200,11 +200,6 @@ class UpdateView(APIView):
device.save()
device.log_action('pretix.device.updated', data=serializer.validated_data, auth=device)
from ...base.signals import device_info_updated
device_info_updated.send(
sender=Device, old_device=request.auth, new_device=device
)
serializer = DeviceSerializer(device)
return Response(serializer.data)

View File

@@ -571,23 +571,13 @@ class User(AbstractBaseUser, PermissionsMixin, LoggingMixin):
def get_session_auth_hash(self):
"""
Return an HMAC that needs to be the same throughout the session, used e.g. for forced
logout after every password change.
"""
return self._get_session_auth_hash(secret=settings.SECRET_KEY)
def get_session_auth_fallback_hash(self):
for fallback_secret in settings.SECRET_KEY_FALLBACKS:
yield self._get_session_auth_hash(secret=fallback_secret)
def _get_session_auth_hash(self, secret):
"""
Return an HMAC that needs to
"""
key_salt = "pretix.base.models.User.get_session_auth_hash"
payload = self.password
payload += self.email
payload += self.session_token
return salted_hmac(key_salt, payload, secret=secret).hexdigest()
return salted_hmac(key_salt, payload).hexdigest()
def update_session_token(self):
self.session_token = generate_session_token()

View File

@@ -219,24 +219,13 @@ class Customer(LoggedModel):
return is_password_usable(self.password)
def get_session_auth_hash(self):
"""
Return an HMAC that needs to be the same throughout the session, used e.g. for forced
logout after every password change.
"""
return self._get_session_auth_hash(secret=settings.SECRET_KEY)
def get_session_auth_fallback_hash(self):
for fallback_secret in settings.SECRET_KEY_FALLBACKS:
yield self._get_session_auth_hash(secret=fallback_secret)
def _get_session_auth_hash(self, secret):
"""
Return an HMAC of the password field.
"""
key_salt = "pretix.base.models.customers.Customer.get_session_auth_hash"
payload = self.password
payload += self.email
return salted_hmac(key_salt, payload, secret=secret).hexdigest()
return salted_hmac(key_salt, payload).hexdigest()
def get_email_context(self):
from pretix.base.settings import get_name_parts_localized

View File

@@ -313,38 +313,9 @@ class EventMixin:
items=GroupConcat('pk', delimiter=',')
).values('items')
q_variation = (
Q(active=True)
& Q(Q(available_from__isnull=True) | Q(available_from__lte=time_machine_now()))
& Q(Q(available_until__isnull=True) | Q(available_until__gte=time_machine_now()))
& Q(item__active=True)
& Q(Q(item__available_from__isnull=True) | Q(item__available_from__lte=time_machine_now()))
& Q(Q(item__available_until__isnull=True) | Q(item__available_until__gte=time_machine_now()))
& Q(Q(item__category__isnull=True) | Q(item__category__is_addon=False))
& Q(item__require_bundling=False)
& Q(quotas__pk=OuterRef('pk'))
)
if isinstance(channel, str):
q_variation &= Q(Q(all_sales_channels=True) | Q(limit_sales_channels__identifier=channel))
q_variation &= Q(Q(item__all_sales_channels=True) | Q(item__limit_sales_channels__identifier=channel))
else:
q_variation &= Q(Q(all_sales_channels=True) | Q(limit_sales_channels=channel))
q_variation &= Q(Q(item__all_sales_channels=True) | Q(item__limit_sales_channels=channel))
if voucher:
if voucher.variation_id:
q_variation &= Q(pk=voucher.variation_id)
elif voucher.item_id:
q_variation &= Q(item_id=voucher.item_id)
elif voucher.quota_id:
q_variation &= Q(quotas__in=[voucher.quota_id])
if not voucher or not voucher.show_hidden_items:
q_variation &= Q(hide_without_voucher=False)
q_variation &= Q(item__hide_without_voucher=False)
sq_active_variation = ItemVariation.objects.filter(q_variation).order_by().values_list('quotas__pk').annotate(
sq_active_variation = ItemVariation.objects.filter_available(channel=channel, voucher=voucher).filter(
Q(quotas__pk=OuterRef('pk'))
).order_by().values_list('quotas__pk').annotate(
items=GroupConcat('pk', delimiter=',')
).values('items')
quota_base_qs = Quota.objects.using(settings.DATABASE_REPLICA).filter(

View File

@@ -303,6 +303,48 @@ def filter_available(qs, channel='web', voucher=None, allow_addons=False):
return qs.filter(q)
def filter_variations_available(qs, channel='web', voucher=None, allow_addons=False):
# Channel can currently be a SalesChannel or a str, since we need that compatibility, but a SalesChannel
# makes the query SIGNIFICANTLY faster
from .organizer import SalesChannel
assert isinstance(channel, (SalesChannel, str))
q = (
Q(active=True)
& Q(Q(available_from__isnull=True) | Q(available_from__lte=time_machine_now()))
& Q(Q(available_until__isnull=True) | Q(available_until__gte=time_machine_now()))
& Q(item__active=True)
& Q(Q(item__available_from__isnull=True) | Q(item__available_from__lte=time_machine_now()))
& Q(Q(item__available_until__isnull=True) | Q(item__available_until__gte=time_machine_now()))
& Q(Q(item__category__isnull=True) | Q(item__category__is_addon=False))
& Q(item__require_bundling=False)
)
if isinstance(channel, str):
q &= Q(Q(all_sales_channels=True) | Q(limit_sales_channels__identifier=channel))
q &= Q(Q(item__all_sales_channels=True) | Q(item__limit_sales_channels__identifier=channel))
else:
q &= Q(Q(all_sales_channels=True) | Q(limit_sales_channels=channel))
q &= Q(Q(item__all_sales_channels=True) | Q(item__limit_sales_channels=channel))
if not allow_addons:
q &= Q(Q(item__category__isnull=True) | Q(item__category__is_addon=False))
if voucher:
if voucher.variation_id:
q &= Q(pk=voucher.variation_id)
elif voucher.item_id:
q &= Q(item_id=voucher.item_id)
elif voucher.quota_id:
q &= Q(quotas__in=[voucher.quota_id])
if not voucher or not voucher.show_hidden_items:
q &= Q(hide_without_voucher=False)
q &= Q(item__hide_without_voucher=False)
return qs.filter(q)
class ItemQuerySet(models.QuerySet):
def filter_available(self, channel='web', voucher=None, allow_addons=False):
return filter_available(self, channel, voucher, allow_addons)
@@ -317,6 +359,20 @@ class ItemQuerySetManager(ScopedManager(organizer='event__organizer').__class__)
return filter_available(self.get_queryset(), channel, voucher, allow_addons)
class ItemVariationQuerySet(models.QuerySet):
def filter_available(self, channel='web', voucher=None, allow_addons=False):
return filter_variations_available(self, channel, voucher, allow_addons)
class ItemVariationQuerySetManager(ScopedManager(organizer='item__event__organizer').__class__):
def __init__(self):
super().__init__()
self._queryset_class = ItemVariationQuerySet
def filter_available(self, channel='web', voucher=None, allow_addons=False):
return filter_variations_available(self.get_queryset(), channel, voucher, allow_addons)
class Item(LoggedModel):
"""
An item is a thing which can be sold. It belongs to an event and may or may not belong to a category.
@@ -1199,7 +1255,7 @@ class ItemVariation(models.Model):
help_text=_('This text will be shown by the check-in app if a ticket of this type is scanned.')
)
objects = ScopedManager(organizer='item__event__organizer')
objects = ItemVariationQuerySetManager()
class Meta:
verbose_name = _("Product variation")

View File

@@ -40,7 +40,6 @@ import json
import logging
import operator
import string
import warnings
from collections import Counter
from datetime import datetime, time, timedelta
from decimal import Decimal
@@ -382,28 +381,8 @@ class Order(LockModel, LoggedModel):
self.event.cache.delete('complain_testmode_orders')
self.delete()
def email_confirm_secret(self):
return self.tagged_secret("email_confirm", 9)
def email_confirm_hash(self):
warnings.warn('Use email_confirm_secret() instead of email_confirm_hash().',
DeprecationWarning)
return self.email_confirm_secret()
def check_email_confirm_secret(self, received_secret):
return (
hmac.compare_digest(
self.tagged_secret("email_confirm", 9),
received_secret[:9].lower()
) or any(
# TODO: remove this clause after a while (compatibility with old secrets currently in flight)
hmac.compare_digest(
hashlib.sha256(sk.encode() + self.secret.encode()).hexdigest()[:9],
received_secret
)
for sk in [settings.SECRET_KEY, *settings.SECRET_KEY_FALLBACKS]
)
)
return hashlib.sha256(settings.SECRET_KEY.encode() + self.secret.encode()).hexdigest()[:9]
def get_extended_status_display(self):
# Changes in this method should to be replicated in pretixcontrol/orders/fragment_order_status.html

View File

@@ -304,24 +304,10 @@ class TaxRule(LoggedModel):
subtract_from_gross = Decimal('0.00')
rate = adjust_rate
def _limit_subtract(base_price, subtract_from_gross):
if not subtract_from_gross:
return base_price
if base_price >= Decimal('0.00'):
# For positive prices, make sure they don't go negative because of bundles
return max(Decimal('0.00'), base_price - subtract_from_gross)
else:
# If the price is already negative, we don't really care any more
return base_price - subtract_from_gross
if rate == Decimal('0.00'):
gross = _limit_subtract(base_price, subtract_from_gross)
return TaxedPrice(
net=gross,
gross=gross,
tax=Decimal('0.00'),
rate=rate,
name=self.name,
net=base_price - subtract_from_gross, gross=base_price - subtract_from_gross, tax=Decimal('0.00'),
rate=rate, name=self.name
)
if base_price_is == 'auto':
@@ -331,14 +317,19 @@ class TaxRule(LoggedModel):
base_price_is = 'net'
if base_price_is == 'gross':
gross = _limit_subtract(base_price, subtract_from_gross)
if base_price >= Decimal('0.00'):
# For positive prices, make sure they don't go negative because of bundles
gross = max(Decimal('0.00'), base_price - subtract_from_gross)
else:
# If the price is already negative, we don't really care any more
gross = base_price - subtract_from_gross
net = round_decimal(gross - (gross * (1 - 100 / (100 + rate))),
currency)
elif base_price_is == 'net':
net = base_price
gross = round_decimal((net * (1 + rate / 100)), currency)
if subtract_from_gross:
gross = _limit_subtract(gross, subtract_from_gross)
gross -= subtract_from_gross
net = round_decimal(gross - (gross * (1 - 100 / (100 + rate))),
currency)
else:

View File

@@ -301,7 +301,7 @@ def mail(email: Union[str, Sequence[str]], subject: str, template: Union[str, La
order.event, 'presale:event.order.open', kwargs={
'order': order.code,
'secret': order.secret,
'hash': order.email_confirm_secret()
'hash': order.email_confirm_hash()
}
)
)

View File

@@ -262,7 +262,7 @@ def base_placeholders(sender, **kwargs):
'presale:event.order.open', kwargs={
'order': order.code,
'secret': order.secret,
'hash': order.email_confirm_secret()
'hash': order.email_confirm_hash()
}
), lambda event: build_absolute_uri(
event,
@@ -443,7 +443,7 @@ def base_placeholders(sender, **kwargs):
'organizer': event.organizer.slug,
'order': order.code,
'secret': order.secret,
'hash': order.email_confirm_secret(),
'hash': order.email_confirm_hash(),
}),
)
for order in orders

View File

@@ -838,12 +838,3 @@ is given as the first argument.
The ``sender`` keyword argument will contain the organizer.
"""
device_info_updated = django.dispatch.Signal()
"""
Arguments: ``old_device``, ``new_device``
This signal is sent out each time the information for a Device is modified.
Both the original and updated versions of the Device are included to allow
receivers to see what has been updated.
"""

View File

@@ -143,7 +143,7 @@
</tr>
</table>
<div class="order-button">
<a href="{% abseventurl event "presale:event.order.open" hash=order.email_confirm_secret order=order.code secret=order.secret %}" class="button">
<a href="{% abseventurl event "presale:event.order.open" hash=order.email_confirm_hash order=order.code secret=order.secret %}" class="button">
{% trans "View order details" %}
</a>
</div>

View File

@@ -103,7 +103,7 @@ def timeline_for_event(event, subevent=None):
tl.append(TimelineEvent(
event=event, subevent=subevent,
datetime=rd.datetime(ev),
description=pgettext_lazy('timeline', 'Customers can no longer modify their order information'),
description=pgettext_lazy('timeline', 'Customers can no longer modify their orders'),
edit_url=ev_edit_url
))
@@ -159,18 +159,6 @@ def timeline_for_event(event, subevent=None):
})
))
rd = event.settings.get('change_allow_user_until', as_type=RelativeDateWrapper)
if rd and event.settings.change_allow_user_until:
tl.append(TimelineEvent(
event=event, subevent=subevent,
datetime=rd.datetime(ev),
description=pgettext_lazy('timeline', 'Customers can no longer make changes to their orders'),
edit_url=reverse('control:event.settings.cancel', kwargs={
'event': event.slug,
'organizer': event.organizer.slug
})
))
rd = event.settings.get('waiting_list_auto_disable', as_type=RelativeDateWrapper)
if rd and event.settings.waiting_list_enabled:
tl.append(TimelineEvent(

View File

@@ -239,14 +239,11 @@ class VoucherForm(I18nModelForm):
self.instance.event, self.instance.quota, self.instance.item, self.instance.variation
)
Voucher.clean_voucher_code(data, self.instance.event, self.instance.pk)
if 'seat' in self.fields:
if data.get('seat'):
self.instance.seat = Voucher.clean_seat_id(
data, self.instance.item, self.instance.quota, self.instance.event, self.instance.pk
)
self.instance.item = self.instance.seat.product
else:
self.instance.seat = None
if 'seat' in self.fields and data.get('seat'):
self.instance.seat = Voucher.clean_seat_id(
data, self.instance.item, self.instance.quota, self.instance.event, self.instance.pk
)
self.instance.item = self.instance.seat.product
voucher_form_validation.send(sender=self.instance.event, form=self, data=data)

View File

@@ -21,11 +21,6 @@
{% trans "The waiting list is no longer active for this event. The waiting list no longer affects quotas and no longer notifies waiting users." %}
</div>
{% endif %}
{% if request.event.settings.hide_sold_out %}
<div class="alert alert-warning">
{% trans "According to your event settings, sold out products are hidden from customers. This way, customers will not be able to discovere the waiting list." %}
</div>
{% endif %}
<div class="row">
{% if 'can_change_orders' in request.eventpermset %}
<form method="post" class="col-md-6"

View File

@@ -94,9 +94,7 @@ def process_login(request, user, keep_logged_in):
pretix_successful_logins.inc(1)
handle_login_source(user, request)
auth_login(request, user)
t = int(time.time())
request.session['pretix_auth_login_time'] = t
request.session['pretix_auth_last_used'] = t
request.session['pretix_auth_login_time'] = int(time.time())
if next_url and url_has_allowed_host_and_scheme(next_url, allowed_hosts=None):
return redirect_to_url(next_url)
return redirect('control:index')

View File

@@ -39,7 +39,7 @@ from django.contrib import messages
from django.core.exceptions import PermissionDenied
from django.db import transaction
from django.db.models import Exists, Max, OuterRef, Prefetch, Q, Subquery
from django.http import Http404, HttpResponseNotAllowed, HttpResponseRedirect
from django.http import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.urls import reverse
from django.utils.functional import cached_property
@@ -193,9 +193,6 @@ class CheckInListShow(EventPermissionRequiredMixin, PaginationMixin, CheckInList
class CheckInListBulkRevertConfirmView(CheckInListQueryMixin, EventPermissionRequiredMixin, TemplateView):
template_name = "pretixcontrol/checkin/bulk_revert_confirm.html"
def get(self, request, *args, **kwargs):
return HttpResponseNotAllowed(permitted_methods=["POST"])
def post(self, request, *args, **kwargs):
self.list = get_object_or_404(self.request.event.checkin_lists.all(), pk=kwargs.get("list"))
return super().get(request, *args, **kwargs)

File diff suppressed because it is too large Load Diff

View File

@@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-27 13:34+0000\n"
"PO-Revision-Date: 2024-10-01 22:52+0000\n"
"Last-Translator: Patrick Chilton <chpatrick@gmail.com>\n"
"Language-Team: Hungarian <https://translate.pretix.eu/projects/pretix/"
"pretix-js/hu/>\n"
"PO-Revision-Date: 2020-01-24 08:00+0000\n"
"Last-Translator: Prokaj Miklós <mixolid0@gmail.com>\n"
"Language-Team: Hungarian <https://translate.pretix.eu/projects/pretix/pretix-"
"js/hu/>\n"
"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.7.2\n"
"X-Generator: Weblate 3.5.1\n"
#: pretix/plugins/banktransfer/static/pretixplugins/banktransfer/ui.js:56
#: pretix/plugins/banktransfer/static/pretixplugins/banktransfer/ui.js:62
@@ -134,6 +134,9 @@ msgstr ""
#: pretix/plugins/paypal2/static/pretixplugins/paypal2/pretix-paypal.js:167
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:50
#, fuzzy
#| msgctxt "widget"
#| msgid "Continue"
msgid "Continue"
msgstr "Folytatás"
@@ -170,7 +173,7 @@ msgstr "Kapcsolatfelvétel Stripe-pal…"
#: pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js:72
msgid "Total"
msgstr "Összeg"
msgstr "Teljes"
#: pretix/plugins/stripe/static/pretixplugins/stripe/pretix-stripe.js:291
msgid "Contacting your bank …"
@@ -238,7 +241,7 @@ msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:44
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:45
msgid "Canceled"
msgstr "Lemondva"
msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:46
msgid "Confirmed"
@@ -246,7 +249,7 @@ msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:47
msgid "Approval pending"
msgstr "Engedélyre vár"
msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:48
#, fuzzy
@@ -257,7 +260,7 @@ msgstr "Beváltás"
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:49
msgid "Cancel"
msgstr "Lemondás"
msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:51
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:60
@@ -270,7 +273,7 @@ msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:53
msgid "Additional information required"
msgstr "Több információ szükséges"
msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:54
msgid "Valid ticket"
@@ -286,7 +289,7 @@ msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:57
msgid "Information required"
msgstr "Információ szükséges"
msgstr ""
#: pretix/plugins/webcheckin/static/pretixplugins/webcheckin/main.js:58
#, fuzzy
@@ -468,7 +471,7 @@ msgstr ""
#: pretix/static/pretixcontrol/js/ui/checkinrules.js:99
msgid "Product"
msgstr "Termék"
msgstr ""
#: pretix/static/pretixcontrol/js/ui/checkinrules.js:103
#, fuzzy
@@ -727,12 +730,12 @@ msgstr[0] "(még egy időpont)"
msgstr[1] "(még {num} időpont)"
#: pretix/static/pretixpresale/js/ui/cart.js:43
#, fuzzy
#| msgid "The items in your cart are no longer reserved for you."
msgid ""
"The items in your cart are no longer reserved for you. You can still "
"complete your order as long as theyre available."
msgstr ""
"A kosárba helyezett tételek tovább már nincsenek lefoglalva. Még "
"megpróbálhatod befejezni a rendelést, ha még elérhetőek."
msgstr "A kosárba helyezett termékek tovább nincsenek tovább foglalva."
#: pretix/static/pretixpresale/js/ui/cart.js:45
msgid "Cart expired"

View File

@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-26 11:22+0000\n"
"PO-Revision-Date: 2024-10-08 18:00+0000\n"
"Last-Translator: Davide Manzella <manzella.davide97@gmail.com>\n"
"PO-Revision-Date: 2024-08-22 15:00+0000\n"
"Last-Translator: Michelangelo <michelangelo.morrillo@gmail.com>\n"
"Language-Team: Italian <https://translate.pretix.eu/projects/pretix/pretix/"
"it/>\n"
"Language: it\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.7.2\n"
"X-Generator: Weblate 5.7\n"
#: pretix/_base_settings.py:79
msgid "English"
@@ -37,7 +37,7 @@ msgstr "Arabo"
#: pretix/_base_settings.py:83
msgid "Basque"
msgstr "Basco"
msgstr ""
#: pretix/_base_settings.py:84
msgid "Catalan"
@@ -121,7 +121,7 @@ msgstr "Russo"
#: pretix/_base_settings.py:104
msgid "Slovak"
msgstr "Slovacco"
msgstr ""
#: pretix/_base_settings.py:105
msgid "Swedish"
@@ -178,8 +178,10 @@ msgid "Allowed URIs list, space separated"
msgstr "Lista delle URI autorizzate, separate da spazio"
#: pretix/api/models.py:47
#, fuzzy
#| msgid "Allowed URIs list, space separated"
msgid "Allowed Post Logout URIs list, space separated"
msgstr "Lista delle URI Dopo Logout autorizzate, separate da spazio"
msgstr "Lista delle URI autorizzate, separate da spazio"
#: pretix/api/models.py:51 pretix/base/models/customers.py:395
#: pretix/plugins/paypal/payment.py:113 pretix/plugins/paypal2/payment.py:110
@@ -262,9 +264,10 @@ msgid "Unknown plugin: '{name}'."
msgstr "Plugin sconosciuto: '{name}'."
#: pretix/api/serializers/event.py:295
#, python-brace-format
#, fuzzy, python-brace-format
#| msgid "Unknown plugin: '{name}'."
msgid "Restricted plugin: '{name}'."
msgstr "Plugin a cui è limitato l'accesso: '{name}'."
msgstr "Plugin sconosciuto: '{name}'."
#: pretix/api/serializers/item.py:86 pretix/api/serializers/item.py:148
#: pretix/api/serializers/item.py:359
@@ -329,6 +332,8 @@ msgid "This type of question cannot be asked during check-in."
msgstr "Questo tipo di domanda non può essere fatta durante il check-in."
#: pretix/api/serializers/item.py:531 pretix/control/forms/item.py:142
#, fuzzy
#| msgid "This type of question cannot be asked during check-in."
msgid "This type of question cannot be shown during check-in."
msgstr "Questo tipo di domanda non può essere fatta durante il check-in."
@@ -397,7 +402,7 @@ msgstr ""
#: pretix/api/views/checkin.py:604 pretix/api/views/checkin.py:611
msgid "Medium connected to other event"
msgstr "Medium connesso ad un altro evento"
msgstr ""
#: pretix/api/views/oauth.py:107 pretix/control/logdisplay.py:475
#, python-brace-format
@@ -510,8 +515,10 @@ msgid "Order denied"
msgstr "Ordine rifiutato"
#: pretix/api/webhooks.py:313
#, fuzzy
#| msgid "Order denied"
msgid "Order deleted"
msgstr "Ordine cancellato"
msgstr "Ordine rifiutato"
#: pretix/api/webhooks.py:317
msgid "Ticket checked in"
@@ -573,8 +580,9 @@ msgid "Test-Mode of shop has been deactivated"
msgstr "La modalità test del negozio è stata disattivata"
#: pretix/api/webhooks.py:370
#, fuzzy
msgid "Waiting list entry added"
msgstr "Inserito correttamente nella lista d'attesa"
msgstr "Lista d'attesa"
#: pretix/api/webhooks.py:374
msgid "Waiting list entry changed"
@@ -651,7 +659,7 @@ msgstr "Password"
#: pretix/base/auth.py:176 pretix/base/auth.py:183
msgid "Your password must contain both numeric and alphabetic characters."
msgstr "La password deve contenere sia caratteri numerici che alfabetici."
msgstr ""
#: pretix/base/auth.py:202 pretix/base/auth.py:212
#, python-format
@@ -659,9 +667,8 @@ msgid "Your password may not be the same as your previous password."
msgid_plural ""
"Your password may not be the same as one of your %(history_length)s previous "
"passwords."
msgstr[0] "La password non può essere uguale a quella che si vuole cambiare."
msgstr[0] ""
msgstr[1] ""
"La password non può essere uguale ad una delle %(history_length)s precedenti."
#: pretix/base/channels.py:168
msgid "Online shop"
@@ -669,15 +676,13 @@ msgstr "Vendite online"
#: pretix/base/channels.py:174
msgid "API"
msgstr "API"
msgstr ""
#: pretix/base/channels.py:175
msgid ""
"API sales channels come with no built-in functionality, but may be used for "
"custom integrations."
msgstr ""
"API per i canali di vendita senza funzionalità incorporate, ma può essere "
"usata per integrazioni personalizzate."
#: pretix/base/context.py:45
#, python-brace-format
@@ -741,8 +746,6 @@ msgid ""
"No supported Token Endpoint Auth Methods supported: "
"{token_endpoint_auth_methods_supported}"
msgstr ""
"Nessun metodo di autenticazione di tipo Token per Endpoint supportatp: "
"{token_endpoint_auth_methods_supported}"
#: pretix/base/customersso/oidc.py:203 pretix/base/customersso/oidc.py:210
#: pretix/base/customersso/oidc.py:229 pretix/base/customersso/oidc.py:246
@@ -1086,6 +1089,7 @@ msgid "No"
msgstr "No"
#: pretix/base/exporters/dekodi.py:42 pretix/base/exporters/invoices.py:66
#, fuzzy
msgctxt "export_category"
msgid "Invoices"
msgstr "Fatture"
@@ -1612,6 +1616,7 @@ msgid "Product data"
msgstr "Dati del prodotto"
#: pretix/base/exporters/items.py:50 pretix/base/exporters/orderlist.py:1128
#, fuzzy
msgctxt "export_category"
msgid "Product data"
msgstr "Dati del prodotto"
@@ -1795,8 +1800,9 @@ msgstr "Richiede particolare attenzione"
#: pretix/base/modelimport_orders.py:617 pretix/base/models/items.py:614
#: pretix/base/models/items.py:1197 pretix/base/models/orders.py:287
#: pretix/plugins/checkinlists/exporters.py:522
#, fuzzy
msgid "Check-in text"
msgstr "Testo di Check-in"
msgstr "Checkout"
#: pretix/base/exporters/items.py:91 pretix/base/models/items.py:619
#: pretix/base/models/items.py:1117
@@ -2313,8 +2319,10 @@ msgid "Order comment"
msgstr "Commento all'ordine"
#: pretix/base/exporters/orderlist.py:622
#, fuzzy
#| msgid "Position ID"
msgid "Add-on to position ID"
msgstr "Add-on al ID Posizione"
msgstr "ID Posizione"
#: pretix/base/exporters/orderlist.py:650 pretix/base/pdf.py:340
msgid "Invoice address street"
@@ -2345,7 +2353,7 @@ msgstr "Nazione di fatturazione"
#: pretix/control/templates/pretixcontrol/subevents/detail.html:162
#: pretix/plugins/checkinlists/apps.py:44
msgid "Check-in lists"
msgstr "Liste de Check-in"
msgstr ""
#: pretix/base/exporters/orderlist.py:822
msgid "Order transaction data"
@@ -2545,8 +2553,9 @@ msgid "Payment method"
msgstr "Metodo di pagamento"
#: pretix/base/exporters/orderlist.py:1077
#, fuzzy
msgid "Matching ID"
msgstr "ID Combaciato"
msgstr "ID Pagamento"
#: pretix/base/exporters/orderlist.py:1077
#: pretix/control/templates/pretixcontrol/order/refund_choose.html:38
@@ -2611,6 +2620,7 @@ msgstr "Transazioni con carta regalo"
#: pretix/base/exporters/orderlist.py:1183
#: pretix/base/exporters/orderlist.py:1288
#, fuzzy
msgctxt "export_category"
msgid "Gift cards"
msgstr "Carte regalo"
@@ -2812,29 +2822,34 @@ msgstr "Ultima data di fatturazione dell'ordine"
#: pretix/control/templates/pretixcontrol/organizers/reusable_media.html:6
#: pretix/control/templates/pretixcontrol/organizers/reusable_media.html:9
msgid "Reusable media"
msgstr "Media Riutilizzabile"
msgstr ""
#: pretix/base/exporters/reusablemedia.py:35
msgctxt "export_category"
msgid "Reusable media"
msgstr "Media Riutilizzabile"
msgstr ""
#: pretix/base/exporters/reusablemedia.py:36
#, fuzzy
#| msgid ""
#| "Download a spreadsheet with information on all events in this organizer "
#| "account."
msgid ""
"Download a spread sheet with the data of all reusable medias on your account."
msgstr ""
"Scarica un foglio di calcolo con le informazioni con i dati di tutti i media "
"riutlizzabili dell' account."
"Scarica un foglio di calcolo con le informazioni su tutti gli eventi di "
"questo account organizzatore."
#: pretix/base/exporters/reusablemedia.py:46 pretix/base/models/media.py:67
#, fuzzy
msgctxt "reusable_medium"
msgid "Media type"
msgstr "Tipo di Media"
msgstr "Tipo di tariffa"
#: pretix/base/exporters/reusablemedia.py:47 pretix/base/models/media.py:73
msgctxt "reusable_medium"
msgid "Identifier"
msgstr "Identificativo"
msgstr ""
#: pretix/base/exporters/reusablemedia.py:49 pretix/base/models/media.py:81
#: pretix/base/models/orders.py:263 pretix/base/models/orders.py:3014
@@ -2846,18 +2861,22 @@ msgstr "Data di scadenza"
#: pretix/base/exporters/reusablemedia.py:50 pretix/base/models/media.py:90
#: pretix/control/templates/pretixcontrol/order/index.html:215
#: pretix/presale/templates/pretixpresale/event/checkout_confirm.html:132
#, fuzzy
msgid "Customer account"
msgstr "Account del cliente"
msgstr "Domande"
#: pretix/base/exporters/reusablemedia.py:51 pretix/base/models/media.py:97
#, fuzzy
msgid "Linked ticket"
msgstr "Ticket collegato"
msgstr "Testo footer aggiuntivo"
#: pretix/base/exporters/reusablemedia.py:52 pretix/base/models/media.py:104
#, fuzzy
msgid "Linked gift card"
msgstr "Carta regalo collegata"
msgstr "Pagato con carta regalo"
#: pretix/base/exporters/waitinglist.py:42
#, fuzzy
msgctxt "export_category"
msgid "Waiting list"
msgstr "Lista d'attesa"
@@ -2936,7 +2955,7 @@ msgstr "Codice del voucher"
#: pretix/base/forms/__init__.py:118
#, python-brace-format
msgid "You can use {markup_name} in this field."
msgstr "Puoi usare {markup_name} in questo campo."
msgstr ""
#: pretix/base/forms/__init__.py:178
#, python-format
@@ -3150,15 +3169,12 @@ msgid ""
"up. Please note: to use literal \"{\" or \"}\", you need to double them as "
"\"{{\" and \"}}\"."
msgstr ""
"è presente un errore nella sintassi dei placeholder. Controllare che le "
"graffe di apertura \"{\" e di chiusura \"}\" sui placeholder match up. Fare "
"attenzione: perutlizzare \"{\" oppure \"}\", è necessario raddoppiarli \"{{ "
"e \"}}\"."
#: pretix/base/forms/validators.py:72 pretix/control/views/event.py:763
#, python-format
#, fuzzy, python-format
#| msgid "Invalid placeholder(s): %(value)s"
msgid "Invalid placeholder: {%(value)s}"
msgstr "Placeholder non valido: %(value)s"
msgstr "Placeholder(s) non valido: %(value)s"
#: pretix/base/forms/widgets.py:68
#, python-format
@@ -3175,7 +3191,7 @@ msgstr "Segnalibri disponibili: {list}"
#: pretix/plugins/sendmail/templates/pretixplugins/sendmail/rule_create.html:40
#: pretix/plugins/sendmail/templates/pretixplugins/sendmail/rule_update.html:54
msgid "Time"
msgstr "Orario"
msgstr ""
#: pretix/base/forms/widgets.py:234 pretix/base/forms/widgets.py:239
msgid "Business or institutional customer"
@@ -3404,7 +3420,7 @@ msgstr ""
#: pretix/base/invoice.py:858
msgid "Default invoice renderer (European-style letter)"
msgstr "Renderizzatore di fatture di default (Stile Europeo)"
msgstr ""
#: pretix/base/invoice.py:947
msgctxt "invoice"
@@ -3413,13 +3429,15 @@ msgstr "(Per cortesia citare sempre.)"
#: pretix/base/invoice.py:994
msgid "Simplified invoice renderer"
msgstr "Renderizzatore di fatture semplificato"
msgstr ""
#: pretix/base/invoice.py:1013
#, python-brace-format
#, fuzzy, python-brace-format
#| msgctxt "subevent"
#| msgid "Event series date changed"
msgctxt "invoice"
msgid "Event date: {date_range}"
msgstr "Data evento: {date_range}"
msgstr "Serie di date modificate"
#: pretix/base/media.py:61
msgid "Barcode / QR-Code"
@@ -3437,57 +3455,58 @@ msgstr "Lista predefinita"
#: pretix/base/modelimport.py:112
msgid "Keep empty"
msgstr "Lasciare vuoto"
msgstr ""
#: pretix/base/modelimport.py:139
#, python-brace-format
msgid "Invalid setting for column \"{header}\"."
msgstr "Settaggio invalido per colonna \"{header}\"."
msgstr ""
#: pretix/base/modelimport.py:199
#, python-brace-format
msgid "Could not parse {value} as a yes/no value."
msgstr "Non è stato possibile leggere {value} come valore di sì/no."
msgstr ""
#: pretix/base/modelimport.py:222
#, python-brace-format
msgid "Could not parse {value} as a date and time."
msgstr "Non è stato possibile leggere {value} come data e ora."
msgstr ""
#: pretix/base/modelimport.py:232 pretix/control/views/orders.py:1161
#: pretix/control/views/orders.py:1190 pretix/control/views/orders.py:1234
#: pretix/control/views/orders.py:1269 pretix/control/views/orders.py:1292
msgid "You entered an invalid number."
msgstr "Hai inserito un numero invalido."
msgstr ""
#: pretix/base/modelimport.py:276 pretix/base/modelimport.py:288
msgctxt "subevent"
msgid "No matching date was found."
msgstr "Nessuna data combaciante è stata trovata."
msgstr ""
#: pretix/base/modelimport.py:278 pretix/base/modelimport.py:290
msgctxt "subevent"
msgid "Multiple matching dates were found."
msgstr "Molteplici date che combaciano sono state trovate."
msgstr ""
#: pretix/base/modelimport_orders.py:85
#, fuzzy
msgid "Enter a valid phone number."
msgstr "Inserire un numero di telefono valido."
msgstr "Numero di telefono"
#: pretix/base/modelimport_orders.py:100 pretix/presale/views/waiting.py:118
msgctxt "subevent"
msgid "You need to select a date."
msgstr "Devi selezionare una data."
msgstr ""
#: pretix/base/modelimport_orders.py:128
#: pretix/base/modelimport_vouchers.py:194
msgid "No matching product was found."
msgstr "Nessun prodotto combaciante è stato trovato."
msgstr ""
#: pretix/base/modelimport_orders.py:130
#: pretix/base/modelimport_vouchers.py:196
msgid "Multiple matching products were found."
msgstr "Molteplici prodotti combacianti sono stati trovati."
msgstr ""
#: pretix/base/modelimport_orders.py:139
#: pretix/base/modelimport_vouchers.py:205 pretix/base/models/items.py:1205
@@ -3499,13 +3518,13 @@ msgstr "Variante prodotto"
#: pretix/base/modelimport_vouchers.py:225
#: pretix/base/modelimport_vouchers.py:259
msgid "No matching variation was found."
msgstr "Nessuna variazione combaciante trovata."
msgstr ""
#: pretix/base/modelimport_orders.py:161
#: pretix/base/modelimport_vouchers.py:227
#: pretix/base/modelimport_vouchers.py:261
msgid "Multiple matching variations were found."
msgstr "Multiple variazioni combacianti trovate."
msgstr ""
#: pretix/base/modelimport_orders.py:164
msgid "You need to select a variation for this product."
@@ -3524,15 +3543,15 @@ msgstr "Indirizzo di fatturazione"
#: pretix/base/modelimport_orders.py:251 pretix/base/modelimport_orders.py:397
msgid "Please enter a valid country code."
msgstr "Inserire un codice prefisso del paese valido."
msgstr ""
#: pretix/base/modelimport_orders.py:268 pretix/base/modelimport_orders.py:414
msgid "States are not supported for this country."
msgstr "Stati non sono supportati per questa nazione."
msgstr ""
#: pretix/base/modelimport_orders.py:276 pretix/base/modelimport_orders.py:422
msgid "Please enter a valid state."
msgstr "Inserire uno stato valido."
msgstr ""
#: pretix/base/modelimport_orders.py:325 pretix/control/forms/filter.py:651
msgid "Attendee e-mail address"
@@ -3556,7 +3575,7 @@ msgstr "Stato"
#: pretix/base/modelimport_orders.py:432
msgid "Calculate from product"
msgstr "Calculare dal prodotto"
msgstr ""
#: pretix/base/modelimport_orders.py:449
#: pretix/control/templates/pretixcontrol/checkin/index.html:111
@@ -3566,29 +3585,29 @@ msgstr "Codice biglietto"
#: pretix/base/modelimport_orders.py:450
msgid "Generate automatically"
msgstr "Generare automaticamente"
msgstr ""
#: pretix/base/modelimport_orders.py:459
msgid "You cannot assign a position secret that already exists."
msgstr "Non è possibile assegnare un segreto di posizione preesistente."
msgstr ""
#: pretix/base/modelimport_orders.py:490
msgid "Please enter a valid language code."
msgstr "Inserire un codice linguaggio valido."
msgstr ""
#: pretix/base/modelimport_orders.py:558 pretix/base/modelimport_orders.py:560
msgid "Please enter a valid sales channel."
msgstr "Inserire un valido canale di vendita."
msgstr ""
#: pretix/base/modelimport_orders.py:584
#: pretix/base/modelimport_vouchers.py:291
msgid "Multiple matching seats were found."
msgstr "Molteplici posti a sedere trovati."
msgstr ""
#: pretix/base/modelimport_orders.py:586
#: pretix/base/modelimport_vouchers.py:293
msgid "No matching seat was found."
msgstr "Nessun posto a sedere trovato."
msgstr ""
#: pretix/base/modelimport_orders.py:589
#: pretix/base/modelimport_vouchers.py:296 pretix/base/services/cart.py:212
@@ -3597,12 +3616,10 @@ msgstr "Nessun posto a sedere trovato."
msgid ""
"The seat you selected has already been taken. Please select a different seat."
msgstr ""
"Il posto a sedere da lei selezionato è stato già preso. Per piacere "
"selezionare un posto a sedere differente."
#: pretix/base/modelimport_orders.py:592 pretix/base/services/cart.py:209
msgid "You need to select a specific seat."
msgstr "è necessario selezionare un posto a sedere specifico."
msgstr ""
#: pretix/base/modelimport_orders.py:646 pretix/base/models/items.py:1618
#: pretix/base/models/items.py:1713 pretix/control/forms/item.py:91
@@ -3610,16 +3627,16 @@ msgstr "è necessario selezionare un posto a sedere specifico."
#: pretix/control/templates/pretixcontrol/items/question_edit.html:17
#: pretix/control/templates/pretixcontrol/items/questions.html:21
msgid "Question"
msgstr "Domanda"
msgstr ""
#: pretix/base/modelimport_orders.py:656 pretix/base/modelimport_orders.py:664
#: pretix/base/models/items.py:1777 pretix/base/models/items.py:1795
msgid "Invalid option selected."
msgstr "L' opzione selezionata è invalida."
msgstr ""
#: pretix/base/modelimport_orders.py:658 pretix/base/modelimport_orders.py:666
msgid "Ambiguous option selected."
msgstr "L'opzione selezionata è ambigua."
msgstr ""
#: pretix/base/modelimport_orders.py:697 pretix/base/models/orders.py:237
#: pretix/control/forms/orders.py:643 pretix/control/forms/organizer.py:784
@@ -3628,49 +3645,48 @@ msgstr "Cliente"
#: pretix/base/modelimport_orders.py:710
msgid "No matching customer was found."
msgstr "Nessun cliente ciìombaciante è stato trovato."
msgstr ""
#: pretix/base/modelimport_vouchers.py:50 pretix/base/models/vouchers.py:488
msgid "A voucher with this code already exists."
msgstr "Un voucher con questo codice esiste già."
msgstr ""
#: pretix/base/modelimport_vouchers.py:68 pretix/base/models/memberships.py:57
#: pretix/base/models/vouchers.py:196 pretix/control/views/vouchers.py:120
#: pretix/presale/templates/pretixpresale/organizers/customer_membership.html:28
msgid "Maximum usages"
msgstr "Massimi utlizzi"
msgstr ""
#: pretix/base/modelimport_vouchers.py:79
msgid "The maximum number of usages must be set."
msgstr "Il massimo numero di ultizzi deve essere configurato."
msgstr ""
#: pretix/base/modelimport_vouchers.py:88 pretix/base/models/vouchers.py:205
#, fuzzy
msgid "Minimum usages"
msgstr "Mini utlizzi"
msgstr "Utilizzi massimi per voucher"
#: pretix/base/modelimport_vouchers.py:103 pretix/base/models/vouchers.py:213
msgid "Maximum discount budget"
msgstr "Massimo discount budget"
msgstr ""
#: pretix/base/modelimport_vouchers.py:119 pretix/base/models/vouchers.py:225
#: pretix/control/forms/filter.py:2106
msgid "Reserve ticket from quota"
msgstr "Prenotare biglietto dalla quota disponibile"
msgstr ""
#: pretix/base/modelimport_vouchers.py:127 pretix/base/models/vouchers.py:233
msgid "Allow to bypass quota"
msgstr "Permettere di superare la quota"
msgstr ""
#: pretix/base/modelimport_vouchers.py:135 pretix/base/models/vouchers.py:239
msgid "Price mode"
msgstr "Modalità prezzo"
msgstr ""
#: pretix/base/modelimport_vouchers.py:150
#, python-brace-format
msgid "Could not parse {value} as a price mode, use one of {options}."
msgstr ""
"Non è possible leggere {value} come modalità prezzo, usare una delle "
"{options}."
#: pretix/base/modelimport_vouchers.py:160 pretix/base/models/vouchers.py:245
msgid "Voucher value"
@@ -3678,64 +3694,56 @@ msgstr "Valore Voucher"
#: pretix/base/modelimport_vouchers.py:165
msgid "It is pointless to set a value without a price mode."
msgstr "è inutile settare un valore senza modalità prezzo."
msgstr ""
#: pretix/base/modelimport_vouchers.py:237 pretix/base/models/items.py:2040
#: pretix/base/models/vouchers.py:272
#: pretix/control/templates/pretixcontrol/items/quota_edit.html:8
#: pretix/control/templates/pretixcontrol/items/quota_edit.html:15
msgid "Quota"
msgstr "Quota"
msgstr ""
#: pretix/base/modelimport_vouchers.py:253
msgid "You cannot specify a quota if you specified a product."
msgstr "Non è possiblile specificare una quota se hai specificato un prodotto."
msgstr ""
#: pretix/base/modelimport_vouchers.py:282 pretix/base/models/vouchers.py:495
msgid "You need to choose a date if you select a seat."
msgstr "è necessario scegliere una data se si seleziona un posto a sedere."
msgstr ""
#: pretix/base/modelimport_vouchers.py:299 pretix/base/models/vouchers.py:513
msgid "You need to choose a specific product if you select a seat."
msgstr ""
"è necessario scegliere un prodotto specifico se si seleziona un posto a "
"sedere."
#: pretix/base/modelimport_vouchers.py:302 pretix/base/models/vouchers.py:516
msgid "Seat-specific vouchers can only be used once."
msgstr ""
"Voucher specifici per un posto a sedere possono essere usati solo una volta "
"sola."
#: pretix/base/modelimport_vouchers.py:306 pretix/base/models/vouchers.py:519
#, fuzzy, python-brace-format
#, python-brace-format
msgid "You need to choose the product \"{prod}\" for this seat."
msgstr ""
"è necessario sceglliere il prodotto \"[prod}\" per questo posto a sedere."
#: pretix/base/modelimport_vouchers.py:318 pretix/base/models/vouchers.py:285
#: pretix/control/templates/pretixcontrol/vouchers/index.html:129
#: pretix/control/templates/pretixcontrol/vouchers/tags.html:42
#: pretix/control/views/vouchers.py:120
msgid "Tag"
msgstr "Etichetta"
msgstr ""
#: pretix/base/modelimport_vouchers.py:334 pretix/base/models/vouchers.py:297
msgid "Shows hidden products that match this voucher"
msgstr "Mostrare i prodotti nascoscti che combaciano con questo voucher"
msgstr ""
#: pretix/base/modelimport_vouchers.py:343 pretix/base/models/vouchers.py:301
msgid "Offer all add-on products for free when redeeming this voucher"
msgstr ""
"Offrire tutti i prodotti add-on gratuitamente riscattando questo voucher"
#: pretix/base/modelimport_vouchers.py:351 pretix/base/models/vouchers.py:305
msgid ""
"Include all bundled products without a designated price when redeeming this "
"voucher"
msgstr ""
"Includere tutti i prodotti inclusi nel pacchetto senza un prezzo quando "
"riscatti questo voucher"
#: pretix/base/models/auth.py:248
msgid "Is active"
@@ -3816,21 +3824,18 @@ msgstr ""
#: pretix/base/models/checkin.py:65
msgctxt "checkin"
msgid "Ignore check-ins on this list in statistics"
msgstr "Ignora check-in presenti in questa lista, per le statistiche"
msgstr ""
#: pretix/base/models/checkin.py:69
msgctxt "checkin"
msgid "Tickets with a check-in on this list should be considered \"used\""
msgstr ""
"Biglietti con un check-in in questa lista sono da considerarsi \"usati\""
#: pretix/base/models/checkin.py:70
msgid ""
"This is relevant in various situations, e.g. for deciding if a ticket can "
"still be canceled by the customer."
msgstr ""
"Questo è rilevante in varie situazioni, ad esempio per devidere se un "
"biglietto può ancora essere cancellato dal cliente."
#: pretix/base/models/checkin.py:74
msgctxt "checkin"
@@ -3903,10 +3908,6 @@ msgid ""
"replacement, our new plugin \"Auto check-in\" can be used. When we remove "
"this option, we will automatically migrate your event to use the new plugin."
msgstr ""
"Questa opzione è deprecata e verra rimossa nei mesi seguenti. Come "
"rimpiazzo, il nuovo plugin \"Auto check-in\" può essere usato. Quando verra "
"rimossa questa opzione, migreremo automaticamente il tuo evento nell' "
"utilizzo del nuovo plugin."
#: pretix/base/models/checkin.py:340
msgid "Entry"
@@ -4292,18 +4293,15 @@ msgid ""
"Optional. No products will be sold after this date. If you do not set this "
"value, the presale will end after the end date of your event."
msgstr ""
"Opzionale. nessun prodotto verrà venduto oltre questa data. Se questo campo "
"non viene settato, il periodo di prevendita finirà dopo la data di fine "
"evento."
#: pretix/base/models/event.py:599 pretix/base/models/event.py:1480
#: pretix/control/forms/subevents.py:94
msgid "Optional. No products will be sold before this date."
msgstr "Opzionale. Nessun prodotto verrà venduto rima di questa data."
msgstr ""
#: pretix/base/models/event.py:624 pretix/control/navigation.py:65
msgid "Plugins"
msgstr "Plugin"
msgstr ""
#: pretix/base/models/event.py:631 pretix/base/pdf.py:229
#: pretix/control/forms/event.py:260 pretix/control/forms/filter.py:1677
@@ -4313,11 +4311,11 @@ msgstr "Plugin"
#: pretix/presale/templates/pretixpresale/organizers/index.html:90
#: pretix/presale/views/widget.py:682
msgid "Event series"
msgstr "Serie di eventi"
msgstr ""
#: pretix/base/models/event.py:635 pretix/base/models/event.py:1508
msgid "Seating plan"
msgstr "Piani dei posti a sedere"
msgstr ""
#: pretix/base/models/event.py:642 pretix/base/models/items.py:626
#, fuzzy
@@ -31769,7 +31767,7 @@ msgstr ""
#: pretix/presale/templates/pretixpresale/organizers/index.html:25
msgid "Past events"
msgstr "Eventi passati"
msgstr ""
#: pretix/presale/templates/pretixpresale/organizers/index.html:27
msgid "Upcoming events"
@@ -31834,7 +31832,7 @@ msgstr ""
#: pretix/presale/views/cart.py:190
msgid "Please enter positive numbers only."
msgstr "Inserisci solo numeri positivi."
msgstr ""
#: pretix/presale/views/cart.py:428
msgid "We applied the voucher to as many products in your cart as we could."
@@ -31903,12 +31901,11 @@ msgid ""
"Your email address has not been updated since the address is already in use "
"for another customer account."
msgstr ""
"Il tuo indirizzo email non è stato aggiornato perché è già in uso per un "
"altro account cliente."
#: pretix/presale/views/customer.py:576
#, fuzzy
msgid "Your email address has been updated."
msgstr "Il tuo indirizzo email è stato aggiornato."
msgstr "La tua gift card è stata applicata."
#: pretix/presale/views/customer.py:789 pretix/presale/views/customer.py:800
#, python-brace-format
@@ -31916,41 +31913,43 @@ msgid ""
"We were unable to use your login since the email address {email} is already "
"used for a different account in this system."
msgstr ""
"Non siamo riusciti a utilizzare le tue credenziali di accesso poiché "
"l'indirizzo email {email} è già utilizzato per un altro account in questo "
"sistema."
#: pretix/presale/views/event.py:890
msgid "Unknown event code or not authorized to access this event."
msgstr ""
"Codice evento sconosciuto o non autorizzato ad accedere a questo evento."
#: pretix/presale/views/event.py:897
msgctxt "subevent"
msgid "No date selected."
msgstr "Nessuna data selezionata."
msgstr ""
#: pretix/presale/views/event.py:900
msgctxt "subevent"
msgid "Unknown date selected."
msgstr "Data selezionata sconosciuta."
msgstr ""
#: pretix/presale/views/event.py:925 pretix/presale/views/event.py:933
#: pretix/presale/views/event.py:936
msgid "Please go back and try again."
msgstr "Torna indietro e riprova."
msgstr ""
#: pretix/presale/views/event.py:949
#, fuzzy
#| msgid "Purchased"
msgid "Fake date time"
msgstr "Data e ora errati"
msgstr "Acquistato"
#: pretix/presale/views/event.py:961
#, fuzzy
#| msgid "Unknown order code or not authorized to access this order."
msgid "You are not allowed to access time machine mode."
msgstr "Non ti è consentito accedere alla modalità macchina del tempo."
msgstr "Numero di ordine sconosciuto oppure non autorizzato ad accedere."
#: pretix/presale/views/event.py:963
#, fuzzy
#| msgid "This gift card can only be used in test mode."
msgid "This feature is only available in test mode."
msgstr "This feature is only available in test mode."
msgstr "Questa gift card può essere utilizzata solo in modalità test."
#: pretix/presale/views/event.py:980
#, fuzzy
@@ -31968,16 +31967,17 @@ msgid "The payment is too late to be accepted."
msgstr "Il pagamento è troppo in ritardo per essere accettato."
#: pretix/presale/views/order.py:463
#, fuzzy
msgid "An invoice has been generated."
msgstr "È stata generata una fattura."
msgstr "Il dispositivo è statao creato."
#: pretix/presale/views/order.py:561
msgid "The payment method for this order cannot be changed."
msgstr "Il metodo di pagamento per questo ordine non può essere modificato."
msgstr ""
#: pretix/presale/views/order.py:572
msgid "A payment is currently pending for this order."
msgstr "Al momento è in sospeso un pagamento per questo ordine."
msgstr "Il pagamento è in attesa per questo ordine."
#: pretix/presale/views/order.py:853 pretix/presale/views/order.py:925
msgid "You cannot modify this order"
@@ -32004,8 +32004,6 @@ msgstr ""
#: pretix/presale/views/order.py:1119
msgid "Please click the link we sent you via email to download your tickets."
msgstr ""
"Clicca sul link che ti abbiamo inviato via email per scaricare i tuoi "
"biglietti."
#: pretix/presale/views/order.py:1600
#, python-brace-format
@@ -32013,28 +32011,22 @@ msgid ""
"The order has been changed. You can now proceed by paying the open amount of "
"{amount}."
msgstr ""
"L'ordine è stato modificato. Ora puoi procedere pagando l'importo scoperto "
"di {amount}."
#: pretix/presale/views/order.py:1612
msgid "You did not make any changes."
msgstr "Non hai apportato nessuna modifica."
msgstr ""
#: pretix/presale/views/order.py:1636
msgid "You may not change your order in a way that reduces the total price."
msgstr ""
"Non è possibile modificare l'ordine in modo da ridurre il prezzo totale."
#: pretix/presale/views/order.py:1638
msgid "You may only change your order in a way that increases the total price."
msgstr ""
"È possibile modificare l'ordine solo in modo da aumentare il prezzo totale."
#: pretix/presale/views/order.py:1640
msgid "You may not change your order in a way that changes the total price."
msgstr ""
"Non è possibile modificare l'ordine in modo tale da modificare il prezzo "
"totale."
#: pretix/presale/views/order.py:1642
msgid "You may not change your order in a way that would require a refund."
@@ -32063,14 +32055,10 @@ msgid ""
"{number} hours. If the email did not arrive, please check your spam folder "
"and also double check that you used the correct email address."
msgstr ""
"Se l'indirizzo email inserito è valido e associato a un ticket, ti abbiamo "
"già inviato un'email con un link al tuo ticket nelle ultime {number} ore. Se "
"l'email non è arrivata, controlla la cartella spam e verifica di aver "
"utilizzato l'indirizzo email corretto."
#: pretix/presale/views/user.py:91
msgid "We have trouble sending emails right now, please check back later."
msgstr "Al momento abbiamo problemi con l'invio delle email. Riprova più tardi."
msgstr ""
#: pretix/presale/views/user.py:94
msgid ""
@@ -32091,13 +32079,13 @@ msgid ""
msgstr ""
#: pretix/presale/views/waiting.py:141
#, python-brace-format
#, fuzzy, python-brace-format
msgid ""
"We've added you to the waiting list. We will send an email to {email} as "
"soon as this product gets available again."
msgstr ""
"Ti abbiamo aggiunto alla lista d'attesa. Ti invieremo un'email a {email} non "
"appena i biglietti saranno di nuovo disponibili."
"Ti abbiamo aggiunto alla lista d'attesa. Riceverai un'email non appena i "
"biglietti saranno di nuovo disponibili."
#: pretix/presale/views/waiting.py:169
msgid "We could not find you on our waiting list."
@@ -32141,7 +32129,7 @@ msgstr ""
#: pretix/settings.py:788
msgid "Write access"
msgstr "Accesso in scrittura"
msgstr ""
#: pretix/settings.py:799
msgid "Kosovo"

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-26 11:22+0000\n"
"PO-Revision-Date: 2024-09-27 18:00+0000\n"
"PO-Revision-Date: 2024-08-28 10:03+0000\n"
"Last-Translator: Anarion Dunedain <anarion80@gmail.com>\n"
"Language-Team: Polish <https://translate.pretix.eu/projects/pretix/pretix/pl/"
">\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 5.7.2\n"
"X-Generator: Weblate 5.7\n"
#: pretix/_base_settings.py:79
msgid "English"
@@ -38,7 +38,7 @@ msgstr "Arabski"
#: pretix/_base_settings.py:83
msgid "Basque"
msgstr "Baskijski"
msgstr ""
#: pretix/_base_settings.py:84
msgid "Catalan"
@@ -649,7 +649,7 @@ msgstr "Hasło"
#: pretix/base/auth.py:176 pretix/base/auth.py:183
msgid "Your password must contain both numeric and alphabetic characters."
msgstr "Twoje hasło musi zawierać znaki alfabetyczne i numeryczne."
msgstr ""
#: pretix/base/auth.py:202 pretix/base/auth.py:212
#, python-format
@@ -657,13 +657,9 @@ msgid "Your password may not be the same as your previous password."
msgid_plural ""
"Your password may not be the same as one of your %(history_length)s previous "
"passwords."
msgstr[0] "Twoje hasło nie może być takie samo jak poprzednie hasło."
msgstr[0] ""
msgstr[1] ""
"Twoje hasło nie może być takie samo jak jedno z twoich %(history_length)s "
"poprzednich haseł."
msgstr[2] ""
"Twoje hasło nie może być takie samo jak jedno z twoich %(history_length)s "
"poprzednich haseł."
#: pretix/base/channels.py:168
msgid "Online shop"
@@ -742,8 +738,6 @@ msgid ""
"No supported Token Endpoint Auth Methods supported: "
"{token_endpoint_auth_methods_supported}"
msgstr ""
"Brak wspieranych metod autentykacji tokena: "
"{token_endpoint_auth_methods_supported}"
#: pretix/base/customersso/oidc.py:203 pretix/base/customersso/oidc.py:210
#: pretix/base/customersso/oidc.py:229 pretix/base/customersso/oidc.py:246
@@ -6167,14 +6161,10 @@ msgid ""
"business customers in other EU countries in a way that works for all "
"organizers. Use custom rules instead."
msgstr ""
"Ta funkcja zostanie usunięta w przyszłości, ponieważ nie obsługuje podatku "
"VAT dla klientów niebędących firmami w innych krajach UE w sposób, który "
"działa dla wszystkich organizatorów. Zamiast tego należy użyć reguł "
"niestandardowych."
#: pretix/base/models/tax.py:204
msgid "DEPRECATED"
msgstr "WYCOFANY"
msgstr ""
#: pretix/base/models/tax.py:205
msgid ""
@@ -9547,15 +9537,19 @@ msgid "Show event times and dates on the ticket shop"
msgstr "Pokaż godziny i daty wydarzeń w sklepie z biletami"
#: pretix/base/settings.py:1297
#, fuzzy
#| msgid ""
#| "If disabled, no date or time will be shown on the ticket shop's front "
#| "page. This settings does however not affect the display in other "
#| "locations."
msgid ""
"If disabled, no date or time will be shown on the ticket shop's front page. "
"This settings also affects a few other locations, however it should not be "
"expected that the date of the event is shown nowhere to users."
msgstr ""
"Jeśli opcja ta jest wyłączona, data ani godzina nie będą wyświetlane na "
"stronie głównej sklepu z biletami. To ustawienie ma również wpływ na kilka "
"innych lokalizacji, jednak nie należy oczekiwać, że data wydarzenia nie "
"będzie nigdzie wyświetlana użytkownikom."
"Jeśli opcja ta zostanie wyłączona, na stronie głównej sklepu z biletami nie "
"będzie wyświetlana data ani godzina. To ustawienie nie ma jednak wpływu na "
"wyświetlanie w innych lokalizacjach."
#: pretix/base/settings.py:1308
msgid "Show event end date"
@@ -12998,12 +12992,16 @@ msgid "Subject (if order will not expire automatically)"
msgstr "Temat (jeśli zamówienie nie wygasa automatycznie)"
#: pretix/control/forms/event.py:1146
#, fuzzy
#| msgid "Incomplete payment received: {code}"
msgid "Subject (if an incomplete payment was received)"
msgstr "Temat (jeśli otrzymano niekompletną płatność)"
msgstr "Otrzymana niekompletna płatność: {code}"
#: pretix/control/forms/event.py:1151
#, fuzzy
#| msgid "Incomplete payment received: {code}"
msgid "Text (if an incomplete payment was received)"
msgstr "Tekst (jeśli otrzymano niekompletną płatność)"
msgstr "Otrzymana niekompletna płatność: {code}"
#: pretix/control/forms/event.py:1154
msgid ""
@@ -19329,8 +19327,10 @@ msgstr ""
"doradcą podatkowym."
#: pretix/control/templates/pretixcontrol/event/tax_edit.html:44
#, fuzzy
#| msgid "Customers"
msgid "Custom rules"
msgstr "Reguły niestandardowe"
msgstr "Klienci"
#: pretix/control/templates/pretixcontrol/event/tax_edit.html:46
msgid ""
@@ -26725,8 +26725,6 @@ msgid ""
"The team could not be deleted because the team or one of its API tokens is "
"part of historical audit logs."
msgstr ""
"Zespół nie mógł zostać usunięty, ponieważ zespół lub jeden z jego tokenów "
"API jest częścią historycznych dzienników inspekcji."
#: pretix/control/views/organizer.py:703
msgid ""

View File

@@ -19,33 +19,21 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
from datetime import timedelta
from celery.result import AsyncResult
from django.conf import settings
from django.db import transaction
from django.db.models import QuerySet
from django.http import Http404
from django.shortcuts import get_object_or_404
from django.utils.functional import lazy
from django.utils.timezone import now
from django_scopes import scopes_disabled
from rest_framework import serializers, status, viewsets
from rest_framework.decorators import action
from rest_framework import serializers, viewsets
from rest_framework.exceptions import ValidationError
from rest_framework.response import Response
from rest_framework.reverse import reverse
from pretix.api.serializers.i18n import I18nAwareModelSerializer
from pretix.api.serializers.order import CompatibleJSONField
from ...api.serializers.fields import UploadedFileField
from ...base.models import CachedFile, OrderPosition, SalesChannel
from ...base.models import SalesChannel
from ...base.pdf import PdfLayoutValidator
from ...helpers.http import ChunkBasedFileResponse
from ...multidomain.utils import static_absolute
from .models import TicketLayout, TicketLayoutItem
from .tasks import bulk_render
class ItemAssignmentSerializer(I18nAwareModelSerializer):
@@ -168,123 +156,3 @@ class TicketLayoutItemViewSet(viewsets.ReadOnlyModelViewSet):
**super().get_serializer_context(),
'event': self.request.event,
}
with scopes_disabled():
class RenderJobPartSerializer(serializers.Serializer):
orderposition = serializers.PrimaryKeyRelatedField(
queryset=OrderPosition.objects.none(),
required=True,
allow_null=False,
)
override_layout = serializers.PrimaryKeyRelatedField(
queryset=TicketLayout.objects.none(),
required=False,
allow_null=True,
)
override_channel = serializers.SlugRelatedField(
queryset=SalesChannel.objects.none(),
slug_field='identifier',
required=False,
allow_null=True,
)
class RenderJobSerializer(serializers.Serializer):
parts = RenderJobPartSerializer(many=True)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['parts'].child.fields['orderposition'].queryset = OrderPosition.objects.filter(order__event=self.context['event'])
self.fields['parts'].child.fields['override_layout'].queryset = self.context['event'].ticket_layouts.all()
self.fields['parts'].child.fields['override_channel'].queryset = self.context['event'].organizer.sales_channels.all()
def validate(self, attrs):
if len(attrs["parts"]) > 1000:
raise ValidationError({"parts": ["Please do not submit more than 1000 parts."]})
return super().validate(attrs)
class TicketRendererViewSet(viewsets.ViewSet):
permission = 'can_view_orders'
def get_serializer_kwargs(self):
return {}
def list(self, request, *args, **kwargs):
raise Http404()
def retrieve(self, request, *args, **kwargs):
raise Http404()
def update(self, request, *args, **kwargs):
raise Http404()
def partial_update(self, request, *args, **kwargs):
raise Http404()
def destroy(self, request, *args, **kwargs):
raise Http404()
@action(detail=False, methods=['GET'], url_name='download', url_path='download/(?P<asyncid>[^/]+)/(?P<cfid>[^/]+)')
def download(self, *args, **kwargs):
cf = get_object_or_404(CachedFile, id=kwargs['cfid'])
if cf.file:
resp = ChunkBasedFileResponse(cf.file.file, content_type=cf.type)
resp['Content-Disposition'] = 'attachment; filename="{}"'.format(cf.filename).encode("ascii", "ignore")
return resp
elif not settings.HAS_CELERY:
return Response(
{'status': 'failed', 'message': 'Unknown file ID or export failed'},
status=status.HTTP_410_GONE
)
res = AsyncResult(kwargs['asyncid'])
if res.failed():
if isinstance(res.info, dict) and res.info['exc_type'] == 'ExportError':
msg = res.info['exc_message']
else:
msg = 'Internal error'
return Response(
{'status': 'failed', 'message': msg},
status=status.HTTP_410_GONE
)
return Response(
{
'status': 'running' if res.state in ('PROGRESS', 'STARTED', 'SUCCESS') else 'waiting',
},
status=status.HTTP_409_CONFLICT
)
@action(detail=False, methods=['POST'])
def render_batch(self, *args, **kwargs):
serializer = RenderJobSerializer(data=self.request.data, context={
"event": self.request.event,
})
serializer.is_valid(raise_exception=True)
cf = CachedFile(web_download=False)
cf.date = now()
cf.expires = now() + timedelta(hours=24)
cf.save()
async_result = bulk_render.apply_async(args=(
self.request.event.id,
str(cf.id),
[
{
"orderposition": r["orderposition"].id,
"override_layout": r["override_layout"].id if r.get("override_layout") else None,
"override_channel": r["override_channel"].id if r.get("override_channel") else None,
} for r in serializer.validated_data["parts"]
]
))
url_kwargs = {
'asyncid': str(async_result.id),
'cfid': str(cf.id),
}
url_kwargs.update(self.kwargs)
return Response({
'download': reverse('api-v1:ticketpdfrenderer-download', kwargs=url_kwargs, request=self.request)
}, status=status.HTTP_202_ACCEPTED)

View File

@@ -19,26 +19,18 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
import json
import logging
from io import BytesIO
from django.core.files.base import ContentFile
from django.db.models import Prefetch, prefetch_related_objects
from pypdf import PdfWriter
from pretix.base.models import (
CachedFile, Checkin, Event, EventMetaValue, ItemMetaValue,
ItemVariationMetaValue, OrderPosition, SalesChannel, SubEventMetaValue,
cachedfile_name,
CachedFile, Event, OrderPosition, cachedfile_name,
)
from pretix.base.services.orders import OrderError
from pretix.base.services.tasks import EventTask
from pretix.celery_app import app
from ...base.i18n import language
from ...base.services.export import ExportError
from .models import TicketLayout
from .ticketoutput import PdfTicketOutput
logger = logging.getLogger(__name__)
@@ -54,93 +46,3 @@ def tickets_create_pdf(event: Event, fileid: int, position: int, channel) -> int
file.file.save(cachedfile_name(file, file.filename), ContentFile(data))
file.save()
return file.pk
@app.task(base=EventTask, throws=(OrderError, ExportError,))
def bulk_render(event: Event, fileid: int, parts: list) -> int:
file = CachedFile.objects.get(id=fileid)
channels = SalesChannel.objects.in_bulk([p["override_channel"] for p in parts if p.get("override_channel")])
layouts = TicketLayout.objects.in_bulk([p["override_layout"] for p in parts if p.get("override_layout")])
positions = OrderPosition.objects.all()
prefetch_related_objects([event.organizer], 'meta_properties')
prefetch_related_objects(
[event],
Prefetch('meta_values', queryset=EventMetaValue.objects.select_related('property'),
to_attr='meta_values_cached'),
'questions',
'item_meta_properties',
)
positions = positions.prefetch_related(
Prefetch('checkins', queryset=Checkin.objects.select_related("device")),
Prefetch('item', queryset=event.items.prefetch_related(
Prefetch('meta_values', ItemMetaValue.objects.select_related('property'),
to_attr='meta_values_cached')
)),
'variation',
'answers', 'answers__options', 'answers__question',
'item__category',
'addon_to__answers', 'addon_to__answers__options', 'addon_to__answers__question',
Prefetch('addons', positions.select_related('item', 'variation')),
Prefetch('subevent', queryset=event.subevents.prefetch_related(
Prefetch('meta_values', to_attr='meta_values_cached',
queryset=SubEventMetaValue.objects.select_related('property'))
)),
'linked_media',
Prefetch('order', event.orders.select_related('invoice_address').prefetch_related(
Prefetch(
'positions',
positions.prefetch_related(
Prefetch('checkins', queryset=Checkin.objects.select_related('device')),
Prefetch('item', queryset=event.items.prefetch_related(
Prefetch('meta_values', ItemMetaValue.objects.select_related('property'),
to_attr='meta_values_cached')
)),
Prefetch('variation', queryset=event.items.prefetch_related(
Prefetch('meta_values', ItemVariationMetaValue.objects.select_related('property'),
to_attr='meta_values_cached')
)),
'answers', 'answers__options', 'answers__question',
'item__category',
Prefetch('subevent', queryset=event.subevents.prefetch_related(
Prefetch('meta_values', to_attr='meta_values_cached',
queryset=SubEventMetaValue.objects.select_related('property'))
)),
Prefetch('addons', positions.select_related('item', 'variation', 'seat'))
).select_related('addon_to', 'seat', 'addon_to__seat')
)
))
).select_related(
'addon_to', 'seat', 'addon_to__seat'
)
positions = positions.in_bulk([p["orderposition"] for p in parts])
merger = PdfWriter()
for part in parts:
p = positions[part["orderposition"]]
p.order.event = event # performance optimization
with (language(p.order.locale)):
kwargs = {}
if part.get("override_channel"):
kwargs["override_channel"] = channels[part["override_channel"]].identifier
if part.get("override_layout"):
l = layouts[part["override_layout"]]
kwargs["override_layout"] = json.loads(l.layout)
kwargs["override_background"] = l.background
prov = PdfTicketOutput(
event,
**kwargs,
)
filename, ctype, data = prov.generate(p)
merger.append(ContentFile(data))
outbuffer = BytesIO()
merger.write(outbuffer)
merger.close()
outbuffer.seek(0)
file.type = "application/pdf"
file.file.save(cachedfile_name(file, file.filename), ContentFile(outbuffer.getvalue()))
file.save()
return file.pk

View File

@@ -23,7 +23,7 @@ from django.urls import re_path
from pretix.api.urls import event_router
from pretix.plugins.ticketoutputpdf.api import (
TicketLayoutItemViewSet, TicketLayoutViewSet, TicketRendererViewSet,
TicketLayoutItemViewSet, TicketLayoutViewSet,
)
from pretix.plugins.ticketoutputpdf.views import (
LayoutCreate, LayoutDelete, LayoutEditorView, LayoutGetDefault,
@@ -48,4 +48,3 @@ urlpatterns = [
]
event_router.register('ticketlayouts', TicketLayoutViewSet)
event_router.register('ticketlayoutitems', TicketLayoutItemViewSet)
event_router.register('ticketpdfrenderer', TicketRendererViewSet, basename='ticketpdfrenderer')

View File

@@ -56,7 +56,7 @@ from django.views.generic.base import TemplateResponseMixin
from django_scopes import scopes_disabled
from pretix.base.models import Customer, Membership, Order
from pretix.base.models.items import Question
from pretix.base.models.items import ItemAddOn, ItemVariation, Question
from pretix.base.models.orders import (
InvoiceAddress, OrderPayment, QuestionAnswer,
)
@@ -486,9 +486,33 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
label = pgettext_lazy('checkoutflow', 'Add-on products')
icon = 'puzzle-piece'
def _is_applicable(self, request):
categories = set(ItemAddOn.objects.filter(
base_item_id__in=get_cart(request).values_list("item_id", flat=True)
).values_list("addon_category_id", flat=True))
if not categories:
return False
has_available_addons = (
self.event.items.filter_available(
channel=request.sales_channel,
allow_addons=True
).filter(
variations__isnull=True,
category__in=categories,
).exists() or ItemVariation.objects.filter_available(
channel=request.sales_channel,
allow_addons=True
).filter(
item__event=self.event,
item__category__in=categories,
)
)
return has_available_addons
def is_applicable(self, request):
if not hasattr(request, '_checkoutflow_addons_applicable'):
request._checkoutflow_addons_applicable = get_cart(request).filter(item__addons__isnull=False).exists()
request._checkoutflow_addons_applicable = self._is_applicable(request)
return request._checkoutflow_addons_applicable
def is_completed(self, request, warn=False):

View File

@@ -100,23 +100,10 @@ def get_customer(request):
request._cached_customer = None
else:
session_hash = session.get(hash_session_key)
session_auth_hash = customer.get_session_auth_hash()
session_hash_verified = session_hash and constant_time_compare(
session_hash,
session_auth_hash,
customer.get_session_auth_hash()
)
if not session_hash_verified:
# If the current secret does not verify the session, try
# with the fallback secrets and stop when a matching one is
# found.
if session_hash and any(
constant_time_compare(session_hash, fallback_auth_hash)
for fallback_auth_hash in customer.get_session_auth_fallback_hash()
):
request.session.cycle_key()
request.session[hash_session_key] = session_auth_hash
session_hash_verified = True
if session_hash_verified:
request._cached_customer = customer
else:

View File

@@ -156,10 +156,11 @@ class OrderOpen(EventViewMixin, OrderDetailMixin, View):
def get(self, request, *args, **kwargs):
if not self.order:
raise Http404(_('Unknown order code or not authorized to access this order.'))
if self.order.check_email_confirm_secret(kwargs.get('hash')) and not self.order.email_known_to_work:
self.order.log_action('pretix.event.order.contact.confirmed')
self.order.email_known_to_work = True
self.order.save(update_fields=['email_known_to_work'])
if kwargs.get('hash') == self.order.email_confirm_hash():
if not self.order.email_known_to_work:
self.order.log_action('pretix.event.order.contact.confirmed')
self.order.email_known_to_work = True
self.order.save(update_fields=['email_known_to_work'])
return redirect(self.get_order_url())

View File

@@ -94,13 +94,6 @@ else:
pass # os.chown is not available on Windows
f.write(SECRET_KEY)
SECRET_KEY_FALLBACKS = []
for i in range(10):
if config.has_option('django', f'secret_fallback{i}'):
SECRET_KEY_FALLBACKS.append(config.get('django', f'secret_fallback{i}'))
# Adjustable settings
debug_fallback = "runserver" in sys.argv or "runserver_plus" in sys.argv

View File

@@ -11,7 +11,7 @@
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"rollup": "^2.79.1",
"rollup-plugin-vue": "^5.0.1",
"vue": "^2.7.16",
@@ -1734,13 +1734,14 @@
}
},
"node_modules/@rollup/plugin-node-resolve": {
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz",
"integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==",
"version": "15.2.3",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz",
"integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==",
"dependencies": {
"@rollup/pluginutils": "^5.0.1",
"@types/resolve": "1.20.2",
"deepmerge": "^4.2.2",
"is-builtin-module": "^3.2.1",
"is-module": "^1.0.0",
"resolve": "^1.22.1"
},
@@ -2101,6 +2102,17 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
"node_modules/builtin-modules": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
"integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==",
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/call-bind": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
@@ -2767,6 +2779,20 @@
"node": ">=8"
}
},
"node_modules/is-builtin-module": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
"integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",
"dependencies": {
"builtin-modules": "^3.3.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-core-module": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
@@ -5136,13 +5162,14 @@
}
},
"@rollup/plugin-node-resolve": {
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz",
"integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==",
"version": "15.2.3",
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz",
"integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==",
"requires": {
"@rollup/pluginutils": "^5.0.1",
"@types/resolve": "1.20.2",
"deepmerge": "^4.2.2",
"is-builtin-module": "^3.2.1",
"is-module": "^1.0.0",
"resolve": "^1.22.1"
}
@@ -5390,6 +5417,11 @@
"update-browserslist-db": "^1.1.0"
}
},
"builtin-modules": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz",
"integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw=="
},
"call-bind": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
@@ -5888,6 +5920,14 @@
"binary-extensions": "^2.0.0"
}
},
"is-builtin-module": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
"integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==",
"requires": {
"builtin-modules": "^3.3.0"
}
},
"is-core-module": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",

View File

@@ -7,7 +7,7 @@
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"vue": "^2.7.16",
"rollup": "^2.79.1",
"rollup-plugin-vue": "^5.0.1",

View File

@@ -807,19 +807,6 @@ def test_event_update_plugins_validation(token_client, organizer, event, item, m
)
assert resp.status_code == 200
resp = token_client.patch(
'/api/v1/organizers/{}/events/{}/'.format(organizer.slug, event.slug),
{
"all_sales_channels": False,
"limit_sales_channels": ["web"],
"sales_channels": ["bar"],
},
format='json'
)
assert resp.status_code == 400
assert resp.content.decode() == ('{"limit_sales_channels":["If \'limit_sales_channels\' is set, the legacy '
'attribute \'sales_channels\' must not be set or set to the same list."]}')
@pytest.mark.django_db
def test_event_test_mode(token_client, organizer, event):

View File

@@ -782,59 +782,3 @@ def test_custom_rules_country_rate_subtract_from_gross(event):
rate=Decimal('100.00'),
name='',
)
@pytest.mark.django_db
def test_no_negative_due_to_subtract_from_gross(event):
tr = TaxRule(
event=event,
rate=Decimal("19.00"),
price_includes_tax=True,
)
assert tr.tax(Decimal('100.00'), subtract_from_gross=Decimal('200.00')).gross == Decimal("0.00")
tr = TaxRule(
event=event,
rate=Decimal("0.00"),
price_includes_tax=True,
)
assert tr.tax(Decimal('100.00'), subtract_from_gross=Decimal('200.00')).gross == Decimal("0.00")
tr = TaxRule(
event=event,
rate=Decimal("19.00"),
price_includes_tax=False,
)
assert tr.tax(Decimal('100.00'), subtract_from_gross=Decimal('200.00')).gross == Decimal("0.00")
tr = TaxRule(
event=event,
rate=Decimal("19.00"),
price_includes_tax=True,
)
assert tr.tax(Decimal('100.00'), subtract_from_gross=Decimal('200.00')).gross == Decimal("0.00")
@pytest.mark.django_db
def test_allow_negative(event):
tr = TaxRule(
event=event,
rate=Decimal("19.00"),
price_includes_tax=True,
)
assert tr.tax(Decimal('-100.00')).gross == Decimal("-100.00")
tr = TaxRule(
event=event,
rate=Decimal("0.00"),
price_includes_tax=True,
)
assert tr.tax(Decimal('-100.00')).gross == Decimal("-100.00")
tr = TaxRule(
event=event,
rate=Decimal("19.00"),
price_includes_tax=False,
)
assert tr.tax(Decimal('-100.00')).gross == Decimal("-119.00")
tr = TaxRule(
event=event,
rate=Decimal("19.00"),
price_includes_tax=True,
)
assert tr.tax(Decimal('-100.00')).gross == Decimal("-100.00")

View File

@@ -41,7 +41,7 @@ from django.contrib.auth.tokens import (
PasswordResetTokenGenerator, default_token_generator,
)
from django.core import mail as djmail
from django.test import RequestFactory, TestCase, override_settings
from django.test import TestCase, override_settings
from django.utils.timezone import now
from django_otp.oath import TOTP
from django_otp.plugins.otp_totp.models import TOTPDevice
@@ -50,7 +50,6 @@ from webauthn.authentication.verify_authentication_response import (
)
from pretix.base.models import Organizer, Team, U2FDevice, User
from pretix.control.views.auth import process_login
from pretix.helpers import security
@@ -893,19 +892,6 @@ class SessionTimeOutTest(TestCase):
response = self.client.get('/control/')
self.assertEqual(response.status_code, 302)
def test_plugin_auth_updates_auth_last_used(self):
session = self.client.session
session['pretix_auth_long_session'] = True
session['pretix_auth_login_time'] = int(time.time()) - 3600 * 5
session['pretix_auth_last_used'] = int(time.time()) - 3600 * 3 - 60
session.save()
request = RequestFactory().get("/")
request.session = self.client.session
process_login(request, self.user, keep_logged_in=True)
assert request.session['pretix_auth_last_used'] >= int(time.time()) - 60
def test_update_session_activity(self):
t1 = int(time.time()) - 5
session = self.client.session

View File

@@ -21,8 +21,6 @@
#
import copy
import json
from datetime import timedelta
from decimal import Decimal
import pytest
from django.core.files.base import ContentFile
@@ -30,9 +28,7 @@ from django.utils.timezone import now
from django_scopes import scopes_disabled
from rest_framework.test import APIClient
from pretix.base.models import (
Event, Item, Order, OrderPosition, Organizer, Team,
)
from pretix.base.models import Event, Item, Organizer, Team
from pretix.plugins.ticketoutputpdf.models import TicketLayoutItem
@@ -43,35 +39,14 @@ def env():
organizer=o, name='Dummy', slug='dummy',
date_from=now(), plugins='pretix.plugins.banktransfer'
)
t = Team.objects.create(organizer=event.organizer, can_view_orders=True)
t = Team.objects.create(organizer=event.organizer)
t.limit_events.add(event)
item1 = Item.objects.create(event=event, name="Ticket", default_price=23)
tl = event.ticket_layouts.create(
name="Foo",
default=True,
layout='[{"type": "poweredby", "left": "0", "bottom": "0", "size": "1.00", "content": "dark"}]',
)
tl = event.ticket_layouts.create(name="Foo", default=True, layout='[{"a": 2}]')
TicketLayoutItem.objects.create(layout=tl, item=item1, sales_channel=o.sales_channels.get(identifier="web"))
return event, tl, item1
@pytest.fixture
def position(env):
item = env[0].items.create(name="Ticket", default_price=3, admission=True)
order = Order.objects.create(
code='FOO', event=env[0], email='dummy@dummy.test',
status=Order.STATUS_PAID, locale='en',
datetime=now() - timedelta(days=4),
expires=now() - timedelta(hours=4) + timedelta(days=10),
total=Decimal('23.00'),
sales_channel=env[0].organizer.sales_channels.get(identifier="web"),
)
return OrderPosition.objects.create(
order=order, item=item, variation=None,
price=Decimal("23.00"), attendee_name_parts={"full_name": "Peter"}, positionid=1
)
@pytest.fixture
def client():
return APIClient()
@@ -90,7 +65,7 @@ RES_LAYOUT = {
'name': 'Foo',
'default': True,
'item_assignments': [{'item': 1, 'sales_channel': 'web'}],
'layout': [{"type": "poweredby", "left": "0", "bottom": "0", "size": "1.00", "content": "dark"}],
'layout': [{'a': 2}],
'background': 'http://example.com/static/pretixpresale/pdf/ticket_default_a4.pdf'
}
@@ -238,92 +213,3 @@ def test_api_delete(env, token_client):
)
assert resp.status_code == 204
assert not env[0].ticket_layouts.exists()
@pytest.mark.django_db
def test_renderer_batch_valid(env, token_client, position):
resp = token_client.post(
'/api/v1/organizers/{}/events/{}/ticketpdfrenderer/render_batch/'.format(env[0].slug, env[0].slug),
{
"parts": [
{
"orderposition": position.pk,
},
{
"orderposition": position.pk,
"override_channel": "web",
},
{
"orderposition": position.pk,
"override_layout": env[1].pk,
},
]
},
format='json',
)
assert resp.status_code == 202
assert "download" in resp.data
resp = token_client.get("/" + resp.data["download"].split("/", 3)[3])
assert resp.status_code == 200
assert resp["Content-Type"] == "application/pdf"
@pytest.mark.django_db
def test_renderer_batch_invalid(env, token_client, position):
resp = token_client.post(
'/api/v1/organizers/{}/events/{}/ticketpdfrenderer/render_batch/'.format(env[0].slug, env[0].slug),
{
"parts": [
{
"orderposition": -2,
},
]
},
format='json',
)
assert resp.status_code == 400
assert resp.data == {"parts": [{"orderposition": ["Invalid pk \"-2\" - object does not exist."]}]}
resp = token_client.post(
'/api/v1/organizers/{}/events/{}/ticketpdfrenderer/render_batch/'.format(env[0].slug, env[0].slug),
{
"parts": [
{
"orderposition": position.pk,
"override_layout": -2,
},
]
},
format='json',
)
assert resp.status_code == 400
assert resp.data == {"parts": [{"override_layout": ["Invalid pk \"-2\" - object does not exist."]}]}
resp = token_client.post(
'/api/v1/organizers/{}/events/{}/ticketpdfrenderer/render_batch/'.format(env[0].slug, env[0].slug),
{
"parts": [
{
"orderposition": position.pk,
"override_channel": "magic",
},
]
},
format='json',
)
assert resp.status_code == 400
assert resp.data == {"parts": [{"override_channel": ["Object with identifier=magic does not exist."]}]}
resp = token_client.post(
'/api/v1/organizers/{}/events/{}/ticketpdfrenderer/render_batch/'.format(env[0].slug, env[0].slug),
{
"parts": [
{
"orderposition": position.pk,
}
] * 1002
},
format='json',
)
assert resp.status_code == 400
assert resp.data == {"parts": ["Please do not submit more than 1000 parts."]}

View File

@@ -3654,31 +3654,6 @@ class CartBundleTest(CartTestMixin, TestCase):
assert cp.price == Decimal('0.00')
assert b.price == Decimal('1.50')
@classscope(attr='orga')
def test_voucher_apply_multiple_reduce_beyond_designated_price_no_tax_rules(self):
self.ticket.tax_rule = None
self.ticket.save()
self.trans.tax_rule = None
self.trans.save()
cp = CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=21.5, expires=now() + timedelta(minutes=10)
)
b = CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.trans, addon_to=cp,
price=1.5, expires=now() + timedelta(minutes=10), is_bundled=True
)
v = Voucher.objects.create(
event=self.event, price_mode='set', value=Decimal('0.00'), max_usages=100
)
self.cm.apply_voucher(v.code)
self.cm.commit()
cp.refresh_from_db()
b.refresh_from_db()
assert cp.price == Decimal('0.00')
assert b.price == Decimal('1.50')
@classscope(attr='orga')
def test_voucher_apply_affect_bundled(self):
cp = CartPosition.objects.create(

View File

@@ -628,7 +628,7 @@ def test_change_email(env, client):
@pytest.mark.django_db
def test_change_pw(env, client, client2):
def test_change_pw(env, client):
with scopes_disabled():
customer = env[0].customers.create(email='john@example.org', is_verified=True)
customer.set_password('foo')
@@ -640,12 +640,6 @@ def test_change_pw(env, client, client2):
})
assert r.status_code == 302
r = client2.post('/bigevents/account/login', {
'email': 'john@example.org',
'password': 'foo',
})
assert r.status_code == 302
r = client.post('/bigevents/account/password', {
'password_current': 'invalid',
'password': 'aYLBRNg4',
@@ -664,13 +658,6 @@ def test_change_pw(env, client, client2):
customer.refresh_from_db()
assert customer.check_password('aYLBRNg4')
r = client.get('/bigevents/account/password')
assert r.status_code == 200
# Client 2 got logged out
r = client2.post('/bigevents/account/password')
assert r.status_code == 302
@pytest.mark.django_db
def test_login_per_org(env, client):

View File

@@ -221,7 +221,7 @@ class OrdersTest(BaseOrdersTest):
assert not self.order.email_known_to_work
response = self.client.get(
'/%s/%s/order/%s/%s/open/%s/' % (self.orga.slug, self.event.slug, self.order.code, self.order.secret, self.order.email_confirm_secret())
'/%s/%s/order/%s/%s/open/%s/' % (self.orga.slug, self.event.slug, self.order.code, self.order.secret, self.order.email_confirm_hash())
)
assert response.status_code == 302
self.order.refresh_from_db()