Decorator that add short_description and allow_tags to ModelAdmin list_display function.

    Example:
        
        class AlbumAdmin(admin.ModelAdmin):                                                                                                                        
            list_display = ['title', 'year', 'artist', 'total_tacks', 'view_track']

            @admin_tagify("View track")
            def view_songs(self, obj):
                return "<a href=\"%s?album=%d\">%d tracks</a>" % (reverse("admin:music_track_changelist"), obj.id, obj.tracks.count())

def admin_tagify(short_description=None, allow_tags=True):
    """
    Decorator that add short_description and allow_tags to ModelAdmin list_display function.

    Example:
        
        class AlbumAdmin(admin.ModelAdmin):                                                                                                                        
            list_display = ['title', 'year', 'artist', 'total_tacks', 'view_track']

            @admin_tagify("View track")
            def view_songs(self, obj):
                return "<a href=\"%s?album=%d\">%d tracks</a>" % (reverse("admin:music_track_changelist"), obj.id, obj.tracks.count())
    """
    def tagify(func):
        func.allow_tags = bool(allow_tags)
        if short_description:
            func.short_description = short_description
        return func

    return tagify