diff --git a/src/pretix/api/__init__.py b/src/pretix/api/__init__.py
index 3ebe57f21..9fd5bdc50 100644
--- a/src/pretix/api/__init__.py
+++ b/src/pretix/api/__init__.py
@@ -19,15 +19,3 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# .
#
-from django.apps import AppConfig
-
-
-class PretixApiConfig(AppConfig):
- name = 'pretix.api'
- label = 'pretixapi'
-
- def ready(self):
- from . import signals, webhooks # noqa
-
-
-default_app_config = 'pretix.api.PretixApiConfig'
diff --git a/src/pretix/api/apps.py b/src/pretix/api/apps.py
new file mode 100644
index 000000000..2af7c6175
--- /dev/null
+++ b/src/pretix/api/apps.py
@@ -0,0 +1,30 @@
+#
+# This file is part of pretix (Community Edition).
+#
+# Copyright (C) 2014-2020 Raphael Michel and contributors
+# Copyright (C) 2020-2021 rami.io GmbH and contributors
+#
+# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+# Public License as published by the Free Software Foundation in version 3 of the License.
+#
+# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
+# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
+# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
+# this file, see .
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+# .
+#
+from django.apps import AppConfig
+
+
+class PretixApiConfig(AppConfig):
+ name = 'pretix.api'
+ label = 'pretixapi'
+
+ def ready(self):
+ from . import signals, webhooks # noqa
diff --git a/src/pretix/api/middleware.py b/src/pretix/api/middleware.py
index ba81e2a29..81c235472 100644
--- a/src/pretix/api/middleware.py
+++ b/src/pretix/api/middleware.py
@@ -89,7 +89,7 @@ class IdempotencyMiddleware:
call.response_body = json.dumps(resp.data)
else:
call.response_body = repr(resp).encode()
- call.response_headers = json.dumps(resp._headers)
+ call.response_headers = json.dumps(resp.headers._store)
call.locked = None
call.save(update_fields=['locked', 'response_code', 'response_headers',
'response_body'])
diff --git a/src/pretix/api/serializers/cart.py b/src/pretix/api/serializers/cart.py
index aa3f250c5..822b06d90 100644
--- a/src/pretix/api/serializers/cart.py
+++ b/src/pretix/api/serializers/cart.py
@@ -19,6 +19,7 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# .
#
+import os
from datetime import timedelta
from django.core.files import File
@@ -125,9 +126,10 @@ class CartPositionCreateSerializer(I18nAwareModelSerializer):
if isinstance(answ_data['answer'], File):
an = answ_data.pop('answer')
answ = cp.answers.create(**answ_data, answer='')
- answ.file.save(an.name, an, save=False)
+ answ.file.save(os.path.basename(an.name), an, save=False)
answ.answer = 'file://' + answ.file.name
answ.save()
+ an.close()
else:
answ = cp.answers.create(**answ_data)
answ.options.add(*options)
diff --git a/src/pretix/api/serializers/order.py b/src/pretix/api/serializers/order.py
index 806e19b87..e59eb8e77 100644
--- a/src/pretix/api/serializers/order.py
+++ b/src/pretix/api/serializers/order.py
@@ -21,6 +21,7 @@
#
import json
import logging
+import os
from collections import Counter, defaultdict
from decimal import Decimal
@@ -467,7 +468,7 @@ class OrderPositionSerializer(I18nAwareModelSerializer):
if isinstance(answ_data['answer'], File):
an = answ_data.pop('answer')
a = instance.answers.create(**answ_data, answer='')
- a.file.save(an.name, an, save=False)
+ a.file.save(os.path.basename(an.name), an, save=False)
a.answer = 'file://' + a.file.name
a.save()
else:
@@ -1274,7 +1275,7 @@ class OrderCreateSerializer(I18nAwareModelSerializer):
if isinstance(answ_data['answer'], File):
an = answ_data.pop('answer')
answ = pos.answers.create(**answ_data, answer='')
- answ.file.save(an.name, an, save=False)
+ answ.file.save(os.path.basename(an.name), an, save=False)
answ.answer = 'file://' + answ.file.name
answ.save()
else:
diff --git a/src/pretix/api/signals.py b/src/pretix/api/signals.py
index 4dfd59e9f..a44119419 100644
--- a/src/pretix/api/signals.py
+++ b/src/pretix/api/signals.py
@@ -29,9 +29,7 @@ from pretix.api.models import ApiCall, WebHookCall
from pretix.base.signals import periodic_task
from pretix.helpers.periodic import minimum_interval
-register_webhook_events = Signal(
- providing_args=[]
-)
+register_webhook_events = Signal()
"""
This signal is sent out to get all known webhook events. Receivers should return an
instance of a subclass of pretix.api.webhooks.WebhookEvent or a list of such
diff --git a/src/pretix/api/urls.py b/src/pretix/api/urls.py
index 622955562..aab009420 100644
--- a/src/pretix/api/urls.py
+++ b/src/pretix/api/urls.py
@@ -35,7 +35,7 @@
import importlib
from django.apps import apps
-from django.conf.urls import include, url
+from django.conf.urls import include, re_path
from rest_framework import routers
from pretix.api.views import cart
@@ -109,30 +109,30 @@ for app in apps.get_app_configs():
importlib.import_module(app.name + '.urls')
urlpatterns = [
- url(r'^', include(router.urls)),
- url(r'^organizers/(?P[^/]+)/', include(orga_router.urls)),
- url(r'^organizers/(?P[^/]+)/settings/$', organizer.OrganizerSettingsView.as_view(),
- name="organizer.settings"),
- url(r'^organizers/(?P[^/]+)/giftcards/(?P[^/]+)/', include(giftcard_router.urls)),
- url(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/settings/$', event.EventSettingsView.as_view(),
- name="event.settings"),
- url(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/', include(event_router.urls)),
- url(r'^organizers/(?P[^/]+)/teams/(?P[^/]+)/', include(team_router.urls)),
- url(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/items/(?P- [^/]+)/', include(item_router.urls)),
- url(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/questions/(?P[^/]+)/',
- include(question_router.urls)),
- url(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/checkinlists/(?P
[^/]+)/',
- include(checkinlist_router.urls)),
- url(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/orders/(?P[^/]+)/', include(order_router.urls)),
- url(r"^oauth/authorize$", oauth.AuthorizationView.as_view(), name="authorize"),
- url(r"^oauth/token$", oauth.TokenView.as_view(), name="token"),
- url(r"^oauth/revoke_token$", oauth.RevokeTokenView.as_view(), name="revoke-token"),
- url(r"^device/initialize$", device.InitializeView.as_view(), name="device.initialize"),
- url(r"^device/update$", device.UpdateView.as_view(), name="device.update"),
- url(r"^device/roll$", device.RollKeyView.as_view(), name="device.roll"),
- url(r"^device/revoke$", device.RevokeKeyView.as_view(), name="device.revoke"),
- url(r"^device/eventselection$", device.EventSelectionView.as_view(), name="device.eventselection"),
- url(r"^upload$", upload.UploadView.as_view(), name="upload"),
- url(r"^me$", user.MeView.as_view(), name="user.me"),
- url(r"^version$", version.VersionView.as_view(), name="version"),
+ re_path(r'^', include(router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/', include(orga_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/settings/$', organizer.OrganizerSettingsView.as_view(),
+ name="organizer.settings"),
+ re_path(r'^organizers/(?P[^/]+)/giftcards/(?P[^/]+)/', include(giftcard_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/settings/$', event.EventSettingsView.as_view(),
+ name="event.settings"),
+ re_path(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/', include(event_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/teams/(?P[^/]+)/', include(team_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/items/(?P- [^/]+)/', include(item_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/questions/(?P[^/]+)/',
+ include(question_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/checkinlists/(?P
[^/]+)/',
+ include(checkinlist_router.urls)),
+ re_path(r'^organizers/(?P[^/]+)/events/(?P[^/]+)/orders/(?P[^/]+)/', include(order_router.urls)),
+ re_path(r"^oauth/authorize$", oauth.AuthorizationView.as_view(), name="authorize"),
+ re_path(r"^oauth/token$", oauth.TokenView.as_view(), name="token"),
+ re_path(r"^oauth/revoke_token$", oauth.RevokeTokenView.as_view(), name="revoke-token"),
+ re_path(r"^device/initialize$", device.InitializeView.as_view(), name="device.initialize"),
+ re_path(r"^device/update$", device.UpdateView.as_view(), name="device.update"),
+ re_path(r"^device/roll$", device.RollKeyView.as_view(), name="device.roll"),
+ re_path(r"^device/revoke$", device.RevokeKeyView.as_view(), name="device.revoke"),
+ re_path(r"^device/eventselection$", device.EventSelectionView.as_view(), name="device.eventselection"),
+ re_path(r"^upload$", upload.UploadView.as_view(), name="upload"),
+ re_path(r"^me$", user.MeView.as_view(), name="user.me"),
+ re_path(r"^version$", version.VersionView.as_view(), name="version"),
]
diff --git a/src/pretix/api/views/checkin.py b/src/pretix/api/views/checkin.py
index c2750a1be..45da59a2a 100644
--- a/src/pretix/api/views/checkin.py
+++ b/src/pretix/api/views/checkin.py
@@ -22,7 +22,7 @@
import django_filters
from django.core.exceptions import ValidationError
from django.db.models import (
- Count, Exists, F, Max, OuterRef, Prefetch, Q, Subquery,
+ Count, Exists, F, Max, OrderBy, OuterRef, Prefetch, Q, Subquery,
)
from django.db.models.functions import Coalesce
from django.http import Http404
@@ -48,7 +48,6 @@ from pretix.base.models import (
from pretix.base.services.checkin import (
CheckInError, RequiredQuestionsError, SQLLogic, perform_checkin,
)
-from pretix.helpers.database import FixedOrderBy
with scopes_disabled():
class CheckinListFilter(FilterSet):
@@ -239,10 +238,10 @@ class CheckinListPositionViewSet(viewsets.ReadOnlyModelViewSet):
'display_name': Coalesce('attendee_name_cached', 'addon_to__attendee_name_cached')
},
'last_checked_in': {
- '_order': FixedOrderBy(F('last_checked_in'), nulls_first=True),
+ '_order': OrderBy(F('last_checked_in'), nulls_first=True),
},
'-last_checked_in': {
- '_order': FixedOrderBy(F('last_checked_in'), nulls_last=True, descending=True),
+ '_order': OrderBy(F('last_checked_in'), nulls_last=True, descending=True),
},
}
diff --git a/src/pretix/base/__init__.py b/src/pretix/base/__init__.py
index 2acf38a1d..9fd5bdc50 100644
--- a/src/pretix/base/__init__.py
+++ b/src/pretix/base/__init__.py
@@ -19,48 +19,3 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# .
#
-
-# This file is based on an earlier version of pretix which was released under the Apache License 2.0. The full text of
-# the Apache License 2.0 can be obtained at .
-#
-# This file may have since been changed and any changes are released under the terms of AGPLv3 as described above. A
-# full history of changes and contributors is available at .
-#
-# This file contains Apache-licensed contributions copyrighted by: Tobias Kunze
-#
-# Unless required by applicable law or agreed to in writing, software distributed under the Apache License 2.0 is
-# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under the License.
-
-from django.apps import AppConfig
-
-
-class PretixBaseConfig(AppConfig):
- name = 'pretix.base'
- label = 'pretixbase'
-
- def ready(self):
- from . import exporter # NOQA
- from . import payment # NOQA
- from . import exporters # NOQA
- from . import invoice # NOQA
- from . import notifications # NOQA
- from . import email # NOQA
- from .services import auth, checkin, export, mail, tickets, cart, orderimport, orders, invoices, cleanup, update_check, quotas, notifications, vouchers # NOQA
- from django.conf import settings
-
- try:
- from .celery_app import app as celery_app # NOQA
- except ImportError:
- pass
-
- if hasattr(settings, 'RAVEN_CONFIG'):
- from ..sentry import initialize
- initialize()
-
-
-default_app_config = 'pretix.base.PretixBaseConfig'
-try:
- import pretix.celery_app as celery # NOQA
-except ImportError:
- pass
diff --git a/src/pretix/base/apps.py b/src/pretix/base/apps.py
new file mode 100644
index 000000000..c053e71a7
--- /dev/null
+++ b/src/pretix/base/apps.py
@@ -0,0 +1,65 @@
+#
+# This file is part of pretix (Community Edition).
+#
+# Copyright (C) 2014-2020 Raphael Michel and contributors
+# Copyright (C) 2020-2021 rami.io GmbH and contributors
+#
+# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+# Public License as published by the Free Software Foundation in version 3 of the License.
+#
+# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
+# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
+# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
+# this file, see .
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+# .
+#
+
+# This file is based on an earlier version of pretix which was released under the Apache License 2.0. The full text of
+# the Apache License 2.0 can be obtained at .
+#
+# This file may have since been changed and any changes are released under the terms of AGPLv3 as described above. A
+# full history of changes and contributors is available at .
+#
+# This file contains Apache-licensed contributions copyrighted by: Tobias Kunze
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the Apache License 2.0 is
+# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under the License.
+
+from django.apps import AppConfig
+
+
+class PretixBaseConfig(AppConfig):
+ name = 'pretix.base'
+ label = 'pretixbase'
+
+ def ready(self):
+ from . import exporter # NOQA
+ from . import payment # NOQA
+ from . import exporters # NOQA
+ from . import invoice # NOQA
+ from . import notifications # NOQA
+ from . import email # NOQA
+ from .services import auth, checkin, export, mail, tickets, cart, orderimport, orders, invoices, cleanup, update_check, quotas, notifications, vouchers # NOQA
+ from django.conf import settings
+
+ try:
+ from .celery_app import app as celery_app # NOQA
+ except ImportError:
+ pass
+
+ if hasattr(settings, 'RAVEN_CONFIG'):
+ from ..sentry import initialize
+ initialize()
+
+
+try:
+ import pretix.celery_app as celery # NOQA
+except ImportError:
+ pass
diff --git a/src/pretix/base/i18n.py b/src/pretix/base/i18n.py
index 476a1e36e..ba7186ba0 100644
--- a/src/pretix/base/i18n.py
+++ b/src/pretix/base/i18n.py
@@ -107,10 +107,11 @@ ALLOWED_LANGUAGES = dict(settings.LANGUAGES)
def get_babel_locale():
babel_locale = 'en'
# Babel, and therefore django-phonenumberfield, do not support our custom locales such das de_Informal
- if localedata.exists(translation.get_language()):
- babel_locale = translation.get_language()
- elif localedata.exists(translation.get_language()[:2]):
- babel_locale = translation.get_language()[:2]
+ if translation.get_language():
+ if localedata.exists(translation.get_language()):
+ babel_locale = translation.get_language()
+ elif localedata.exists(translation.get_language()[:2]):
+ babel_locale = translation.get_language()[:2]
return babel_locale
diff --git a/src/pretix/base/migrations/0001_squashed_0028_auto_20160816_1242.py b/src/pretix/base/migrations/0001_squashed_0028_auto_20160816_1242.py
index 591f884c7..181de4a92 100644
--- a/src/pretix/base/migrations/0001_squashed_0028_auto_20160816_1242.py
+++ b/src/pretix/base/migrations/0001_squashed_0028_auto_20160816_1242.py
@@ -75,7 +75,7 @@ class Migration(migrations.Migration):
('date', models.DateTimeField(blank=True, null=True)),
('filename', models.CharField(max_length=255)),
('type', models.CharField(max_length=255)),
- ('file', models.FileField(blank=True, null=True, upload_to=pretix.base.models.base.cachedfile_name)),
+ ('file', models.FileField(blank=True, null=True, upload_to=pretix.base.models.base._cachedfile_name)),
],
),
migrations.CreateModel(
diff --git a/src/pretix/base/migrations/0002_auto_20160209_0940.py b/src/pretix/base/migrations/0002_auto_20160209_0940.py
index 5bd5d2ebf..fd885933b 100644
--- a/src/pretix/base/migrations/0002_auto_20160209_0940.py
+++ b/src/pretix/base/migrations/0002_auto_20160209_0940.py
@@ -32,7 +32,7 @@ class Migration(migrations.Migration):
('date', models.DateTimeField(blank=True, null=True)),
('filename', models.CharField(max_length=255)),
('type', models.CharField(max_length=255)),
- ('file', models.FileField(blank=True, null=True, upload_to=pretix.base.models.base.cachedfile_name)),
+ ('file', models.FileField(blank=True, null=True, upload_to=pretix.base.models.base._cachedfile_name)),
],
),
migrations.CreateModel(
diff --git a/src/pretix/base/migrations/0102_auto_20181017_0024.py b/src/pretix/base/migrations/0102_auto_20181017_0024.py
index 945ef0feb..d99394a77 100644
--- a/src/pretix/base/migrations/0102_auto_20181017_0024.py
+++ b/src/pretix/base/migrations/0102_auto_20181017_0024.py
@@ -1,8 +1,8 @@
# Generated by Django 2.1 on 2018-10-17 00:24
-import jsonfallback.fields
+
from django.core.exceptions import ImproperlyConfigured
-from django.db import migrations
+from django.db import migrations, models
from django_mysql.checks import mysql_connections
from django_mysql.utils import connection_is_mariadb
@@ -77,19 +77,19 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='cartposition',
name='attendee_name_parts',
- field=jsonfallback.fields.FallbackJSONField(null=False, default=dict),
+ field=models.JSONField(null=False, default=dict),
preserve_default=False,
),
migrations.AddField(
model_name='orderposition',
name='attendee_name_parts',
- field=jsonfallback.fields.FallbackJSONField(null=False, default=dict),
+ field=models.JSONField(null=False, default=dict),
preserve_default=False,
),
migrations.AddField(
model_name='invoiceaddress',
name='name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
preserve_default=False,
),
migrations.RunPython(set_attendee_name_parts, migrations.RunPython.noop)
diff --git a/src/pretix/base/migrations/0103_auto_20181121_1224.py b/src/pretix/base/migrations/0103_auto_20181121_1224.py
index 5c6b3b78e..de770832c 100644
--- a/src/pretix/base/migrations/0103_auto_20181121_1224.py
+++ b/src/pretix/base/migrations/0103_auto_20181121_1224.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.1 on 2018-11-21 12:24
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0104_auto_20181114_1526.py b/src/pretix/base/migrations/0104_auto_20181114_1526.py
index 31e1119b0..52241a19c 100644
--- a/src/pretix/base/migrations/0104_auto_20181114_1526.py
+++ b/src/pretix/base/migrations/0104_auto_20181114_1526.py
@@ -2,7 +2,6 @@
import django.db.models.deletion
import django.db.models.manager
-import jsonfallback.fields
from django.db import migrations, models
diff --git a/src/pretix/base/migrations/0105_auto_20190112_1512.py b/src/pretix/base/migrations/0105_auto_20190112_1512.py
index aa5bb9010..79060a0ac 100644
--- a/src/pretix/base/migrations/0105_auto_20190112_1512.py
+++ b/src/pretix/base/migrations/0105_auto_20190112_1512.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1 on 2019-01-12 15:12
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0107_auto_20190129_1337.py b/src/pretix/base/migrations/0107_auto_20190129_1337.py
index 187fcc7f9..2ddd14660 100644
--- a/src/pretix/base/migrations/0107_auto_20190129_1337.py
+++ b/src/pretix/base/migrations/0107_auto_20190129_1337.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-01-29 13:37
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0108_auto_20190201_1527.py b/src/pretix/base/migrations/0108_auto_20190201_1527.py
index 30dd42e7d..01fb65a6b 100644
--- a/src/pretix/base/migrations/0108_auto_20190201_1527.py
+++ b/src/pretix/base/migrations/0108_auto_20190201_1527.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-02-01 15:27
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
@@ -17,6 +16,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='item',
name='generate_tickets',
- field=models.NullBooleanField(verbose_name='Allow ticket download'),
+ field=models.BooleanField(verbose_name='Allow ticket download', null=True, blank=True),
),
]
diff --git a/src/pretix/base/migrations/0108_auto_20190201_1527_squashed_0141_seat_sorting_rank.py b/src/pretix/base/migrations/0108_auto_20190201_1527_squashed_0141_seat_sorting_rank.py
index 280f9e1e0..93d0ee8e2 100644
--- a/src/pretix/base/migrations/0108_auto_20190201_1527_squashed_0141_seat_sorting_rank.py
+++ b/src/pretix/base/migrations/0108_auto_20190201_1527_squashed_0141_seat_sorting_rank.py
@@ -3,7 +3,6 @@
from decimal import Decimal
import django.db.models.deletion
-import jsonfallback.fields
from django.conf import settings
from django.core.cache import cache
from django.db import migrations, models
@@ -71,7 +70,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='item',
name='generate_tickets',
- field=models.NullBooleanField(verbose_name='Allow ticket download'),
+ field=models.BooleanField(verbose_name='Allow ticket download', null=True, blank=True),
),
migrations.AddField(
model_name='invoiceline',
@@ -190,7 +189,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='cartposition',
name='attendee_name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='cartposition',
@@ -210,7 +209,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='invoiceaddress',
name='name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='item',
@@ -225,7 +224,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='orderposition',
name='attendee_name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='orderposition',
@@ -338,7 +337,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='item',
name='show_quota_left',
- field=models.NullBooleanField(),
+ field=models.BooleanField(null=True, blank=True),
),
migrations.RenameField(
model_name='question',
diff --git a/src/pretix/base/migrations/0109_auto_20190208_1432.py b/src/pretix/base/migrations/0109_auto_20190208_1432.py
index c7a491115..b72a4c961 100644
--- a/src/pretix/base/migrations/0109_auto_20190208_1432.py
+++ b/src/pretix/base/migrations/0109_auto_20190208_1432.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1 on 2019-02-08 14:32
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0110_auto_20190219_1245.py b/src/pretix/base/migrations/0110_auto_20190219_1245.py
index 92da90819..76cfd55b7 100644
--- a/src/pretix/base/migrations/0110_auto_20190219_1245.py
+++ b/src/pretix/base/migrations/0110_auto_20190219_1245.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-02-19 12:45
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0111_auto_20190219_0949.py b/src/pretix/base/migrations/0111_auto_20190219_0949.py
index 75bea99da..ad296f456 100644
--- a/src/pretix/base/migrations/0111_auto_20190219_0949.py
+++ b/src/pretix/base/migrations/0111_auto_20190219_0949.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-02-19 09:49
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0113_auto_20190312_0942.py b/src/pretix/base/migrations/0113_auto_20190312_0942.py
index 308c69685..4c2f5320f 100644
--- a/src/pretix/base/migrations/0113_auto_20190312_0942.py
+++ b/src/pretix/base/migrations/0113_auto_20190312_0942.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-03-12 09:42
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0114_auto_20190316_1014.py b/src/pretix/base/migrations/0114_auto_20190316_1014.py
index b74854a62..2d81043c9 100644
--- a/src/pretix/base/migrations/0114_auto_20190316_1014.py
+++ b/src/pretix/base/migrations/0114_auto_20190316_1014.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.7 on 2019-03-16 10:14
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0115_auto_20190323_2238.py b/src/pretix/base/migrations/0115_auto_20190323_2238.py
index 6559ab246..72820d062 100644
--- a/src/pretix/base/migrations/0115_auto_20190323_2238.py
+++ b/src/pretix/base/migrations/0115_auto_20190323_2238.py
@@ -3,7 +3,6 @@
from decimal import Decimal
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0116_auto_20190402_0722.py b/src/pretix/base/migrations/0116_auto_20190402_0722.py
index 7d1c5d62a..fc88c0e06 100644
--- a/src/pretix/base/migrations/0116_auto_20190402_0722.py
+++ b/src/pretix/base/migrations/0116_auto_20190402_0722.py
@@ -1,7 +1,6 @@
# Generated by Django 2.1.5 on 2019-04-02 07:22
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0118_auto_20190423_0839.py b/src/pretix/base/migrations/0118_auto_20190423_0839.py
index 94396b97b..839a16fa0 100644
--- a/src/pretix/base/migrations/0118_auto_20190423_0839.py
+++ b/src/pretix/base/migrations/0118_auto_20190423_0839.py
@@ -1,7 +1,6 @@
# Generated by Django 2.2 on 2019-04-23 08:39
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0119_auto_20190509_0654.py b/src/pretix/base/migrations/0119_auto_20190509_0654.py
index e16ba93f1..04246fc8e 100644
--- a/src/pretix/base/migrations/0119_auto_20190509_0654.py
+++ b/src/pretix/base/migrations/0119_auto_20190509_0654.py
@@ -1,7 +1,6 @@
# Generated by Django 2.2 on 2019-05-09 06:54
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
diff --git a/src/pretix/base/migrations/0120_auto_20190509_0736.py b/src/pretix/base/migrations/0120_auto_20190509_0736.py
index c0904e832..17ae129ac 100644
--- a/src/pretix/base/migrations/0120_auto_20190509_0736.py
+++ b/src/pretix/base/migrations/0120_auto_20190509_0736.py
@@ -1,7 +1,6 @@
# Generated by Django 2.2 on 2019-05-09 07:36
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
@@ -17,7 +16,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='cartposition',
name='attendee_name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='cartposition',
@@ -37,7 +36,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='invoiceaddress',
name='name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='item',
@@ -52,7 +51,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='orderposition',
name='attendee_name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='orderposition',
diff --git a/src/pretix/base/migrations/0126_item_show_quota_left.py b/src/pretix/base/migrations/0126_item_show_quota_left.py
index cef78f179..92c0ebc37 100644
--- a/src/pretix/base/migrations/0126_item_show_quota_left.py
+++ b/src/pretix/base/migrations/0126_item_show_quota_left.py
@@ -13,6 +13,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='item',
name='show_quota_left',
- field=models.NullBooleanField(),
+ field=models.BooleanField(null=True, blank=True),
),
]
diff --git a/src/pretix/base/migrations/0152_auto_20200511_1504.py b/src/pretix/base/migrations/0152_auto_20200511_1504.py
index ee514a291..36f2e171c 100644
--- a/src/pretix/base/migrations/0152_auto_20200511_1504.py
+++ b/src/pretix/base/migrations/0152_auto_20200511_1504.py
@@ -2,7 +2,6 @@
import django.db.models.deletion
import django_countries.fields
-import jsonfallback.fields
from django.db import migrations, models
import pretix.helpers.countries
@@ -43,7 +42,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='checkinlist',
name='rules',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AlterUniqueTogether(
name='checkin',
diff --git a/src/pretix/base/migrations/0158_auto_20200724_0754.py b/src/pretix/base/migrations/0158_auto_20200724_0754.py
index 8fbb41b22..3ee8f48db 100644
--- a/src/pretix/base/migrations/0158_auto_20200724_0754.py
+++ b/src/pretix/base/migrations/0158_auto_20200724_0754.py
@@ -16,7 +16,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='cachedfile',
name='file',
- field=models.FileField(max_length=255, null=True, upload_to=pretix.base.models.base.cachedfile_name),
+ field=models.FileField(max_length=255, null=True, upload_to=pretix.base.models.base._cachedfile_name),
),
migrations.AlterField(
model_name='cartposition',
diff --git a/src/pretix/base/migrations/0177_auto_20210301_1510.py b/src/pretix/base/migrations/0177_auto_20210301_1510.py
index 7a2795ed2..f7f4e4220 100644
--- a/src/pretix/base/migrations/0177_auto_20210301_1510.py
+++ b/src/pretix/base/migrations/0177_auto_20210301_1510.py
@@ -1,6 +1,6 @@
# Generated by Django 3.0.10 on 2021-03-01 15:10
-import jsonfallback.fields
+
import phonenumber_field.modelfields
from django.db import migrations, models
@@ -20,7 +20,7 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='waitinglistentry',
name='name_parts',
- field=jsonfallback.fields.FallbackJSONField(default=dict),
+ field=models.JSONField(default=dict),
),
migrations.AddField(
model_name='waitinglistentry',
diff --git a/src/pretix/base/migrations/0184_customer.py b/src/pretix/base/migrations/0184_customer.py
index ad62e0c15..29b27e8bb 100644
--- a/src/pretix/base/migrations/0184_customer.py
+++ b/src/pretix/base/migrations/0184_customer.py
@@ -1,7 +1,6 @@
# Generated by Django 3.0.13 on 2021-04-06 07:25
import django.db.models.deletion
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.base
@@ -28,7 +27,7 @@ class Migration(migrations.Migration):
('email', models.EmailField(db_index=True, max_length=190, null=True)),
('password', models.CharField(max_length=128)),
('name_cached', models.CharField(max_length=255)),
- ('name_parts', jsonfallback.fields.FallbackJSONField(default=dict)),
+ ('name_parts', models.JSONField(default=dict)),
('is_active', models.BooleanField(default=True)),
('is_verified', models.BooleanField(default=True)),
('last_login', models.DateTimeField(blank=True, null=True)),
diff --git a/src/pretix/base/migrations/0185_memberships.py b/src/pretix/base/migrations/0185_memberships.py
index 70d1cab47..fa3774d3b 100644
--- a/src/pretix/base/migrations/0185_memberships.py
+++ b/src/pretix/base/migrations/0185_memberships.py
@@ -2,7 +2,6 @@
import django.db.models.deletion
import i18nfield.fields
-import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.base
@@ -61,7 +60,7 @@ class Migration(migrations.Migration):
('id', models.BigAutoField(primary_key=True, serialize=False)),
('date_start', models.DateTimeField()),
('date_end', models.DateTimeField()),
- ('attendee_name_parts', jsonfallback.fields.FallbackJSONField(default=dict, null=True)),
+ ('attendee_name_parts', models.JSONField(default=dict, null=True)),
('customer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='memberships', to='pretixbase.Customer')),
('granted_in', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='granted_memberships', to='pretixbase.OrderPosition', null=True)),
('membership_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='memberships', to='pretixbase.MembershipType')),
diff --git a/src/pretix/base/models/base.py b/src/pretix/base/models/base.py
index fd55cb82f..cb4b0a5a7 100644
--- a/src/pretix/base/models/base.py
+++ b/src/pretix/base/models/base.py
@@ -36,7 +36,13 @@ from pretix.helpers.json import CustomJSONEncoder
def cachedfile_name(instance, filename: str) -> str:
secret = get_random_string(length=12)
- return 'cachedfiles/%s.%s.%s' % (instance.id, secret, filename.split('.')[-1])
+ return '%s.%s.%s' % (instance.id, secret, filename.split('.')[-1])
+
+
+def _cachedfile_name(instance, filename: str) -> str:
+ # This was previously combined with cachedfile_name in one function, but a security patch for Django introduced
+ # additional file name validation in May 2021, and this was the best way to fix it without breaking plugins.
+ return 'cachedfiles/' + cachedfile_name(instance, filename)
class CachedFile(models.Model):
@@ -48,7 +54,7 @@ class CachedFile(models.Model):
date = models.DateTimeField(null=True, blank=True)
filename = models.CharField(max_length=255)
type = models.CharField(max_length=255)
- file = models.FileField(null=True, blank=True, upload_to=cachedfile_name, max_length=255)
+ file = models.FileField(null=True, blank=True, upload_to=_cachedfile_name, max_length=255)
web_download = models.BooleanField(default=True) # allow web download, True for backwards compatibility in plugins
session_key = models.TextField(null=True, blank=True) # only allow download in this session
diff --git a/src/pretix/base/models/checkin.py b/src/pretix/base/models/checkin.py
index e2f71a05d..4e2f487e7 100644
--- a/src/pretix/base/models/checkin.py
+++ b/src/pretix/base/models/checkin.py
@@ -39,7 +39,6 @@ from django.db.models import Exists, F, Max, OuterRef, Q, Subquery
from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _, pgettext_lazy
from django_scopes import ScopedManager, scopes_disabled
-from jsonfallback.fields import FallbackJSONField
from pretix.base.models import LoggedModel
from pretix.base.models.fields import MultiStringField
@@ -82,7 +81,7 @@ class CheckinList(LoggedModel):
'any of the selected sales channels. This option can be useful when tickets sold at the box office '
'are not checked again before entry and should be considered validated directly upon purchase.')
)
- rules = FallbackJSONField(default=dict, blank=True)
+ rules = models.JSONField(default=dict, blank=True)
objects = ScopedManager(organizer='event__organizer')
diff --git a/src/pretix/base/models/customers.py b/src/pretix/base/models/customers.py
index 1c5a2dd12..ce9d6a586 100644
--- a/src/pretix/base/models/customers.py
+++ b/src/pretix/base/models/customers.py
@@ -27,7 +27,6 @@ from django.db import models
from django.utils.crypto import get_random_string, salted_hmac
from django.utils.translation import gettext_lazy as _
from django_scopes import ScopedManager, scopes_disabled
-from jsonfallback.fields import FallbackJSONField
from pretix.base.banlist import banned
from pretix.base.models.base import LoggedModel
@@ -45,7 +44,7 @@ class Customer(LoggedModel):
email = models.EmailField(db_index=True, null=True, blank=False, verbose_name=_('E-mail'), max_length=190)
password = models.CharField(verbose_name=_('Password'), max_length=128)
name_cached = models.CharField(max_length=255, verbose_name=_('Full name'), blank=True)
- name_parts = FallbackJSONField(default=dict)
+ name_parts = models.JSONField(default=dict)
is_active = models.BooleanField(default=True, verbose_name=_('Account active'))
is_verified = models.BooleanField(default=True, verbose_name=_('Verified email address'))
last_login = models.DateTimeField(verbose_name=_('Last login'), blank=True, null=True)
@@ -60,6 +59,10 @@ class Customer(LoggedModel):
class Meta:
unique_together = [['organizer', 'email']]
+ ordering = ('email',)
+
+ def get_email_field_name(self):
+ return 'email'
def save(self, **kwargs):
if self.email:
diff --git a/src/pretix/base/models/event.py b/src/pretix/base/models/event.py
index ca260bd9f..e552a351f 100644
--- a/src/pretix/base/models/event.py
+++ b/src/pretix/base/models/event.py
@@ -1270,7 +1270,8 @@ class SubEvent(EventMixin, LoggedModel):
).order_by().values('subevent').annotate(items=GroupConcat('item_id', delimiter=',')).values('items'),
output_field=models.TextField(),
),
- Value('')
+ Value(''),
+ output_field=models.TextField()
),
disabled_vars=Coalesce(
Subquery(
@@ -1280,7 +1281,8 @@ class SubEvent(EventMixin, LoggedModel):
).order_by().values('subevent').annotate(items=GroupConcat('variation_id', delimiter=',')).values('items'),
output_field=models.TextField(),
),
- Value('')
+ Value(''),
+ output_field=models.TextField()
)
)
diff --git a/src/pretix/base/models/items.py b/src/pretix/base/models/items.py
index d1480dc41..6204bc666 100644
--- a/src/pretix/base/models/items.py
+++ b/src/pretix/base/models/items.py
@@ -401,7 +401,7 @@ class Item(LoggedModel):
),
default=False
)
- generate_tickets = models.NullBooleanField(
+ generate_tickets = models.BooleanField(
verbose_name=_("Generate tickets"),
blank=True, null=True,
)
@@ -410,7 +410,7 @@ class Item(LoggedModel):
help_text=_("This will only work if waiting lists are enabled for this event."),
default=True
)
- show_quota_left = models.NullBooleanField(
+ show_quota_left = models.BooleanField(
verbose_name=_("Show number of tickets left"),
help_text=_("Publicly show how many tickets are still available."),
blank=True, null=True,
diff --git a/src/pretix/base/models/memberships.py b/src/pretix/base/models/memberships.py
index b47960325..f72880227 100644
--- a/src/pretix/base/models/memberships.py
+++ b/src/pretix/base/models/memberships.py
@@ -27,7 +27,6 @@ from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _
from django_scopes import ScopedManager, scopes_disabled
from i18nfield.fields import I18nCharField
-from jsonfallback.fields import FallbackJSONField
from pretix.base.models import Customer
from pretix.base.models.base import LoggedModel
@@ -59,6 +58,9 @@ class MembershipType(LoggedModel):
null=True, blank=True,
)
+ class Meta:
+ ordering = ('id',)
+
def __str__(self):
return str(self.name)
@@ -87,7 +89,7 @@ class MembershipQuerySet(models.QuerySet):
c=Count('*')
).values('c')
),
- Value('0')
+ Value(0),
)
)
@@ -135,7 +137,7 @@ class Membership(models.Model):
date_end = models.DateTimeField(
verbose_name=_('End date')
)
- attendee_name_parts = FallbackJSONField(default=dict, null=True)
+ attendee_name_parts = models.JSONField(default=dict, null=True)
objects = MembershipQuerySetManager()
diff --git a/src/pretix/base/models/orders.py b/src/pretix/base/models/orders.py
index 8c528508c..1b86ea7e6 100644
--- a/src/pretix/base/models/orders.py
+++ b/src/pretix/base/models/orders.py
@@ -65,7 +65,6 @@ from django.utils.translation import gettext_lazy as _, pgettext_lazy
from django_countries.fields import Country
from django_scopes import ScopedManager, scopes_disabled
from i18nfield.strings import LazyI18nString
-from jsonfallback.fields import FallbackJSONField
from phonenumber_field.modelfields import PhoneNumberField
from phonenumber_field.phonenumber import PhoneNumber
from phonenumbers import NumberParseException
@@ -378,12 +377,12 @@ class Order(LockModel, LoggedModel):
refund_sum=refund_sum_sq,
)
qs = qs.annotate(
- computed_payment_refund_sum=Coalesce(payment_sum_sq, 0) - Coalesce(refund_sum_sq, 0),
+ computed_payment_refund_sum=Coalesce(payment_sum_sq, Decimal('0.00')) - Coalesce(refund_sum_sq, Decimal('0.00')),
)
qs = qs.annotate(
- pending_sum_t=F('total') - Coalesce(payment_sum_sq, 0) + Coalesce(refund_sum_sq, 0),
- pending_sum_rc=-1 * Coalesce(payment_sum_sq, 0) + Coalesce(refund_sum_sq, 0),
+ pending_sum_t=F('total') - Coalesce(payment_sum_sq, Decimal('0.00')) + Coalesce(refund_sum_sq, Decimal('0.00')),
+ pending_sum_rc=-1 * Coalesce(payment_sum_sq, Decimal('0.00')) + Coalesce(refund_sum_sq, Decimal('0.00')),
)
if refunds:
qs = qs.annotate(
@@ -394,23 +393,23 @@ class Order(LockModel, LoggedModel):
qs = qs.annotate(
is_overpaid=Case(
When(~Q(status=Order.STATUS_CANCELED) & Q(pending_sum_t__lt=-1e-8),
- then=Value('1')),
+ then=Value(1)),
When(Q(status=Order.STATUS_CANCELED) & Q(pending_sum_rc__lt=-1e-8),
- then=Value('1')),
- default=Value('0'),
+ then=Value(1)),
+ default=Value(0),
output_field=models.IntegerField()
),
is_pending_with_full_payment=Case(
When(Q(status__in=(Order.STATUS_EXPIRED, Order.STATUS_PENDING)) & Q(pending_sum_t__lte=1e-8)
& Q(require_approval=False),
- then=Value('1')),
- default=Value('0'),
+ then=Value(1)),
+ default=Value(0),
output_field=models.IntegerField()
),
is_underpaid=Case(
When(Q(status=Order.STATUS_PAID) & Q(pending_sum_t__gt=1e-8),
- then=Value('1')),
- default=Value('0'),
+ then=Value(1)),
+ default=Value(0),
output_field=models.IntegerField()
)
)
@@ -1190,7 +1189,7 @@ class AbstractPosition(models.Model):
blank=True, null=True,
help_text=_("Empty, if this product is not an admission ticket")
)
- attendee_name_parts = FallbackJSONField(
+ attendee_name_parts = models.JSONField(
blank=True, default=dict
)
attendee_email = models.EmailField(
@@ -2313,7 +2312,7 @@ class InvoiceAddress(models.Model):
is_business = models.BooleanField(default=False, verbose_name=_('Business customer'))
company = models.CharField(max_length=255, blank=True, verbose_name=_('Company name'))
name_cached = models.CharField(max_length=255, verbose_name=_('Full name'), blank=True)
- name_parts = FallbackJSONField(default=dict)
+ name_parts = models.JSONField(default=dict)
street = models.TextField(verbose_name=_('Address'), blank=False)
zipcode = models.CharField(max_length=30, verbose_name=_('ZIP code'), blank=False)
city = models.CharField(max_length=255, verbose_name=_('City'), blank=False)
diff --git a/src/pretix/base/models/waitinglist.py b/src/pretix/base/models/waitinglist.py
index 5ce850630..b63eead57 100644
--- a/src/pretix/base/models/waitinglist.py
+++ b/src/pretix/base/models/waitinglist.py
@@ -26,7 +26,6 @@ from django.db import models, transaction
from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _, pgettext_lazy
from django_scopes import ScopedManager
-from jsonfallback.fields import FallbackJSONField
from phonenumber_field.modelfields import PhoneNumberField
from pretix.base.email import get_email_context
@@ -66,7 +65,7 @@ class WaitingListEntry(LoggedModel):
verbose_name=_("Name"),
blank=True, null=True,
)
- name_parts = FallbackJSONField(
+ name_parts = models.JSONField(
blank=True, default=dict
)
email = models.EmailField(
diff --git a/src/pretix/base/services/checkin.py b/src/pretix/base/services/checkin.py
index cdd36eab5..5d3e5b7ca 100644
--- a/src/pretix/base/services/checkin.py
+++ b/src/pretix/base/services/checkin.py
@@ -31,7 +31,7 @@
# Unless required by applicable law or agreed to in writing, software distributed under the Apache License 2.0 is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
-
+import os
from datetime import datetime, timedelta
from functools import partial, reduce
@@ -545,7 +545,7 @@ def _save_answers(op, answers, given_answers):
qa = answers[q]
else:
qa = op.answers.create(question=q, answer=str(a))
- qa.file.save(a.name, a, save=False)
+ qa.file.save(os.path.basename(a.name), a, save=False)
qa.answer = 'file://' + qa.file.name
qa.save()
written = True
diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py
index 4c0de5616..b044db101 100644
--- a/src/pretix/base/signals.py
+++ b/src/pretix/base/signals.py
@@ -198,9 +198,7 @@ class DeprecatedSignal(django.dispatch.Signal):
super().connect(receiver, sender=None, weak=True, dispatch_uid=None)
-event_live_issues = EventPluginSignal(
- providing_args=[]
-)
+event_live_issues = EventPluginSignal()
"""
This signal is sent out to determine whether an event can be taken live. If you want to
prevent the event from going live, return a string that will be displayed to the user
@@ -210,9 +208,7 @@ As with all event-plugin signals, the ``sender`` keyword argument will contain t
"""
-register_payment_providers = EventPluginSignal(
- providing_args=[]
-)
+register_payment_providers = EventPluginSignal()
"""
This signal is sent out to get all known payment providers. Receivers should return a
subclass of pretix.base.payment.BasePaymentProvider or a list of these
@@ -220,9 +216,7 @@ subclass of pretix.base.payment.BasePaymentProvider or a list of these
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_mail_placeholders = EventPluginSignal(
- providing_args=[]
-)
+register_mail_placeholders = EventPluginSignal()
"""
This signal is sent out to get all known email text placeholders. Receivers should return
an instance of a subclass of pretix.base.email.BaseMailTextPlaceholder or a list of these.
@@ -230,9 +224,7 @@ an instance of a subclass of pretix.base.email.BaseMailTextPlaceholder or a list
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_html_mail_renderers = EventPluginSignal(
- providing_args=[]
-)
+register_html_mail_renderers = EventPluginSignal()
"""
This signal is sent out to get all known HTML email renderers. Receivers should return a
subclass of pretix.base.email.BaseHTMLMailRenderer or a list of these
@@ -240,9 +232,7 @@ subclass of pretix.base.email.BaseHTMLMailRenderer or a list of these
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_invoice_renderers = EventPluginSignal(
- providing_args=[]
-)
+register_invoice_renderers = EventPluginSignal()
"""
This signal is sent out to get all known invoice renderers. Receivers should return a
subclass of pretix.base.invoice.BaseInvoiceRenderer or a list of these
@@ -250,9 +240,7 @@ subclass of pretix.base.invoice.BaseInvoiceRenderer or a list of these
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_ticket_secret_generators = EventPluginSignal(
- providing_args=[]
-)
+register_ticket_secret_generators = EventPluginSignal()
"""
This signal is sent out to get all known ticket secret generators. Receivers should return a
subclass of ``pretix.base.secrets.BaseTicketSecretGenerator`` or a list of these
@@ -260,9 +248,7 @@ subclass of ``pretix.base.secrets.BaseTicketSecretGenerator`` or a list of these
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_data_shredders = EventPluginSignal(
- providing_args=[]
-)
+register_data_shredders = EventPluginSignal()
"""
This signal is sent out to get all known data shredders. Receivers should return a
subclass of pretix.base.shredder.BaseDataShredder or a list of these
@@ -270,9 +256,7 @@ subclass of pretix.base.shredder.BaseDataShredder or a list of these
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_ticket_outputs = EventPluginSignal(
- providing_args=[]
-)
+register_ticket_outputs = EventPluginSignal()
"""
This signal is sent out to get all known ticket outputs. Receivers should return a
subclass of pretix.base.ticketoutput.BaseTicketOutput
@@ -280,9 +264,7 @@ subclass of pretix.base.ticketoutput.BaseTicketOutput
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_notification_types = EventPluginSignal(
- providing_args=[]
-)
+register_notification_types = EventPluginSignal()
"""
This signal is sent out to get all known notification types. Receivers should return an
instance of a subclass of pretix.base.notifications.NotificationType or a list of such
@@ -293,18 +275,14 @@ however for this signal, the ``sender`` **may also be None** to allow creating t
notification settings!
"""
-register_sales_channels = django.dispatch.Signal(
- providing_args=[]
-)
+register_sales_channels = django.dispatch.Signal()
"""
This signal is sent out to get all known sales channels types. Receivers should return an
instance of a subclass of ``pretix.base.channels.SalesChannel`` or a list of such
instances.
"""
-register_data_exporters = EventPluginSignal(
- providing_args=[]
-)
+register_data_exporters = EventPluginSignal()
"""
This signal is sent out to get all known data exporters. Receivers should return a
subclass of pretix.base.exporter.BaseExporter
@@ -312,10 +290,10 @@ subclass of pretix.base.exporter.BaseExporter
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-register_multievent_data_exporters = django.dispatch.Signal(
- providing_args=["event"]
-)
+register_multievent_data_exporters = django.dispatch.Signal()
"""
+Arguments: ``event``
+
This signal is sent out to get all known data exporters, which support exporting data for
multiple events. Receivers should return a subclass of pretix.base.exporter.BaseExporter
@@ -323,10 +301,11 @@ The ``sender`` keyword argument will contain an organizer.
"""
validate_order = EventPluginSignal(
- providing_args=["payment_provider", "positions", "email", "locale", "invoice_address",
- "meta_info", "customer"]
)
"""
+Arguments: ``payment_provider``, ``positions``, ``email``, ``locale``, ``invoice_address``,
+``meta_info``, ``customer``
+
This signal is sent out when the user tries to confirm the order, before we actually create
the order. It allows you to inspect the cart positions. Your return value will be ignored,
but you can raise an OrderError with an appropriate exception message if you like to block
@@ -335,10 +314,10 @@ the order. We strongly discourage making changes to the order here.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-validate_cart = EventPluginSignal(
- providing_args=["positions"]
-)
+validate_cart = EventPluginSignal()
"""
+Arguments: ``positions``
+
This signal is sent out before the user starts checkout. It includes an iterable
with the current CartPosition objects.
The response of receivers will be ignored, but you can raise a CartError with an
@@ -347,10 +326,10 @@ appropriate exception message.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-validate_cart_addons = EventPluginSignal(
- providing_args=["addons", "base_position", "iao"]
-)
+validate_cart_addons = EventPluginSignal()
"""
+Arguments: ``addons``, ``base_position``, ``iao``
+
This signal is sent when a user tries to select a combination of addons. In contrast to
``validate_cart``, this is executed before the cart is actually modified. You are passed
an argument ``addons`` containing a dict of ``(item, variation or None) → count`` tuples as well
@@ -362,10 +341,10 @@ appropriate exception message.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_placed = EventPluginSignal(
- providing_args=["order"]
-)
+order_placed = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order is placed. The order object is given
as the first argument. This signal is *not* sent out if an order is created through
splitting an existing order, so you can not expect to see all orders by listening
@@ -374,10 +353,10 @@ to this signal.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_paid = EventPluginSignal(
- providing_args=["order"]
-)
+order_paid = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order is paid. The order object is given
as the first argument. This signal is *not* sent out if an order is marked as paid
because an already-paid order has been split.
@@ -385,80 +364,80 @@ because an already-paid order has been split.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_canceled = EventPluginSignal(
- providing_args=["order"]
-)
+order_canceled = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order is canceled. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_reactivated = EventPluginSignal(
- providing_args=["order"]
-)
+order_reactivated = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time a canceled order is reactivated. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_expired = EventPluginSignal(
- providing_args=["order"]
-)
+order_expired = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order is marked as expired. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_modified = EventPluginSignal(
- providing_args=["order"]
-)
+order_modified = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order's information is modified. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_changed = EventPluginSignal(
- providing_args=["order"]
-)
+order_changed = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order's content is changed. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_approved = EventPluginSignal(
- providing_args=["order"]
-)
+order_approved = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order is being approved. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_denied = EventPluginSignal(
- providing_args=["order"]
-)
+order_denied = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time an order is being denied. The order object is given
as the first argument.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-order_gracefully_delete = EventPluginSignal(
- providing_args=["order"]
-)
+order_gracefully_delete = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out every time a test-mode order is being deleted. The order object
is given as the first argument.
@@ -469,10 +448,10 @@ the deletion of the order.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-checkin_created = EventPluginSignal(
- providing_args=["checkin"],
-)
+checkin_created = EventPluginSignal()
"""
+Arguments: ``checkin``
+
This signal is sent out every time a check-in is created (i.e. an order position is marked as
checked in). It is not send if the position was already checked in and is force-checked-in a second time.
The check-in object is given as the first argument
@@ -480,10 +459,10 @@ The check-in object is given as the first argument
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-logentry_display = EventPluginSignal(
- providing_args=["logentry"]
-)
+logentry_display = EventPluginSignal()
"""
+Arguments: ``logentry``
+
To display an instance of the ``LogEntry`` model to a human user,
``pretix.base.signals.logentry_display`` will be sent out with a ``logentry`` argument.
@@ -493,10 +472,10 @@ to the user. The receivers are expected to return plain text.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-logentry_object_link = EventPluginSignal(
- providing_args=["logentry"]
-)
+logentry_object_link = EventPluginSignal()
"""
+Arguments: ``logentry``
+
To display the relationship of an instance of the ``LogEntry`` model to another model
to a human user, ``pretix.base.signals.logentry_object_link`` will be sent out with a
``logentry`` argument.
@@ -521,10 +500,10 @@ Make sure that any user content in the HTML code you return is properly escaped!
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-requiredaction_display = EventPluginSignal(
- providing_args=["action", "request"]
-)
+requiredaction_display = EventPluginSignal()
"""
+Arguments: ``action``, ``request``
+
To display an instance of the ``RequiredAction`` model to a human user,
``pretix.base.signals.requiredaction_display`` will be sent out with a ``action`` argument.
You will also get the current ``request`` in a different argument.
@@ -535,10 +514,10 @@ to the user. The receivers are expected to return HTML code.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-event_copy_data = EventPluginSignal(
- providing_args=["other", "tax_map", "category_map", "item_map", "question_map", "variation_map", "checkin_list_map"]
-)
+event_copy_data = EventPluginSignal()
"""
+Arguments: "other", ``tax_map``, ``category_map``, ``item_map``, ``question_map``, ``variation_map``, ``checkin_list_map``
+
This signal is sent out when a new event is created as a clone of an existing event, i.e.
the settings from the older event are copied to the newer one. You can listen to this
signal to copy data or configuration stored within your plugin's models as well.
@@ -553,10 +532,10 @@ keyword argument will contain the event to **copy from**. The keyword arguments
in the new event of the respective types.
"""
-item_copy_data = EventPluginSignal(
- providing_args=["source", "target"]
-)
+item_copy_data = EventPluginSignal()
"""
+Arguments: ``source``, ``target``
+
This signal is sent out when a new product is created as a clone of an existing product, i.e.
the settings from the older product are copied to the newer one. You can listen to this
signal to copy data or configuration stored within your plugin's models as well.
@@ -580,10 +559,10 @@ All plugins that are installed may send fields for the global settings form, as
an OrderedDict of (setting name, form field).
"""
-order_fee_calculation = EventPluginSignal(
- providing_args=['positions', 'invoice_address', 'meta_info', 'total', 'gift_cards']
-)
+order_fee_calculation = EventPluginSignal()
"""
+Arguments: ``positions``, ``invoice_address``, ``meta_info``, ``total``, ``gift_cards``
+
This signals allows you to add fees to an order while it is being created. You are expected to
return a list of ``OrderFee`` objects that are not yet saved to the database
(because there is no order yet).
@@ -596,10 +575,10 @@ keyword argument will contain the total cart sum without any fees. You should no
the gift cards in use.
"""
-order_fee_type_name = EventPluginSignal(
- providing_args=['request', 'fee']
-)
+order_fee_type_name = EventPluginSignal()
"""
+Arguments: ``request``, ``fee``
+
This signals allows you to return a human-readable description for a fee type based on the ``fee_type``
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.
@@ -607,20 +586,20 @@ 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.
"""
-allow_ticket_download = EventPluginSignal(
- providing_args=['order']
-)
+allow_ticket_download = EventPluginSignal()
"""
+Arguments: ``order``
+
This signal is sent out to check if tickets for an order can be downloaded. If any receiver returns false,
a download will not be offered.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-email_filter = EventPluginSignal(
- providing_args=['message', 'order', 'user']
-)
+email_filter = EventPluginSignal()
"""
+Arguments: ``message``, ``order``, ``user``
+
This signal allows you to implement a middleware-style filter on all outgoing emails. You are expected to
return a (possibly modified) copy of the message object passed to you.
@@ -632,10 +611,10 @@ If the email is associated with a specific user, e.g. a notification email, the
well, otherwise it will be ``None``.
"""
-global_email_filter = GlobalSignal(
- providing_args=['message', 'order', 'user', 'customer', 'organizer']
-)
+global_email_filter = GlobalSignal()
"""
+Arguments: ``message``, ``order``, ``user``, ``customer``, ``organizer``
+
This signal allows you to implement a middleware-style filter on all outgoing emails. You are expected to
return a (possibly modified) copy of the message object passed to you.
@@ -700,10 +679,10 @@ a ``subevent`` argument which might be none and you are expected to return a lis
"""
-quota_availability = EventPluginSignal(
- providing_args=['quota', 'result', 'count_waitinglist']
-)
+quota_availability = EventPluginSignal()
"""
+Arguments: ``quota``, ``result``, ``count_waitinglist``
+
This signal allows you to modify the availability of a quota. You are passed the ``quota`` and an
``availability`` result calculated by pretix code or other plugins. ``availability`` is a tuple
with the first entry being one of the ``Quota.AVAILABILITY_*`` constants and the second entry being
@@ -716,25 +695,23 @@ system really bad.** Also, keep in mind that your response is subject to caching
quotas might be used for display (not for actual order processing).
"""
-order_split = EventPluginSignal(
- providing_args=["original", "split_order"]
-)
+order_split = EventPluginSignal()
"""
+Arguments: ``original``, ``split_order``
+
This signal is sent out when an order is split into two orders and allows you to copy related models
to the new order. You will be passed the old order as ``original`` and the new order as ``split_order``.
"""
-invoice_line_text = EventPluginSignal(
- providing_args=["position"]
-)
+invoice_line_text = EventPluginSignal()
"""
+Arguments: ``position``
+
This signal is sent out when an invoice is built for an order. You can return additional text that
should be shown on the invoice for the given ``position``.
"""
-order_import_columns = EventPluginSignal(
- providing_args=[]
-)
+order_import_columns = EventPluginSignal()
"""
This signal is sent out if the user performs an import of orders from an external source. You can use this
to define additional columns that can be read during import. You are expected to return a list of instances of
@@ -743,10 +720,10 @@ to define additional columns that can be read during import. You are expected to
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-validate_event_settings = EventPluginSignal(
- providing_args=["settings_dict"]
-)
+validate_event_settings = EventPluginSignal()
"""
+Arguments: ``settings_dict``
+
This signal is sent out if the user performs an update of event settings through the API or web interface.
You are passed a ``settings_dict`` dictionary with the new state of the event settings object and are expected
to raise a ``django.core.exceptions.ValidationError`` if the new state is not valid.
@@ -757,9 +734,7 @@ serializer field instead.
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
"""
-api_event_settings_fields = EventPluginSignal(
- providing_args=[]
-)
+api_event_settings_fields = EventPluginSignal()
"""
This signal is sent out to collect serializable settings fields for the API. You are expected to
return a dictionary mapping names of attributes in the settings store to DRF serializer field instances.
diff --git a/src/pretix/base/templatetags/rich_text.py b/src/pretix/base/templatetags/rich_text.py
index 357b7a032..f121af864 100644
--- a/src/pretix/base/templatetags/rich_text.py
+++ b/src/pretix/base/templatetags/rich_text.py
@@ -187,9 +187,9 @@ def markdown_compile_email(source):
class SnippetExtension(markdown.extensions.Extension):
def extendMarkdown(self, md, *args, **kwargs):
- del md.parser.blockprocessors['olist']
- del md.parser.blockprocessors['ulist']
- del md.parser.blockprocessors['quote']
+ md.parser.blockprocessors.deregister('olist')
+ md.parser.blockprocessors.deregister('ulist')
+ md.parser.blockprocessors.deregister('quote')
def markdown_compile(source, snippet=False):
diff --git a/src/pretix/control/__init__.py b/src/pretix/control/__init__.py
index 6edc3b1b7..9fd5bdc50 100644
--- a/src/pretix/control/__init__.py
+++ b/src/pretix/control/__init__.py
@@ -19,29 +19,3 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# .
#
-
-# This file is based on an earlier version of pretix which was released under the Apache License 2.0. The full text of
-# the Apache License 2.0 can be obtained at .
-#
-# This file may have since been changed and any changes are released under the terms of AGPLv3 as described above. A
-# full history of changes and contributors is available at .
-#
-# This file contains Apache-licensed contributions copyrighted by: Tobias Kunze
-#
-# Unless required by applicable law or agreed to in writing, software distributed under the Apache License 2.0 is
-# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under the License.
-
-from django.apps import AppConfig
-
-
-class PretixControlConfig(AppConfig):
- name = 'pretix.control'
- label = 'pretixcontrol'
-
- def ready(self):
- from .views import dashboards # noqa
- from . import logdisplay # noqa
-
-
-default_app_config = 'pretix.control.PretixControlConfig'
diff --git a/src/pretix/control/apps.py b/src/pretix/control/apps.py
new file mode 100644
index 000000000..1b2148618
--- /dev/null
+++ b/src/pretix/control/apps.py
@@ -0,0 +1,44 @@
+#
+# This file is part of pretix (Community Edition).
+#
+# Copyright (C) 2014-2020 Raphael Michel and contributors
+# Copyright (C) 2020-2021 rami.io GmbH and contributors
+#
+# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
+# Public License as published by the Free Software Foundation in version 3 of the License.
+#
+# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
+# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
+# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
+# this file, see .
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
+# .
+#
+
+# This file is based on an earlier version of pretix which was released under the Apache License 2.0. The full text of
+# the Apache License 2.0 can be obtained at .
+#
+# This file may have since been changed and any changes are released under the terms of AGPLv3 as described above. A
+# full history of changes and contributors is available at .
+#
+# This file contains Apache-licensed contributions copyrighted by: Tobias Kunze
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the Apache License 2.0 is
+# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under the License.
+
+from django.apps import AppConfig
+
+
+class PretixControlConfig(AppConfig):
+ name = 'pretix.control'
+ label = 'pretixcontrol'
+
+ def ready(self):
+ from .views import dashboards # noqa
+ from . import logdisplay # noqa
diff --git a/src/pretix/control/forms/filter.py b/src/pretix/control/forms/filter.py
index 111f91848..5edc02f20 100644
--- a/src/pretix/control/forms/filter.py
+++ b/src/pretix/control/forms/filter.py
@@ -40,7 +40,7 @@ from django import forms
from django.apps import apps
from django.conf import settings
from django.db.models import (
- Count, Exists, F, Max, Model, OuterRef, Q, QuerySet,
+ Count, Exists, F, Max, Model, OrderBy, OuterRef, Q, QuerySet,
)
from django.db.models.functions import Coalesce, ExtractWeekDay
from django.urls import reverse, reverse_lazy
@@ -62,7 +62,7 @@ from pretix.base.signals import register_payment_providers
from pretix.control.forms.widgets import Select2
from pretix.control.signals import order_search_filter_q
from pretix.helpers.countries import CachedCountries
-from pretix.helpers.database import FixedOrderBy, rolledback_transaction
+from pretix.helpers.database import rolledback_transaction
from pretix.helpers.dicts import move_to_end
from pretix.helpers.i18n import i18ncomp
@@ -1270,10 +1270,10 @@ class CheckInFilterForm(FilterForm):
'-code': ('-order__code', '-item__name'),
'email': ('order__email', 'item__name'),
'-email': ('-order__email', '-item__name'),
- 'status': (FixedOrderBy(F('last_entry'), nulls_first=True, descending=True), 'order__code'),
- '-status': (FixedOrderBy(F('last_entry'), nulls_last=True), '-order__code'),
- 'timestamp': (FixedOrderBy(F('last_entry'), nulls_first=True), 'order__code'),
- '-timestamp': (FixedOrderBy(F('last_entry'), nulls_last=True, descending=True), '-order__code'),
+ 'status': (OrderBy(F('last_entry'), nulls_first=True, descending=True), 'order__code'),
+ '-status': (OrderBy(F('last_entry'), nulls_last=True), '-order__code'),
+ 'timestamp': (OrderBy(F('last_entry'), nulls_first=True), 'order__code'),
+ '-timestamp': (OrderBy(F('last_entry'), nulls_last=True, descending=True), '-order__code'),
'item': ('item__name', 'variation__value', 'order__code'),
'-item': ('-item__name', '-variation__value', '-order__code'),
'seat': ('seat__sorting_rank', 'seat__guid'),
diff --git a/src/pretix/control/signals.py b/src/pretix/control/signals.py
index bc851e860..00ad50805 100644
--- a/src/pretix/control/signals.py
+++ b/src/pretix/control/signals.py
@@ -36,9 +36,7 @@ from django.dispatch import Signal
from pretix.base.signals import DeprecatedSignal, EventPluginSignal
-html_page_start = Signal(
- providing_args=[]
-)
+html_page_start = Signal()
"""
This signal allows you to put code in the beginning of the main page for every
page in the backend. You are expected to return HTML.
@@ -46,10 +44,10 @@ page in the backend. You are expected to return HTML.
The ``sender`` keyword argument will contain the request.
"""
-html_head = EventPluginSignal(
- providing_args=["request"]
-)
+html_head = EventPluginSignal()
"""
+Arguments: ``request``
+
This signal allows you to put code inside the HTML ```` tag
of every page in the backend. You will get the request as the keyword argument
``request`` and are expected to return plain HTML.
@@ -57,10 +55,10 @@ of every page in the backend. You will get the request as the keyword argument
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-nav_event = EventPluginSignal(
- providing_args=["request"]
-)
+nav_event = EventPluginSignal()
"""
+Arguments: ``request``
+
This signal allows you to add additional views to the admin panel
navigation. You will get the request as a keyword argument ``request``.
Receivers are expected to return a list of dictionaries. The dictionaries
@@ -82,10 +80,10 @@ in pretix.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-nav_topbar = Signal(
- providing_args=["request"]
-)
+nav_topbar = Signal()
"""
+Arguments: ``request``
+
This signal allows you to add additional views to the top navigation bar.
You will get the request as a keyword argument ``request``.
Receivers are expected to return a list of dictionaries. The dictionaries
@@ -101,10 +99,10 @@ This is no ``EventPluginSignal``, so you do not get the event in the ``sender``
and you may get the signal regardless of whether your plugin is active.
"""
-nav_global = Signal(
- providing_args=["request"]
-)
+nav_global = Signal()
"""
+Arguments: ``request``
+
This signal allows you to add additional views to the navigation bar when no event is
selected. You will get the request as a keyword argument ``request``.
Receivers are expected to return a list of dictionaries. The dictionaries
@@ -126,10 +124,10 @@ This is no ``EventPluginSignal``, so you do not get the event in the ``sender``
and you may get the signal regardless of whether your plugin is active.
"""
-event_dashboard_top = EventPluginSignal(
- providing_args=['request']
-)
+event_dashboard_top = EventPluginSignal()
"""
+Arguments: 'request'
+
This signal is sent out to include custom HTML in the top part of the the event dashboard.
Receivers should return HTML.
@@ -137,9 +135,7 @@ As with all plugin signals, the ``sender`` keyword argument will contain the eve
An additional keyword argument ``subevent`` *can* contain a sub-event.
"""
-event_dashboard_widgets = EventPluginSignal(
- providing_args=[]
-)
+event_dashboard_widgets = EventPluginSignal()
"""
This signal is sent out to include widgets in the event dashboard. Receivers
should return a list of dictionaries, where each dictionary can have the keys:
@@ -154,10 +150,10 @@ As with all plugin signals, the ``sender`` keyword argument will contain the eve
An additional keyword argument ``subevent`` *can* contain a sub-event.
"""
-user_dashboard_widgets = Signal(
- providing_args=['user']
-)
+user_dashboard_widgets = Signal()
"""
+Arguments: 'user'
+
This signal is sent out to include widgets in the personal user dashboard. Receivers
should return a list of dictionaries, where each dictionary can have the keys:
@@ -170,20 +166,20 @@ should return a list of dictionaries, where each dictionary can have the keys:
This is a regular django signal (no pretix event signal).
"""
-voucher_form_html = EventPluginSignal(
- providing_args=['form']
-)
+voucher_form_html = EventPluginSignal()
"""
+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.
"""
-voucher_form_class = EventPluginSignal(
- providing_args=['cls']
-)
+voucher_form_class = EventPluginSignal()
"""
+Arguments: ``cls``
+
This signal allows you to replace the form class that is used for modifying vouchers.
You will receive the default form class (or the class set by a previous plugin) in the
``cls`` argument so that you can inherit from it.
@@ -196,10 +192,10 @@ for every batch persisted to the database.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-voucher_form_validation = EventPluginSignal(
- providing_args=['form']
-)
+voucher_form_validation = EventPluginSignal()
"""
+Arguments: 'form'
+
This signal allows you to add additional validation to the form that is used for
creating and modifying vouchers. You will receive the form instance in the ``form``
argument and the current data state in the ``data`` argument.
@@ -207,28 +203,28 @@ argument and the current data state in the ``data`` argument.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-quota_detail_html = EventPluginSignal(
- providing_args=['quota']
-)
+quota_detail_html = EventPluginSignal()
"""
+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.
"""
-organizer_edit_tabs = DeprecatedSignal(
- providing_args=['organizer', 'request']
-)
+organizer_edit_tabs = DeprecatedSignal()
"""
+Arguments: 'organizer', 'request'
+
Deprecated signal, no longer works. We just keep the definition so old plugins don't
break the installation.
"""
-nav_organizer = Signal(
- providing_args=['organizer', 'request']
-)
+nav_organizer = Signal()
"""
+Arguments: 'organizer', 'request'
+
This signal is sent out to include tab links on the detail page of an organizer.
Receivers are expected to return a list of dictionaries. The dictionaries
should contain at least the keys ``label`` and ``url``. You should also return
@@ -249,30 +245,30 @@ This is a regular django signal (no pretix event signal). Receivers will be pass
the keyword arguments ``organizer`` and ``request``.
"""
-order_info = EventPluginSignal(
- providing_args=["order", "request"]
-)
+order_info = EventPluginSignal()
"""
+Arguments: ``order``, ``request``
+
This signal is sent out to display additional information on the order detail page
As with all plugin signals, the ``sender`` keyword argument will contain the event.
Additionally, the argument ``order`` and ``request`` are available.
"""
-order_position_buttons = EventPluginSignal(
- providing_args=["order", "position", "request"]
-)
+order_position_buttons = EventPluginSignal()
"""
+Arguments: ``order``, ``position``, ``request``
+
This signal is sent out to display additional buttons for a single position of an order.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
Additionally, the argument ``order`` and ``request`` are available.
"""
-nav_event_settings = EventPluginSignal(
- providing_args=['request']
-)
+nav_event_settings = EventPluginSignal()
"""
+Arguments: 'request'
+
This signal is sent out to include tab links on the settings page of an event.
Receivers are expected to return a list of dictionaries. The dictionaries
should contain at least the keys ``label`` and ``url``. You should also return
@@ -287,10 +283,10 @@ As with all plugin signals, the ``sender`` keyword argument will contain the eve
A second keyword argument ``request`` will contain the request object.
"""
-event_settings_widget = EventPluginSignal(
- providing_args=['request']
-)
+event_settings_widget = EventPluginSignal()
"""
+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.
@@ -298,10 +294,10 @@ As with all plugin signals, the ``sender`` keyword argument will contain the eve
A second keyword argument ``request`` will contain the request object.
"""
-item_forms = EventPluginSignal(
- providing_args=['request', 'item']
-)
+item_forms = EventPluginSignal()
"""
+Arguments: 'request', 'item'
+
This signal allows you to return additional forms that should be rendered on the product
modification page. You are passed ``request`` and ``item`` arguments and are expected to return
an instance of a form class that you bind yourself when appropriate. Your form will be executed
@@ -311,10 +307,10 @@ styles. It is advisable to set a prefix for your form to avoid clashes with othe
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-item_formsets = EventPluginSignal(
- providing_args=['request', 'item']
-)
+item_formsets = EventPluginSignal()
"""
+Arguments: 'request', 'item'
+
This signal allows you to return additional formsets that should be rendered on the product
modification page. You are passed ``request`` and ``item`` arguments and are expected to return
an instance of a formset class that you bind yourself when appropriate. Your formset will be
@@ -329,10 +325,10 @@ will be passed a ``formset`` variable with your formset.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-subevent_forms = EventPluginSignal(
- providing_args=['request', 'subevent', 'copy_from']
-)
+subevent_forms = EventPluginSignal()
"""
+Arguments: 'request', 'subevent', 'copy_from'
+
This signal allows you to return additional forms that should be rendered on the subevent creation
or modification page. You are passed ``request`` and ``subevent`` arguments and are expected to return
an instance of a form class that you bind yourself when appropriate. Your form will be executed
@@ -346,17 +342,17 @@ creation, ``copy_from`` can be a subevent that is being copied from.
As with all plugin signals, the ``sender`` keyword argument will contain the event.
"""
-oauth_application_registered = Signal(
- providing_args=["user", "application"]
-)
+oauth_application_registered = Signal()
"""
+Arguments: ``user``, ``application``
+
This signal will be called whenever a user registers a new OAuth application.
"""
-order_search_filter_q = Signal(
- providing_args=["query"]
-)
+order_search_filter_q = Signal()
"""
+Arguments: ``query``
+
This signal will be called whenever a free-text order search is performed. You are expected to return one
Q object that will be OR-ed with existing search queries. As order search exists on a global level as well,
this is not an Event signal and will be called even if your plugin is not active. ``sender`` will contain the
@@ -364,10 +360,10 @@ event if the search is performed within an event, and ``None`` otherwise. The se
``query``.
"""
-order_search_forms = EventPluginSignal(
- providing_args=['request']
-)
+order_search_forms = EventPluginSignal()
"""
+Arguments: 'request'
+
This signal allows you to return additional forms that should be rendered in the advanced order search.
You are passed ``request`` argument and are expected to return an instance of a form class that you bind
yourself when appropriate. Your form will be executed as part of the standard validation and rendering
diff --git a/src/pretix/control/urls.py b/src/pretix/control/urls.py
index ca08c6517..b4370c92c 100644
--- a/src/pretix/control/urls.py
+++ b/src/pretix/control/urls.py
@@ -33,7 +33,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under the License.
-from django.conf.urls import include, url
+from django.conf.urls import include, re_path
from django.views.generic.base import RedirectView
from pretix.control.views import (
@@ -43,334 +43,334 @@ from pretix.control.views import (
)
urlpatterns = [
- url(r'^logout$', auth.logout, name='auth.logout'),
- url(r'^login$', auth.login, name='auth.login'),
- url(r'^login/2fa$', auth.Login2FAView.as_view(), name='auth.login.2fa'),
- url(r'^register$', auth.register, name='auth.register'),
- url(r'^invite/(?P[a-zA-Z0-9]+)$', auth.invite, name='auth.invite'),
- url(r'^forgot$', auth.Forgot.as_view(), name='auth.forgot'),
- url(r'^forgot/recover$', auth.Recover.as_view(), name='auth.forgot.recover'),
- url(r'^$', dashboards.user_index, name='index'),
- url(r'^widgets.json$', dashboards.user_index_widgets_lazy, name='index.widgets'),
- url(r'^global/settings/$', global_settings.GlobalSettingsView.as_view(), name='global.settings'),
- url(r'^global/update/$', global_settings.UpdateCheckView.as_view(), name='global.update'),
- url(r'^global/license/$', global_settings.LicenseCheckView.as_view(), name='global.license'),
- url(r'^global/message/$', global_settings.MessageView.as_view(), name='global.message'),
- url(r'^logdetail/$', global_settings.LogDetailView.as_view(), name='global.logdetail'),
- url(r'^logdetail/payment/$', global_settings.PaymentDetailView.as_view(), name='global.paymentdetail'),
- url(r'^logdetail/refund/$', global_settings.RefundDetailView.as_view(), name='global.refunddetail'),
- url(r'^geocode/$', geo.GeoCodeView.as_view(), name='global.geocode'),
- url(r'^reauth/$', user.ReauthView.as_view(), name='user.reauth'),
- url(r'^sudo/$', user.StartStaffSession.as_view(), name='user.sudo'),
- url(r'^sudo/stop/$', user.StopStaffSession.as_view(), name='user.sudo.stop'),
- url(r'^sudo/(?P\d+)/$', user.EditStaffSession.as_view(), name='user.sudo.edit'),
- url(r'^sudo/sessions/$', user.StaffSessionList.as_view(), name='user.sudo.list'),
- url(r'^users/$', users.UserListView.as_view(), name='users'),
- url(r'^users/select2$', typeahead.users_select2, name='users.select2'),
- url(r'^users/add$', users.UserCreateView.as_view(), name='users.add'),
- url(r'^users/impersonate/stop', users.UserImpersonateStopView.as_view(), name='users.impersonate.stop'),
- url(r'^users/(?P\d+)/$', users.UserEditView.as_view(), name='users.edit'),
- url(r'^users/(?P\d+)/reset$', users.UserResetView.as_view(), name='users.reset'),
- url(r'^users/(?P\d+)/impersonate', users.UserImpersonateView.as_view(), name='users.impersonate'),
- url(r'^users/(?P\d+)/anonymize', users.UserAnonymizeView.as_view(), name='users.anonymize'),
- url(r'^pdf/editor/webfonts.css', pdf.FontsCSSView.as_view(), name='pdf.css'),
- url(r'^settings/?$', user.UserSettings.as_view(), name='user.settings'),
- url(r'^settings/history/$', user.UserHistoryView.as_view(), name='user.settings.history'),
- url(r'^settings/notifications/$', user.UserNotificationsEditView.as_view(), name='user.settings.notifications'),
- url(r'^settings/notifications/off/(?P\d+)/(?P[^/]+)/$', user.UserNotificationsDisableView.as_view(),
- name='user.settings.notifications.off'),
- url(r'^settings/oauth/authorized/$', oauth.AuthorizationListView.as_view(),
- name='user.settings.oauth.list'),
- url(r'^settings/oauth/authorized/(?P\d+)/revoke$', oauth.AuthorizationRevokeView.as_view(),
- name='user.settings.oauth.revoke'),
- url(r'^settings/oauth/apps/$', oauth.OAuthApplicationListView.as_view(),
- name='user.settings.oauth.apps'),
- url(r'^settings/oauth/apps/add$', oauth.OAuthApplicationRegistrationView.as_view(),
- name='user.settings.oauth.apps.register'),
- url(r'^settings/oauth/apps/(?P\d+)/$', oauth.OAuthApplicationUpdateView.as_view(),
- name='user.settings.oauth.app'),
- url(r'^settings/oauth/apps/(?P\d+)/disable$', oauth.OAuthApplicationDeleteView.as_view(),
- name='user.settings.oauth.app.disable'),
- url(r'^settings/oauth/apps/(?P\d+)/roll$', oauth.OAuthApplicationRollView.as_view(),
- name='user.settings.oauth.app.roll'),
- url(r'^settings/2fa/$', user.User2FAMainView.as_view(), name='user.settings.2fa'),
- url(r'^settings/2fa/add$', user.User2FADeviceAddView.as_view(), name='user.settings.2fa.add'),
- url(r'^settings/2fa/enable', user.User2FAEnableView.as_view(), name='user.settings.2fa.enable'),
- url(r'^settings/2fa/disable', user.User2FADisableView.as_view(), name='user.settings.2fa.disable'),
- url(r'^settings/2fa/regenemergency', user.User2FARegenerateEmergencyView.as_view(),
- name='user.settings.2fa.regenemergency'),
- url(r'^settings/2fa/totp/(?P[0-9]+)/confirm', user.User2FADeviceConfirmTOTPView.as_view(),
- name='user.settings.2fa.confirm.totp'),
- url(r'^settings/2fa/webauthn/(?P[0-9]+)/confirm', user.User2FADeviceConfirmWebAuthnView.as_view(),
- name='user.settings.2fa.confirm.webauthn'),
- url(r'^settings/2fa/(?P[^/]+)/(?P[0-9]+)/delete', user.User2FADeviceDeleteView.as_view(),
- name='user.settings.2fa.delete'),
- url(r'^organizers/$', organizer.OrganizerList.as_view(), name='organizers'),
- url(r'^organizers/add$', organizer.OrganizerCreate.as_view(), name='organizers.add'),
- url(r'^organizers/select2$', typeahead.organizer_select2, name='organizers.select2'),
- url(r'^organizer/(?P[^/]+)/$', organizer.OrganizerDetail.as_view(), name='organizer'),
- url(r'^organizer/(?P[^/]+)/edit$', organizer.OrganizerUpdate.as_view(), name='organizer.edit'),
- url(r'^organizer/(?P[^/]+)/settings/email$',
- organizer.OrganizerMailSettings.as_view(), name='organizer.settings.mail'),
- url(r'^organizer/(?P[^/]+)/settings/email/preview$',
- organizer.MailSettingsPreview.as_view(), name='organizer.settings.mail.preview'),
- url(r'^organizer/(?P[^/]+)/delete$', organizer.OrganizerDelete.as_view(), name='organizer.delete'),
- url(r'^organizer/(?P[^/]+)/settings/display$', organizer.OrganizerDisplaySettings.as_view(),
- name='organizer.display'),
- url(r'^organizer/(?P[^/]+)/properties$', organizer.EventMetaPropertyListView.as_view(), name='organizer.properties'),
- url(r'^organizer/(?P[^/]+)/property/add$', organizer.EventMetaPropertyCreateView.as_view(),
- name='organizer.property.add'),
- url(r'^organizer/(?P[^/]+)/property/(?P[^/]+)/edit$', organizer.EventMetaPropertyUpdateView.as_view(),
- name='organizer.property.edit'),
- url(r'^organizer/(?P[^/]+)/property/(?P[^/]+)/delete$', organizer.EventMetaPropertyDeleteView.as_view(),
- name='organizer.property.delete'),
- url(r'^organizer/(?P[^/]+)/membershiptypes$', organizer.MembershipTypeListView.as_view(), name='organizer.membershiptypes'),
- url(r'^organizer/(?P[^/]+)/membershiptype/add$', organizer.MembershipTypeCreateView.as_view(),
- name='organizer.membershiptype.add'),
- url(r'^organizer/(?P[^/]+)/membershiptype/(?P[^/]+)/edit$', organizer.MembershipTypeUpdateView.as_view(),
- name='organizer.membershiptype.edit'),
- url(r'^organizer/(?P[^/]+)/membershiptype/(?P[^/]+)/delete$', organizer.MembershipTypeDeleteView.as_view(),
- name='organizer.membershiptype.delete'),
- url(r'^organizer/(?P[^/]+)/customers$', organizer.CustomerListView.as_view(), name='organizer.customers'),
- url(r'^organizer/(?P[^/]+)/customers/select2$', typeahead.customer_select2, name='organizer.customers.select2'),
- url(r'^organizer/(?P[^/]+)/customer/(?P[^/]+)/$',
- organizer.CustomerDetailView.as_view(), name='organizer.customer'),
- url(r'^organizer/(?P[^/]+)/customer/(?P[^/]+)/edit$',
- organizer.CustomerUpdateView.as_view(), name='organizer.customer.edit'),
- url(r'^organizer/(?P[^/]+)/customer/(?P[^/]+)/membership/add$',
- organizer.MembershipCreateView.as_view(), name='organizer.customer.membership.add'),
- url(r'^organizer/(?P[^/]+)/customer/(?P[^/]+)/membership/(?P[^/]+)/edit$',
- organizer.MembershipUpdateView.as_view(), name='organizer.customer.membership.edit'),
- url(r'^organizer/(?P[^/]+)/customer/(?P[^/]+)/anonymize$',
- organizer.CustomerAnonymizeView.as_view(), name='organizer.customer.anonymize'),
- url(r'^organizer/(?P[^/]+)/giftcards$', organizer.GiftCardListView.as_view(), name='organizer.giftcards'),
- url(r'^organizer/(?P[^/]+)/giftcard/add$', organizer.GiftCardCreateView.as_view(), name='organizer.giftcard.add'),
- url(r'^organizer/(?P[^/]+)/giftcard/(?P[^/]+)/$', organizer.GiftCardDetailView.as_view(), name='organizer.giftcard'),
- url(r'^organizer/(?P[^/]+)/giftcard/(?P[^/]+)/edit$', organizer.GiftCardUpdateView.as_view(),
- name='organizer.giftcard.edit'),
- url(r'^organizer/(?P[^/]+)/webhooks$', organizer.WebHookListView.as_view(), name='organizer.webhooks'),
- url(r'^organizer/(?P[^/]+)/webhook/add$', organizer.WebHookCreateView.as_view(),
- name='organizer.webhook.add'),
- url(r'^organizer/(?P[^/]+)/webhook/(?P[^/]+)/edit$', organizer.WebHookUpdateView.as_view(),
- name='organizer.webhook.edit'),
- url(r'^organizer/(?P[^/]+)/webhook/(?P[^/]+)/logs$', organizer.WebHookLogsView.as_view(),
- name='organizer.webhook.logs'),
- url(r'^organizer/(?P[^/]+)/devices$', organizer.DeviceListView.as_view(), name='organizer.devices'),
- url(r'^organizer/(?P[^/]+)/device/add$', organizer.DeviceCreateView.as_view(),
- name='organizer.device.add'),
- url(r'^organizer/(?P[^/]+)/device/(?P[^/]+)/edit$', organizer.DeviceUpdateView.as_view(),
- name='organizer.device.edit'),
- url(r'^organizer/(?P[^/]+)/device/(?P[^/]+)/connect$', organizer.DeviceConnectView.as_view(),
- name='organizer.device.connect'),
- url(r'^organizer/(?P[^/]+)/device/(?P[^/]+)/revoke$', organizer.DeviceRevokeView.as_view(),
- name='organizer.device.revoke'),
- url(r'^organizer/(?P[^/]+)/device/(?P[^/]+)/logs$', organizer.DeviceLogView.as_view(),
- name='organizer.device.logs'),
- url(r'^organizer/(?P[^/]+)/gates$', organizer.GateListView.as_view(), name='organizer.gates'),
- url(r'^organizer/(?P[^/]+)/gate/add$', organizer.GateCreateView.as_view(), name='organizer.gate.add'),
- url(r'^organizer/(?P[^/]+)/gate/(?P[^/]+)/edit$', organizer.GateUpdateView.as_view(),
- name='organizer.gate.edit'),
- url(r'^organizer/(?P[^/]+)/gate/(?P[^/]+)/delete$', organizer.GateDeleteView.as_view(),
- name='organizer.gate.delete'),
- url(r'^organizer/(?P[^/]+)/teams$', organizer.TeamListView.as_view(), name='organizer.teams'),
- url(r'^organizer/(?P[^/]+)/team/add$', organizer.TeamCreateView.as_view(), name='organizer.team.add'),
- url(r'^organizer/(?P[^/]+)/team/(?P[^/]+)/$', organizer.TeamMemberView.as_view(),
- name='organizer.team'),
- url(r'^organizer/(?P[^/]+)/team/(?P[^/]+)/edit$', organizer.TeamUpdateView.as_view(),
- name='organizer.team.edit'),
- url(r'^organizer/(?P[^/]+)/team/(?P[^/]+)/delete$', organizer.TeamDeleteView.as_view(),
- name='organizer.team.delete'),
- url(r'^organizer/(?P[^/]+)/slugrng', main.SlugRNG.as_view(), name='events.add.slugrng'),
- url(r'^organizer/(?P[^/]+)/logs', organizer.LogView.as_view(), name='organizer.log'),
- url(r'^organizer/(?P[^/]+)/export/$', organizer.ExportView.as_view(), name='organizer.export'),
- url(r'^organizer/(?P[^/]+)/export/do$', organizer.ExportDoView.as_view(), name='organizer.export.do'),
- url(r'^nav/typeahead/$', typeahead.nav_context_list, name='nav.typeahead'),
- url(r'^events/$', main.EventList.as_view(), name='events'),
- url(r'^events/add$', main.EventWizard.as_view(), name='events.add'),
- url(r'^events/typeahead/$', typeahead.event_list, name='events.typeahead'),
- url(r'^events/typeahead/meta/$', typeahead.meta_values, name='events.meta.typeahead'),
- url(r'^search/orders/$', search.OrderSearch.as_view(), name='search.orders'),
- url(r'^event/(?P[^/]+)/(?P[^/]+)/', include([
- url(r'^$', dashboards.event_index, name='event.index'),
- url(r'^widgets.json$', dashboards.event_index_widgets_lazy, name='event.index.widgets'),
- url(r'^live/$', event.EventLive.as_view(), name='event.live'),
- url(r'^logs/$', event.EventLog.as_view(), name='event.log'),
- url(r'^delete/$', event.EventDelete.as_view(), name='event.delete'),
- url(r'^requiredactions/$', event.EventActions.as_view(), name='event.requiredactions'),
- url(r'^requiredactions/(?P\d+)/discard$', event.EventActionDiscard.as_view(),
- name='event.requiredaction.discard'),
- url(r'^comment/$', event.EventComment.as_view(),
- name='event.comment'),
- url(r'^quickstart/$', event.QuickSetupView.as_view(), name='event.quick'),
- url(r'^settings/$', event.EventUpdate.as_view(), name='event.settings'),
- url(r'^settings/plugins$', event.EventPlugins.as_view(), name='event.settings.plugins'),
- url(r'^settings/payment/(?P[^/]+)$', event.PaymentProviderSettings.as_view(),
- name='event.settings.payment.provider'),
- url(r'^settings/payment$', event.PaymentSettings.as_view(), name='event.settings.payment'),
- url(r'^settings/tickets$', event.TicketSettings.as_view(), name='event.settings.tickets'),
- url(r'^settings/tickets/preview/(?P