mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
Logging
This commit is contained in:
parent
ee41a8ac73
commit
f55d5ef934
1 changed files with 34 additions and 32 deletions
|
@ -56,6 +56,8 @@ class MultiFieldSortableChangeList(admin.views.main.ChangeList):
|
|||
Mostly identical to the base implementation, except that now it can return
|
||||
a list of order_field objects rather than just one.
|
||||
"""
|
||||
logger.info("timing get_ordering")
|
||||
with Timer() as t:
|
||||
params = self.params
|
||||
ordering = list(self.model_admin.get_ordering(request) or self._get_default_ordering())
|
||||
|
||||
|
@ -913,14 +915,14 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
|||
# lists in filter_horizontal are not sorted properly, sort them
|
||||
# by website
|
||||
def formfield_for_manytomany(self, db_field, request, **kwargs):
|
||||
logger.info("timing formfield_for_manytomany")
|
||||
logger.info(f"timing formfield_for_manytomany -> {db_field.name}")
|
||||
with Timer() as t:
|
||||
if db_field.name in {"current_websites", "alternative_domains"}:
|
||||
kwargs["queryset"] = models.Website.objects.all().order_by("website") # Sort websites
|
||||
return super().formfield_for_manytomany(db_field, request, **kwargs)
|
||||
|
||||
def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
logger.info("timing formfield_for_foreignkey")
|
||||
logger.info(f"timing formfield_for_foreignkey -> {db_field.name}")
|
||||
with Timer() as t:
|
||||
# Removes invalid investigator options from the investigator dropdown
|
||||
if db_field.name == "investigator":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue