Skip to content

Commit

Permalink
Add Event.start_date index
Browse files Browse the repository at this point in the history
  • Loading branch information
brylie committed Sep 7, 2024
1 parent 424c67f commit e794bab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion events/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.utils import timezone
from django.db import models
from django.db.models import Q
from django.http import Http404, HttpRequest
from django.utils import timezone
from modelcluster.fields import ParentalKey # type: ignore
from timezone_field import TimeZoneField # type: ignore
from wagtail.admin.panels import FieldPanel, InlinePanel, PageChooserPanel
Expand Down Expand Up @@ -109,6 +109,9 @@ class EventCategoryChoices(models.TextChoices):
class Meta:
db_table = "events"
ordering = ["start_date"]
indexes = [
models.Index(fields=["start_date"]),
]


class EventsIndexPage(Page):
Expand Down

0 comments on commit e794bab

Please sign in to comment.