TextureAdmin: Added search params

This commit is contained in:
Felipe Martín 2013-05-27 16:15:42 +02:00
parent 1c27064369
commit 95fe6a55d0
1 changed files with 2 additions and 0 deletions

View File

@ -138,6 +138,8 @@ class Texture(models.Model):
class TextureAdmin(admin.ModelAdmin):
list_display = ('name', 'type', 'image_html', )
list_display_links = ('name', )
list_filter = ('type', )
search_fields = ('name', 'image', )
def image_html(self, obj):
return('<img src="/static/textures/%s" height="32" />' % obj.get_image(2))