hotfix: dates activity
This commit is contained in:
parent
dd47cc3b07
commit
3275de7c9c
2 changed files with 7 additions and 3 deletions
|
@ -11,6 +11,8 @@ class IdForm(forms.ModelForm):
|
|||
kwargs.pop('min_value')
|
||||
if 'num_choices' in kwargs:
|
||||
num_choices = kwargs.pop('num_choices')
|
||||
else:
|
||||
num_choices = None
|
||||
super(IdForm, self).__init__(*args, **kwargs)
|
||||
|
||||
for field in self.instance._meta.fields:
|
||||
|
@ -65,6 +67,7 @@ class CategoryAdmin(admin.ModelAdmin):
|
|||
list_display = ['name', 'parent', "full_name_p"]
|
||||
ordering = ['name', 'parent']
|
||||
search_fields = ['name',]
|
||||
autocomplete_fields = ['parent', ]
|
||||
|
||||
|
||||
class EquipmentAttributeAdmin(admin.ModelAdmin):
|
||||
|
@ -76,6 +79,7 @@ class EquipmentAttributeAdmin(admin.ModelAdmin):
|
|||
class EquipmentAdmin(admin.ModelAdmin):
|
||||
save_as_continue = True
|
||||
save_on_top = True
|
||||
autocomplete_fields = ['category', ]
|
||||
readonly_fields = ['full_category_p',
|
||||
'added_at',
|
||||
'modified_at',
|
||||
|
|
|
@ -63,7 +63,7 @@ class ActivityTemplateAdmin(admin.ModelAdmin):
|
|||
|
||||
|
||||
class ActivityAdmin(admin.ModelAdmin):
|
||||
save_as_continue = True
|
||||
save_as = True
|
||||
save_on_top = True
|
||||
list_display = ['title', 'event', 'is_public', 'parent', ]
|
||||
ordering = ['title', 'event', 'has_perm', 'parent', ]
|
||||
|
@ -73,12 +73,12 @@ class ActivityAdmin(admin.ModelAdmin):
|
|||
inlines = [EquipmentAttributionExtraInline, ]
|
||||
fieldsets = (
|
||||
('Général', {
|
||||
'fields': ('event', 'parent', 'title', 'is_public', ('beginning', 'end', ), 'places', ),
|
||||
'fields': ('event', 'parent', 'title', 'is_public', 'beginning', 'end', 'places', ),
|
||||
'description': "Tous ces champs sont héritables (sauf parent et Évènement)",
|
||||
}),
|
||||
('Permanences', {
|
||||
'fields': ('has_perm', ('min_perm', 'max_perm', ), 'staff', ),
|
||||
'classes': ('collapse',),
|
||||
'classes': ('wide',),
|
||||
'description': "Tous ces champs sont héritables (sauf les gens en perm)",
|
||||
}),
|
||||
('Descriptions', {
|
||||
|
|
Loading…
Reference in a new issue