#55: La recherche d'épisode par date ne fonctionne pas #59
|
@ -59,7 +59,8 @@ class EpisodeAdminForm(ModelForm):
|
|||
class EpisodeAdmin(PageAdmin):
|
||||
form = EpisodeAdminForm
|
||||
list_display = PageAdmin.list_display
|
||||
list_filter = PageAdmin.list_filter + ('diffusion__start',)
|
||||
list_filter = tuple(f for f in PageAdmin.list_filter if f != 'pub_date') + \
|
||||
('diffusion__start', 'pub_date')
|
||||
search_fields = PageAdmin.search_fields + ('parent__title',)
|
||||
# readonly_fields = ('parent',)
|
||||
|
||||
|
|
|
@ -17,8 +17,10 @@ class DateFieldFilter(filters.FieldListFilter):
|
|||
self.date_params = {k: v for k, v in params.items()
|
||||
if k.startswith(self.field_generic)}
|
||||
|
||||
exact_lookup = 'date' if isinstance(field, models.DateTimeField) else 'exact'
|
||||
|
||||
# links as: (label, param, input_type|None, value)
|
||||
self.links = [(_('Exact'), self.field_generic + 'exact', self.input_type),
|
||||
self.links = [(_('Exact'), self.field_generic + exact_lookup, self.input_type),
|
||||
(_('Since'), self.field_generic + 'gte', self.input_type),
|
||||
(_('Until'), self.field_generic + 'lte', self.input_type)]
|
||||
if field.null:
|
||||
|
|
|
@ -264,7 +264,7 @@ msgstr "catégorie"
|
|||
|
||||
#: aircox/models/page.py:165
|
||||
msgid "publication date"
|
||||
msgstr "date de publications"
|
||||
msgstr "date de publication"
|
||||
|
||||
#: aircox/models/page.py:167
|
||||
msgid "featured"
|
||||
|
|
Loading…
Reference in New Issue
Block a user