Skip to content

Instantly share code, notes, and snippets.

@renatoassis01
Created August 29, 2016 21:36
Show Gist options
  • Save renatoassis01/225f612414958bb542c1281ee314280b to your computer and use it in GitHub Desktop.
Save renatoassis01/225f612414958bb542c1281ee314280b to your computer and use it in GitHub Desktop.
Admin Tag
class SeuAdmin(BaseAdmin):
def get_tags(self, obj):
return ",\n".join([s.name for s in obj.tags.all()])
list_display = ('categoria', 'produto', 'slug', 'descricao', 'foto', 'get_tags')
get_tags.short_description = 'Tags'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment