mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-07-06 03:23:55 +02:00
Translate media app
This commit is contained in:
@ -13,21 +13,21 @@ from .models import Auteur, Emprunt, Jeu, Media
|
||||
|
||||
|
||||
class AuteurAdmin(VersionAdmin):
|
||||
list_display = ('nom',)
|
||||
search_fields = ('nom',)
|
||||
list_display = ('name',)
|
||||
search_fields = ('name',)
|
||||
|
||||
|
||||
class MediaAdmin(VersionAdmin):
|
||||
list_display = ('__str__', 'authors_list', 'side_identifier', 'isbn',
|
||||
'external_link')
|
||||
search_fields = ('title', 'authors__nom', 'side_identifier', 'subtitle',
|
||||
search_fields = ('title', 'authors__name', 'side_identifier', 'subtitle',
|
||||
'isbn')
|
||||
autocomplete_fields = ('authors',)
|
||||
date_hierarchy = 'publish_date'
|
||||
form = MediaAdminForm
|
||||
|
||||
def authors_list(self, obj):
|
||||
return ", ".join([a.nom for a in obj.authors.all()])
|
||||
return ", ".join([a.name for a in obj.authors.all()])
|
||||
|
||||
authors_list.short_description = _('authors')
|
||||
|
||||
@ -82,14 +82,14 @@ class EmpruntAdmin(VersionAdmin):
|
||||
_('Turn back')
|
||||
)
|
||||
|
||||
permanencier_rendu_custom.short_description = _('permanencier rendu')
|
||||
permanencier_rendu_custom.short_description = _('given back to')
|
||||
permanencier_rendu_custom.allow_tags = True
|
||||
|
||||
|
||||
class JeuAdmin(VersionAdmin):
|
||||
list_display = ('nom', 'proprietaire', 'duree', 'nombre_joueurs_min',
|
||||
list_display = ('name', 'proprietaire', 'duree', 'nombre_joueurs_min',
|
||||
'nombre_joueurs_max', 'comment')
|
||||
search_fields = ('nom', 'proprietaire__username', 'duree', 'comment')
|
||||
search_fields = ('name', 'proprietaire__username', 'duree', 'comment')
|
||||
autocomplete_fields = ('proprietaire',)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user