Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Commit

Permalink
Admin: improved overall usability
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Dec 18, 2015
1 parent 3016a2e commit ec1544a
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions django_netjsonconfig/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@


class TemplateAdmin(TimeStampedEditableAdmin):
list_display = ('name', 'created', 'modified')
list_filter = ('created',)
list_display = ('name', 'backend', 'created', 'modified')
list_filter = ('backend', 'created',)
search_fields = ('name',)
actions_on_bottom = True
save_on_top = True

class Media:
css = {'all': ('css/admin/django-netjsonconfig.css',)}
Expand All @@ -36,9 +38,18 @@ def clean_templates(self):


class DeviceAdmin(TimeStampedEditableAdmin):
list_display = ('name', 'created', 'modified')
list_filter = ('created',)
search_fields = ('name',)
list_display = ('name', 'backend', 'created', 'modified')
list_filter = ('backend', 'created',)
search_fields = ('name', 'key')
fields = ('name',
'key',
'templates',
'backend',
'config',
'created',
'modified')
actions_on_bottom = True
save_on_top = True
form = DeviceForm
change_form_template = 'admin/device_change_form.html'
visualize_template = 'admin/visualize_configuration.html'
Expand Down

0 comments on commit ec1544a

Please sign in to comment.