mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 09:37:03 +02:00
Black formatting
This commit is contained in:
parent
c01b241ea3
commit
7a534bb774
2 changed files with 20 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
||||||
"""Permissions-related mixin classes."""
|
"""Permissions-related mixin classes."""
|
||||||
|
|
||||||
|
from typing import List
|
||||||
from django.contrib.auth.mixins import PermissionRequiredMixin
|
from django.contrib.auth.mixins import PermissionRequiredMixin
|
||||||
|
|
||||||
from registrar.models import (
|
from registrar.models import (
|
||||||
|
@ -19,8 +20,9 @@ class OrderableFieldsMixin:
|
||||||
"""
|
"""
|
||||||
Mixin to add multi-field ordering capabilities to a Django ModelAdmin on admin_order_field.
|
Mixin to add multi-field ordering capabilities to a Django ModelAdmin on admin_order_field.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
custom_sort_name_prefix = "get_sortable_"
|
custom_sort_name_prefix = "get_sortable_"
|
||||||
orderable_fk_fields = []
|
orderable_fk_fields: List[(str, List[str])] = []
|
||||||
|
|
||||||
def __new__(cls, *args, **kwargs):
|
def __new__(cls, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
@ -101,6 +103,7 @@ class OrderableFieldsMixin:
|
||||||
Django should sort by when the column is clicked in the admin interface.
|
Django should sort by when the column is clicked in the admin interface.
|
||||||
short_description: A string used as the column header in the admin interface. Will replace underscores with spaces.
|
short_description: A string used as the column header in the admin interface. Will replace underscores with spaces.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def method(obj):
|
def method(obj):
|
||||||
"""
|
"""
|
||||||
Template method for patterning.
|
Template method for patterning.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue