mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
25 lines
697 B
Python
25 lines
697 B
Python
from django.db import models
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from pretix.base.models import BaseRestriction
|
|
|
|
|
|
class TimeRestriction(BaseRestriction):
|
|
"""
|
|
This restriction makes an item or variation only available
|
|
within a given time frame. The price of the item can be modified
|
|
during this time frame.
|
|
"""
|
|
|
|
timeframe_from = models.DateTimeField(
|
|
verbose_name=_("Start of time frame"),
|
|
)
|
|
timeframe_to = models.DateTimeField(
|
|
verbose_name=_("End of time frame"),
|
|
)
|
|
price = models.DecimalField(
|
|
null=True, blank=True,
|
|
max_digits=7, decimal_places=2,
|
|
verbose_name=_("Price in time frame"),
|
|
)
|