Items are the published entries of the tag.
773972
def items(self, obj):
        
        return TaggedItem.objects.get_by_model(
            Entry.published.all(), obj)[:self.limit]
106117
def tags(self):
        
        tags = self.fields['tags']
        return [(t, v) for t in tags for v in tags[t]]
1195307
def tag(*tags):
    '''
    
    '''
    def dfn(fn):
        _tags = getattr(fn, 'tags', set())
        _tags.update(tags)
        fn.tags = _tags
        return fn
    return dfn
1083531
def get_entry_tags(self, categories):
        
        tags = []
        for category in categories:
            domain = category.attrib.get('domain', 'category')
            if 'tag' in domain and category.attrib.get('nicename'):
                tags.append(category.attrib.get('nicename'))
        return tags
744678
def query_entries(
    queryset=None,
    year=None, month=None, day=None,
    category=None, category_slug=None,
    tag=None, tag_slug=None,
    author=None, author_slug=None,
    future=False,
    order=None,
    orderby=None,
    limit=None,
):
    
    if queryset is None:
        queryset = get_entry_model().objects.all()

    if appsettings.FLUENT_BLOGS_FILTER_SITE_ID:
        queryset = queryset.parent_site(settings.SITE_ID)

    if not future:
        queryset = queryset.published()

    if year:
        queryset = queryset.filter(publication_date__year=year)
    if month:
        queryset = queryset.filter(publication_date__month=month)
    if day:
        queryset = queryset.filter(publication_date__day=day)

    # The main category/tag/author filters
    if category:
        if isinstance(category, basestring):
            queryset = queryset.categories(category)
        elif isinstance(category, (int, long)):
            queryset = queryset.filter(categories=category)
        else:
            raise ValueError("Expected slug or ID for the 'category' parameter")
    if category_slug:
        queryset = queryset.categories(category)

    if tag:
        if isinstance(tag, basestring):
            queryset = queryset.tagged(tag)
        elif isinstance(tag, (int, long)):
            queryset = queryset.filter(tags=tag)
        else:
            raise ValueError("Expected slug or ID for 'tag' parameter.")
    if tag_slug:
        queryset = queryset.tagged(tag)

    if author:
        if isinstance(author, basestring):
            queryset = queryset.authors(author)
        elif isinstance(author, (int, long)):
            queryset = queryset.filter(author=author)
        else:
            raise ValueError("Expected slug or ID for 'author' parameter.")
    if author_slug:
        queryset = queryset.authors(author_slug)

    # Ordering
    if orderby:
        queryset = queryset.order_by(*_get_order_by(order, orderby, ENTRY_ORDER_BY_FIELDS))
    else:
        queryset = queryset.order_by('-publication_date')

    # Limit
    if limit:
        queryset = queryset[:limit]

    return queryset
698551
def create_tags(self, entry):
        """"""
        tag_list = [t.lower().strip() for t in entry.tag_string.split(',')]
        for t in tag_list:
            tag, created = self.get_or_create(name=t)
            entry.tags.add(tag)
157057
def where_entry_tag(query, tag):
    
    if isinstance(tag, (list, set, tuple)):
        tags = [t.lower() for t in tag]
        return orm.select(e for e in query for t in e.tags if t.key in tags)
    return orm.select(e for e in query for t in e.tags if t.key == tag.lower())
18442
def addItemTag(self, item, tag):
        
        if self.inItemTagTransaction:
            # XXX: what if item's parent is not a feed?
            if not tag in self.addTagBacklog:
                self.addTagBacklog[tag] = []                
            self.addTagBacklog[tag].append({'i': item.id, 's': item.parent.id})
            return "OK"
        else:
            return self._modifyItemTag(item.id, 'a', tag)
641505
def tags(self):
        
        tag_list = self.spec.get('tag', [])
        if isinstance(tag_list, (list, set, tuple)):
            return list(tag_list)
        return [tag_list]
1315533
def tags(self):
        ""
        for bucket in self:
            for k,v in self[bucket].items():
                yield k,v
351374
def tags(self):
        
        tags = set()
        for i in self:
            tags |= set(i.keys())
        return tags
1176442
def get_tags(self):
        
        posts = self.get_posts(include_draft=True)
        result = {}
        for post in posts:
            for tag_name in set(post.tags):
                result[tag_name] = result.setdefault(
                    tag_name, Pair(0, 0)) + Pair(1, 0 if post.is_draft else 1)
        return list(result.items())
920892
async def post_entry_tags(self, entry, tags):
        
        params = {'access_token': self.token, 'tags': []}
        if len(tags) > 0 and isinstance(tags, list):
            params['tags'] = ', '.join(tags)
        path = '/api/entries/{entry}/tags.{ext}'.format(
            entry=entry, ext=self.format)
        return await self.query(path, "post", **params)
689081
def tag_map(self):
        '''  '''
        tm = dd(list)
        for tag in self.__tags:
            tm[tag.tagtype].append(tag)
        return tm
642440
def tag_report_cb(llrp_msg):
    """"""
    global numtags
    tags = llrp_msg.msgdict['RO_ACCESS_REPORT']['TagReportData']
    if len(tags):
        logger.info('saw tag(s): %s', pprint.pformat(tags))
        for tag in tags:
            numtags += tag['TagSeenCount'][0]
    else:
        logger.info('no tags seen')
        return
65513
public function tag()
    {
        if (!appSetting('tags_enabled', 'blog-' . $this->oBlog->id) || !$this->uri->rsegment(4)) {

            show404();
        }

        // --------------------------------------------------------------------------

        //  Get tag
        $this->data['tag'] = $this->blog_tag_model->getBySlug($this->uri->rsegment(4));

        if (!$this->data['tag']) {

            show404();
        }

        // --------------------------------------------------------------------------

        //  Widgets
        $this->fetchSidebarWidgets();

        // --------------------------------------------------------------------------

        //  Meta
        $this->data['page']->title = $this->oBlog->label . ': ' . ucfirst($this->data['postNamePlural']) . ' tagged with "' . $this->data['tag']->label . '"';
        $this->data['page']->seo->description = 'All ' . $this->data['postNamePlural'] . ' tagged with  ' . $this->data['tag']->label . ' ';
        $this->data['page']->seo->keywords    = '';

        // --------------------------------------------------------------------------

        //  Handle pagination
        $page     = $this->uri->rsegment(5);
        $perPage = appSetting('home_per_page', 'blog-' . $this->oBlog->id);
        $perPage = $perPage ? $perPage : 10;

        $this->data['pagination']           = new stdClass();
        $this->data['pagination']->page     = $page;
        $this->data['pagination']->per_page = $perPage;

        // --------------------------------------------------------------------------

        //  Send any additional data
        $data                    = array();
        $data['include_body']    = !appSetting('use_excerpts', 'blog-' . $this->oBlog->id);
        $data['include_gallery'] = appSetting('home_show_gallery', 'blog-' . $this->oBlog->id);
        $data['sort']            = array('bp.published', 'desc');

        //  Only published items which are not schduled for the future
        $data['where']   = array();
        $data['where'][] = array('column' => 'bp.blog_id',   'value' => $this->oBlog->id);
        $data['where'][] = array('column' => 'is_published', 'value' => true);
        $data['where'][] = array('column' => 'published <=', 'value' => 'NOW()', 'escape' => false);

        // --------------------------------------------------------------------------

        //  Load posts and count
        $this->data['posts'] = $this->blog_post_model->getWithTag($this->data['tag']->id, $page, $perPage, $data);
        $this->data['pagination']->total = $this->blog_post_model->countAll($data);

        // --------------------------------------------------------------------------

        //  Any SEO data?
        if (!empty($this->data['tag']->seo_title)) {

            $this->data['page']->title = $this->data['tag']->seo_title;
        }

        if (!empty($this->data['tag']->seo_description)) {

            $this->data['page']->seo->description = $this->data['tag']->seo_description;
        }

        if (!empty($this->data['tag']->seo_keywords)) {

            $this->data['page']->seo->keywords = $this->data['tag']->seo_keywords;
        }

        // --------------------------------------------------------------------------

        //  Finally, let the views know this is an 'archive' type page
        $this->data['archive_title']       = ucfirst($this->data['postNamePlural']) . ' in tag "' . $this->data['tag']->label . '"';
        $this->data['archive_description'] = $this->data['tag']->description;
        $this->data['isTag']               = true;

        // --------------------------------------------------------------------------

        $oView = Factory::service('View');
        $oView->load('structure/header', $this->data);
        $this->loadView('browse', $this->data);
        $oView->load('structure/footer', $this->data);
    }
1155236
def tags(self):
        """"""
        return [(r['name'], self.vpathto(r['name'])) for r in self.remotes if r['kind'] == 'tags']