def import_tags(self, tag_nodes):
        """
        Import all the tags form 'wp:tag' nodes,
        because tags in 'item' nodes are not necessarily
        all the tags, then use only the nicename, because it's like
        a slug and the true tag name may be not valid for url usage.
        """
        self.write_out(self.style.STEP('- Importing tags\n'))
        for tag_node in tag_nodes:
            tag_name = tag_node.find(
                '{%s}tag_slug' % WP_NS).text[:50]
            self.write_out('> %s... ' % tag_name)
            Tag.objects.get_or_create(name=tag_name)
            self.write_out(self.style.ITEM('OK\n'))
def import_tags ( self , tag_nodes ) : self . write_out ( self . style . STEP ( '- Importing tags\n' ) ) for tag_node in tag_nodes : tag_name = tag_node . find ( '{%s}tag_slug' % WP_NS ) . text [ : 50 ] self . write_out ( '> %s... ' % tag_name ) Tag . objects . get_or_create ( name = tag_name ) self . write_out ( self . style . ITEM ( 'OK\n' ) )
Import all the tags form 'wp:tag' nodes,
        because tags in 'item' nodes are not necessarily
        all the tags, then use only the nicename, because it's like
        a slug and the true tag name may be not valid for url usage.