Created
August 29, 2016 21:36
-
-
Save renatoassis01/225f612414958bb542c1281ee314280b to your computer and use it in GitHub Desktop.
Admin Tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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