when I try to add a list of words I am getting this error
<p>I am trying to add a list of words to my tags in my django app. But I get the following error </p>

<pre><code>Cannot add ['ct', 'panty'] (&lt;class 'list'&gt;). Expected &lt;class 'django.db.models.base.ModelBase'&gt; or str.
</code></pre>

<p>I have functions that scrape different sites and I want them to each have different tags. I initially used an if statement like this</p>

<pre><code>        if entry['name'] == 'pan':
            post.tags.add("Musica", "video")
        elif entry['name'] == 'world':
            post.tags.add("video")
        else:
            post.tags = None
</code></pre>

<p>But I thought it would be better if I just had a different tag for each scrape. i thought using if elif and else would slow down a process that's already kind of slow. this is my code</p>

<pre><code>def panties():
    from lxml import html
    pan_url = 'http://www.pan.org'
    shtml = requests.get(pan_url, headers=headers)
    soup = BeautifulSoup(shtml.text, 'html5lib')
    video_row = soup.find_all('div', {'class': 'video'})
    name = 'pan'
    tag_list = ['ct', 'panty']
    tags = [word for word in tag_list]
    author = User.objects.get(id=1)

    def youtube_link(url):
        youtube_page = requests.get(url, headers=headers)
        soupdata = BeautifulSoup(youtube_page.text, 'html5lib')
        video_row = soupdata.find_all('script', {'type': 'text/javascript'})
        entries = [{'text': str(div),
                    } for div in video_row]

        tubby = str(entries[4])
        urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&amp;+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', tubby)
        return urls

    def embed(url):
        new_embed = url.replace("watch?v=", "embed/")
        return new_embed

    entries = [{'href': div.a.get('href'),
                'src': youtube_link(div.a.get('href'))[1],
                'text': div.h4.text,
                'comments': div.h4.text,
                'name': name,
                'url': div.a.get('href'),
                'embed': embed(youtube_link(div.a.get('href'))[0]),
                'author': author,
                'video': True,
                'tags': tags
                } for div in video_row][:13]
         tags = saved_post.tags.add("Musica", "video")
    return entries




def save_the_scrapes():
    one = panties()
    two = other()
    mergence = one + two
    random.shuffle(mergence)

    for entry in mergence:
        post = Post()
        post.title = entry['text']
        title = post.title
        if not Post.objects.filter(title=title):
            post.title = entry['text']
            post.name = entry['name']
            post.url = entry['url']
            post.body = entry['comments']
            post.image_url = entry['src']
            post.video_path = entry['embed']
            post.author = entry['author']
            post.video = entry['video']
            post.status = 'draft'
            post.save()

            if entry['name'] == 'pan videos':
                post.tags.add("Musica", "video")
            elif entry['name'] == 'world star':
                post.tags.add("video")
            else:
                post.tags = None


    return mergence
</code></pre>

<p>I also tried for tags.</p>

<pre><code>tags = " 'tags', 'cat' "
</code></pre>

<p>but that didn't work either. because django taggit just makes the two a single link. I'm learning python through django so there are gaps in my knowledge of the language. any help would be appreciated.</p>