git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'hotfix/oberlin_references' into taggit
[philo.git]
/
philo
/
admin
/
nodes.py
diff --git
a/philo/admin/nodes.py
b/philo/admin/nodes.py
index
e2a9c9d
..
46c456a
100644
(file)
--- a/
philo/admin/nodes.py
+++ b/
philo/admin/nodes.py
@@
-1,7
+1,8
@@
from django.contrib import admin
from django.contrib import admin
+from mptt.admin import MPTTModelAdmin
+
from philo.admin.base import EntityAdmin, TreeEntityAdmin, COLLAPSE_CLASSES
from philo.models import Node, Redirect, File
from philo.admin.base import EntityAdmin, TreeEntityAdmin, COLLAPSE_CLASSES
from philo.models import Node, Redirect, File
-from mptt.admin import MPTTModelAdmin
class NodeAdmin(TreeEntityAdmin):
class NodeAdmin(TreeEntityAdmin):
@@
-46,10
+47,12
@@
class RedirectAdmin(ViewAdmin):
class FileAdmin(ViewAdmin):
fieldsets = (
(None, {
class FileAdmin(ViewAdmin):
fieldsets = (
(None, {
- 'fields': ('file', 'mimetype')
+ 'fields': ('
name', '
file', 'mimetype')
}),
)
}),
)
- list_display = ('mimetype', 'file')
+ list_display = ('name', 'mimetype', 'file')
+ search_fields = ('name',)
+ list_filter = ('mimetype',)
admin.site.register(Node, NodeAdmin)
admin.site.register(Node, NodeAdmin)