How to use the puput.models.TagEntryPage function in puput

To help you get started, we’ve selected a few puput examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github APSL / wordpress-to-puput / wordpress2puput / management / commands / wp2puput.py View on Github external
def import_entry_tags(self, tags, page):
        self.stdout.write("\tImporting tags...")
        for tag in tags:
            domain = tag.attrib.get('domain', 'category')
            if 'tag' in domain and tag.attrib.get('nicename'):
                self.stdout.write(u'\t\t{}'.format(tag.text))
                puput_tag, created = PuputTag.objects.update_or_create(name=tag.text)
                page.entry_tags.add(PuputTagEntryPage(tag=puput_tag))