mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 17:19:17 +02:00
Blacked the code
This commit is contained in:
parent
b6fc0051fa
commit
62ca3bd736
279 changed files with 8861 additions and 9527 deletions
|
@ -6,61 +6,43 @@ from . import models
|
|||
@admin.register(models.Actor)
|
||||
class ActorAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'url',
|
||||
'domain',
|
||||
'preferred_username',
|
||||
'type',
|
||||
'creation_date',
|
||||
'last_fetch_date']
|
||||
search_fields = ['url', 'domain', 'preferred_username']
|
||||
list_filter = [
|
||||
'type'
|
||||
"url",
|
||||
"domain",
|
||||
"preferred_username",
|
||||
"type",
|
||||
"creation_date",
|
||||
"last_fetch_date",
|
||||
]
|
||||
search_fields = ["url", "domain", "preferred_username"]
|
||||
list_filter = ["type"]
|
||||
|
||||
|
||||
@admin.register(models.Follow)
|
||||
class FollowAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'actor',
|
||||
'target',
|
||||
'approved',
|
||||
'creation_date'
|
||||
]
|
||||
list_filter = [
|
||||
'approved'
|
||||
]
|
||||
search_fields = ['actor__url', 'target__url']
|
||||
list_display = ["actor", "target", "approved", "creation_date"]
|
||||
list_filter = ["approved"]
|
||||
search_fields = ["actor__url", "target__url"]
|
||||
list_select_related = True
|
||||
|
||||
|
||||
@admin.register(models.Library)
|
||||
class LibraryAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'actor',
|
||||
'url',
|
||||
'creation_date',
|
||||
'fetched_date',
|
||||
'tracks_count']
|
||||
search_fields = ['actor__url', 'url']
|
||||
list_filter = [
|
||||
'federation_enabled',
|
||||
'download_files',
|
||||
'autoimport',
|
||||
]
|
||||
list_display = ["actor", "url", "creation_date", "fetched_date", "tracks_count"]
|
||||
search_fields = ["actor__url", "url"]
|
||||
list_filter = ["federation_enabled", "download_files", "autoimport"]
|
||||
list_select_related = True
|
||||
|
||||
|
||||
@admin.register(models.LibraryTrack)
|
||||
class LibraryTrackAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'title',
|
||||
'artist_name',
|
||||
'album_title',
|
||||
'url',
|
||||
'library',
|
||||
'creation_date',
|
||||
'published_date',
|
||||
"title",
|
||||
"artist_name",
|
||||
"album_title",
|
||||
"url",
|
||||
"library",
|
||||
"creation_date",
|
||||
"published_date",
|
||||
]
|
||||
search_fields = [
|
||||
'library__url', 'url', 'artist_name', 'title', 'album_title']
|
||||
search_fields = ["library__url", "url", "artist_name", "title", "album_title"]
|
||||
list_select_related = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue