Compare commits

..

No commits in common. "dfc8f6a09ce2bbd38eda4415ce6054520d2a63e7" and "9c147b2a6d551bf44606093c5d2e09ffc6892ac0" have entirely different histories.

4 changed files with 5 additions and 8 deletions

View File

@ -59,8 +59,7 @@ class EpisodeAdminForm(ModelForm):
class EpisodeAdmin(PageAdmin): class EpisodeAdmin(PageAdmin):
form = EpisodeAdminForm form = EpisodeAdminForm
list_display = PageAdmin.list_display list_display = PageAdmin.list_display
list_filter = tuple(f for f in PageAdmin.list_filter if f != 'pub_date') + \ list_filter = PageAdmin.list_filter + ('diffusion__start',)
('diffusion__start', 'pub_date')
search_fields = PageAdmin.search_fields + ('parent__title',) search_fields = PageAdmin.search_fields + ('parent__title',)
# readonly_fields = ('parent',) # readonly_fields = ('parent',)

View File

@ -17,10 +17,8 @@ class DateFieldFilter(filters.FieldListFilter):
self.date_params = {k: v for k, v in params.items() self.date_params = {k: v for k, v in params.items()
if k.startswith(self.field_generic)} if k.startswith(self.field_generic)}
exact_lookup = 'date' if isinstance(field, models.DateTimeField) else 'exact'
# links as: (label, param, input_type|None, value) # links as: (label, param, input_type|None, value)
self.links = [(_('Exact'), self.field_generic + exact_lookup, self.input_type), self.links = [(_('Exact'), self.field_generic + 'exact', self.input_type),
(_('Since'), self.field_generic + 'gte', self.input_type), (_('Since'), self.field_generic + 'gte', self.input_type),
(_('Until'), self.field_generic + 'lte', self.input_type)] (_('Until'), self.field_generic + 'lte', self.input_type)]
if field.null: if field.null:

View File

@ -264,7 +264,7 @@ msgstr "catégorie"
#: aircox/models/page.py:165 #: aircox/models/page.py:165
msgid "publication date" msgid "publication date"
msgstr "date de publication" msgstr "date de publications"
#: aircox/models/page.py:167 #: aircox/models/page.py:167
msgid "featured" msgid "featured"

View File

@ -10,9 +10,9 @@
onsubmit="return this.{{ choice.name }}.value ? true : false""> onsubmit="return this.{{ choice.name }}.value ? true : false"">
<label for="filter-{{ choice.name }}">{{ choice.label }}: </label> <label for="filter-{{ choice.name }}">{{ choice.label }}: </label>
<input id="filter-{{ choice.name }}" type="{{ choice.type }}" name="{{ choice.name }}" <input id="filter-{{ choice.name }}" type="{{ choice.type }}" name="{{ choice.name }}"
value="{{ choice.value }}" {{ choice.extra }}/> value="{{ choice.value }}" {{ choice.extra }} />
{% for k, v in choice.query_attrs.items %} {% for k, v in choice.query_attrs.items %}
<input type="hidden" name="{{k}}" value="{{v}}"/> <input type="hidden" name="{{k}}" value="{{v}}" />
{% endfor %} {% endfor %}
<button class="button"><img src="{% static "admin/img/search.svg" %}" /></button> <button class="button"><img src="{% static "admin/img/search.svg" %}" /></button>
</form> </form>