Обновил модель пропуска. Добавил индексы
This commit is contained in:
parent
f98b07c003
commit
c871a1c40a
@ -24,3 +24,11 @@ class CheckpointPass(models.Model):
|
||||
car_registration_number = models.CharField(max_length=10)
|
||||
pass_start = models.DateTimeField(default=timezone.now)
|
||||
pass_end = models.DateTimeField(default=calculate_default_pass_end_value)
|
||||
|
||||
class Meta:
|
||||
verbose_name = 'Пропуск'
|
||||
verbose_name_plural = 'Пропуски'
|
||||
indexes = (
|
||||
models.Index(fields=['car_registration_number']),
|
||||
models.Index(fields=['pass_start', 'pass_end'])
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user