mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Discounts: Add applicability date ranges (Z#23151897) (#4927)
* Add event date fields, add preliminary range check * Remove function, use filtered queryset for subevent id limit * Improve and fix date range check * Add formfields * Add tests * Improve tests * Add new fields to API and documentation * Add migration * Change description according to suggestion * Change discount apply signature, remove unnecessary query * Rename new fields, simplify range check * Rename fields in template * Apply suggestions from code review Co-authored-by: Raphael Michel <michel@rami.io> --------- Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.2.19 on 2025-03-18 09:12
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pretixbase', '0278_login_source_add_unique_together'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='discount',
|
||||
name='subevent_date_from',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='discount',
|
||||
name='subevent_date_until',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user