Commit de3bd580 authored by luxcem's avatar luxcem

fix name collision in article model

parent cbf7a2b1
......@@ -2,7 +2,8 @@ from django.db import models
from django.utils.translation import ugettext_lazy as _
from taggit.managers import TaggableManager
from .vote import UnDVotedMixin
from newspaper import Article
from newspaper import Article as ArticleParser
class Article(UnDVotedMixin):
url = models.URLField("URL")
......@@ -27,7 +28,7 @@ class Article(UnDVotedMixin):
return self.title
def parse(self):
article = Article(url=self.url, language=self.lang)
article = ArticleParser(url=self.url, language=self.lang)
article.download()
article.parse()
self.title = article.title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment