Skip to content

Commit

Permalink
style(black): black formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmarchd01 committed Jul 18, 2024
1 parent 69f35df commit 94180b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion django/cantusdb_project/main_app/admin/chant.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
class ChantAdmin(BaseModelAdmin):

def get_queryset(self, request):
return super().get_queryset(request).select_related("source__holding_institution", "genre", "office")
return (
super()
.get_queryset(request)
.select_related("source__holding_institution", "genre", "office")
)

@admin.display(description="Source Siglum")
def get_source_siglum(self, obj):
Expand Down
12 changes: 6 additions & 6 deletions django/cantusdb_project/main_app/admin/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
@admin.register(Sequence)
class SequenceAdmin(BaseModelAdmin):
def get_queryset(self, request):
return super().get_queryset(request).select_related("source__holding_institution", "genre", "office")
return (
super()
.get_queryset(request)
.select_related("source__holding_institution", "genre", "office")
)

@admin.display(description="Source Siglum")
def get_source_siglum(self, obj):
Expand All @@ -27,11 +31,7 @@ def get_source_siglum(self, obj):
"is_last_chant_in_feast",
"visible_status",
)
list_display = (
"incipit",
"get_source_siglum",
"genre"
)
list_display = ("incipit", "get_source_siglum", "genre")
list_filter = (
"genre",
"office",
Expand Down
2 changes: 1 addition & 1 deletion django/cantusdb_project/main_app/views/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_context_data(self, **kwargs):

context["source"] = source

# these are needed in the selectors on the left side of the page
# these are needed in the selectors on the left side of the page
context["feasts"] = Feast.objects.all().order_by("name")
context["genres"] = Genre.objects.all().order_by("name")

Expand Down

0 comments on commit 94180b7

Please sign in to comment.