Skip to content

Commit 206a10d

Browse files
Merge branch 'enext' into fix/waiting-list-notifications-clean
2 parents 424b300 + c2a07de commit 206a10d

File tree

6 files changed

+9
-166
lines changed

6 files changed

+9
-166
lines changed

app/eventyay/api/views/order.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,9 @@ def download(self, request, output, **kwargs):
296296
return resp
297297
else:
298298
resp = FileResponse(ct.file.file, content_type=ct.type)
299-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}{}"'.format(
299+
resp['Content-Disposition'] = 'attachment; filename="{}-{}{}"'.format(
300300
self.request.event.slug.upper(),
301301
order.code,
302-
provider.identifier,
303302
ct.extension,
304303
)
305304
return resp
@@ -1094,11 +1093,10 @@ def download(self, request, output, **kwargs):
10941093
return resp
10951094
else:
10961095
resp = FileResponse(ct.file.file, content_type=ct.type)
1097-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}-{}{}"'.format(
1096+
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}{}"'.format(
10981097
self.request.event.slug.upper(),
10991098
pos.order.code,
11001099
pos.positionid,
1101-
provider.identifier,
11021100
ct.extension,
11031101
)
11041102
return resp

app/eventyay/control/views/orders.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,20 +510,18 @@ def success(self, value):
510510
return resp
511511
else:
512512
resp = FileResponse(value.file.file, content_type=value.type)
513-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}-{}{}"'.format(
513+
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}{}"'.format(
514514
self.request.event.slug.upper(),
515515
self.order.code,
516516
self.order_position.positionid,
517-
self.output.identifier,
518517
value.extension,
519518
)
520519
return resp
521520
elif isinstance(value, CachedCombinedTicket):
522521
resp = FileResponse(value.file.file, content_type=value.type)
523-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}{}"'.format(
522+
resp['Content-Disposition'] = 'attachment; filename="{}-{}{}"'.format(
524523
self.request.event.slug.upper(),
525524
self.order.code,
526-
self.output.identifier,
527525
value.extension,
528526
)
529527
return resp

app/eventyay/multidomain/maindomain_urlconf.py

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
# Ticket-video integration: plugin URLs are auto-included via plugin handler below.
2222
from eventyay.config.urls import common_patterns
23-
from eventyay.multidomain import redirects
2423
from eventyay.multidomain.plugin_handler import plugin_event_urls
2524
from eventyay.presale.urls import (
2625
event_patterns,
@@ -32,40 +31,6 @@
3231
WEBAPP_DIST_DIR = os.path.normpath(os.path.join(BASE_DIR, 'static', 'webapp'))
3332
logger = logging.getLogger(__name__)
3433

35-
EXCLUDED_LEGACY_PREFIXES = (
36-
"common",
37-
"control",
38-
"orga",
39-
"admin",
40-
"api",
41-
"video",
42-
"static",
43-
"media",
44-
)
45-
46-
MATCHED_LEGACY_SUBPATHS = (
47-
"schedule",
48-
"talk",
49-
"speaker",
50-
"featured",
51-
"sneak",
52-
"cfp",
53-
"submit",
54-
"me",
55-
"login",
56-
"logout",
57-
"auth",
58-
"reset",
59-
"invitation",
60-
"online-video",
61-
"widgets",
62-
"static",
63-
"locale",
64-
"sw\\.js",
65-
)
66-
67-
EXCLUDED_LEGACY_PREFIXES_REGEX = "|".join(EXCLUDED_LEGACY_PREFIXES)
68-
MATCHED_LEGACY_SUBPATHS_REGEX = "|".join(MATCHED_LEGACY_SUBPATHS)
6934

7035
class VideoSPAView(View):
7136
def get(self, request, *args, **kwargs):
@@ -270,44 +235,12 @@ def get(self, request, path='', *args, **kwargs):
270235
),
271236
]
272237

273-
# Legacy redirect patterns for backward compatibility
274-
legacy_redirect_patterns = [
275-
# Legacy standalone video SPA at /video
276-
re_path(r'^video/assets/(?P<path>.*)$', VideoAssetView.as_view(), name='video.legacy.assets'),
277-
re_path(
278-
r'^video/(?P<path>[^?]*\.[a-zA-Z0-9._-]+)$',
279-
VideoAssetView.as_view(),
280-
name='video.legacy.assets.file',
281-
),
282-
re_path(r'^video/?$', VideoSPAView.as_view(), name='video.legacy.index'),
283-
# Legacy video URLs: /video/<event_identifier> -> /{organizer}/{event}/video
284-
re_path(
285-
r'^video/(?P<event_identifier>(?!assets)[^/]+)(?:/.*)?$',
286-
redirects.legacy_video_redirect,
287-
name='video.legacy.redirect',
288-
),
289-
# Legacy talk URLs: /<event>/(path) -> /{organizer}/{event}/(path)
290-
# This excludes known top-level namespaces before treating the first segment as an event slug.
291-
re_path(
292-
rf'^(?!(?:{EXCLUDED_LEGACY_PREFIXES_REGEX})/)(?P<event_slug>[^/]+)/({MATCHED_LEGACY_SUBPATHS_REGEX})(?:/|$)',
293-
redirects.legacy_talk_redirect,
294-
name='talk.legacy.redirect',
295-
),
296-
# Legacy event base URL: /<event>/ -> /{organizer}/{event}/
297-
re_path(
298-
rf'^(?!(?:{EXCLUDED_LEGACY_PREFIXES_REGEX})/)(?P<event_slug>[^/]+)/$',
299-
redirects.legacy_talk_redirect,
300-
name='talk.legacy.base.redirect',
301-
),
302-
]
303-
304238
urlpatterns = (
305239
common_patterns
306240
+ storage_patterns
307-
# The plugins patterns must be before legacy_redirect_patterns and presale_patterns_main
241+
# The plugins patterns must be before presale_patterns_main
308242
# to avoid misdetection of plugin prefixes and organizer/event slugs.
309243
+ plugin_patterns
310-
+ legacy_redirect_patterns
311244
+ presale_patterns_main
312245
+ unified_event_patterns
313246
)

app/eventyay/multidomain/redirects.py

Lines changed: 0 additions & 83 deletions
This file was deleted.

app/eventyay/presale/views/order.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,29 +1087,26 @@ def success(self, value):
10871087
resp = FileResponse(value.file.file, content_type=value.type)
10881088
if self.order_position.subevent:
10891089
# Subevent date in filename improves accessibility e.g. for screen reader users
1090-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}-{}-{}{}"'.format(
1090+
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}-{}{}"'.format(
10911091
self.request.event.slug.upper(),
10921092
self.order.code,
10931093
self.order_position.positionid,
10941094
self.order_position.subevent.date_from.strftime('%Y_%m_%d'),
1095-
self.output.identifier,
10961095
value.extension,
10971096
)
10981097
else:
1099-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}-{}{}"'.format(
1098+
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}{}"'.format(
11001099
self.request.event.slug.upper(),
11011100
self.order.code,
11021101
self.order_position.positionid,
1103-
self.output.identifier,
11041102
value.extension,
11051103
)
11061104
return resp
11071105
elif isinstance(value, CachedCombinedTicket):
11081106
resp = FileResponse(value.file.file, content_type=value.type)
1109-
resp['Content-Disposition'] = 'attachment; filename="{}-{}-{}{}"'.format(
1107+
resp['Content-Disposition'] = 'attachment; filename="{}-{}{}"'.format(
11101108
self.request.event.slug.upper(),
11111109
self.order.code,
1112-
self.output.identifier,
11131110
value.extension,
11141111
)
11151112
return resp

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies = [
5454
'django-markup',
5555
'markdown==3.10',
5656
'bleach==6.3.*',
57-
'sentry-sdk==2.45.*',
57+
'sentry-sdk==2.46.*',
5858
'babel',
5959
'pycparser==2.22',
6060
'django-redis==5.4.*',

0 commit comments

Comments
 (0)