diff --git a/sas/templates/sas/album.jinja b/sas/templates/sas/album.jinja index 74091964..eb18a4e1 100644 --- a/sas/templates/sas/album.jinja +++ b/sas/templates/sas/album.jinja @@ -39,7 +39,7 @@ {% endif %} {% endif %}
- {% for a in album.children_albums.order_by('-id') %} + {% for a in album.children_albums.order_by('-date') %}
{% if edit_mode %} diff --git a/sas/views.py b/sas/views.py index 06660724..c9de8edf 100644 --- a/sas/views.py +++ b/sas/views.py @@ -253,7 +253,8 @@ class PictureEditForm(forms.ModelForm): class AlbumEditForm(forms.ModelForm): class Meta: model = Album - fields=['name', 'file', 'parent', 'edit_groups'] + fields = ['name', 'date', 'file', 'parent', 'edit_groups'] + date = forms.DateField(label=_("Date"), widget=SelectDate, required=True) parent = make_ajax_field(Album, 'parent', 'files', help_text="") edit_groups = make_ajax_field(Album, 'edit_groups', 'groups', help_text="") recursive = forms.BooleanField(label=_("Apply rights recursively"), required=False)