Added AttributeInlineFormSet to force new Attribute instances to be run through the...
[philo.git] / admin / nodes.py
1 from django.contrib import admin
2 from philo.admin.base import EntityAdmin
3 from philo.models import Node, Redirect, File
4
5
6 class NodeAdmin(EntityAdmin):
7         pass
8
9
10 class ViewAdmin(EntityAdmin):
11         pass
12
13
14 class RedirectAdmin(ViewAdmin):
15         fieldsets = (
16                 (None, {
17                         'fields': ('target', 'status_code')
18                 }),
19         )
20         list_display = ('target', 'status_code')
21         list_filter = ('status_code',)
22
23
24 class FileAdmin(ViewAdmin):
25         fieldsets = (
26                 (None, {
27                         'fields': ('file', 'mimetype')
28                 }),
29         )
30         list_display = ('mimetype', 'file')
31
32
33 admin.site.register(Node, NodeAdmin)
34 admin.site.register(Redirect, RedirectAdmin)
35 admin.site.register(File, FileAdmin)