mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Allow ticket output providers to handle downloads externally (#1402)
* TicketOutput-Providers: Make preview optional; download/attachable optional; optional specific target; update doc * Spelling fixes in doc * Changes after code-review * Changes after code-review * Commit missing template file * Allow for redirects instead of files * Return HTTPResponse with Content-Type text/uri-list on API * Update API-doc * Add viewable to spellinglist, fixing doc-test
This commit is contained in:
committed by
Raphael Michel
parent
27538d220e
commit
03c760c2bb
@@ -47,6 +47,9 @@ def generate_order(order: int, provider: str):
|
||||
prov = response(order.event)
|
||||
if prov.identifier == provider:
|
||||
filename, ttype, data = prov.generate_order(order)
|
||||
if ttype == 'text/uri-list':
|
||||
continue
|
||||
|
||||
path, ext = os.path.splitext(filename)
|
||||
for ct in CachedCombinedTicket.objects.filter(order=order, provider=provider):
|
||||
ct.delete()
|
||||
@@ -124,6 +127,9 @@ def get_tickets_for_order(order, base_position=None):
|
||||
if not p.is_enabled:
|
||||
continue
|
||||
|
||||
if p.download_handled_by_frontend:
|
||||
continue
|
||||
|
||||
if p.multi_download_enabled and not base_position:
|
||||
try:
|
||||
if len(positions) == 0:
|
||||
|
||||
Reference in New Issue
Block a user