Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
La Quadrature du Net
rpteam
rp
Commits
de3bd580
Commit
de3bd580
authored
Apr 22, 2017
by
luxcem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix name collision in article model
parent
cbf7a2b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
apps/rp/models/article.py
apps/rp/models/article.py
+3
-2
No files found.
apps/rp/models/article.py
View file @
de3bd580
...
@@ -2,7 +2,8 @@ from django.db import models
...
@@ -2,7 +2,8 @@ from django.db import models
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.utils.translation
import
ugettext_lazy
as
_
from
taggit.managers
import
TaggableManager
from
taggit.managers
import
TaggableManager
from
.vote
import
UnDVotedMixin
from
.vote
import
UnDVotedMixin
from
newspaper
import
Article
from
newspaper
import
Article
as
ArticleParser
class
Article
(
UnDVotedMixin
):
class
Article
(
UnDVotedMixin
):
url
=
models
.
URLField
(
"URL"
)
url
=
models
.
URLField
(
"URL"
)
...
@@ -27,7 +28,7 @@ class Article(UnDVotedMixin):
...
@@ -27,7 +28,7 @@ class Article(UnDVotedMixin):
return
self
.
title
return
self
.
title
def
parse
(
self
):
def
parse
(
self
):
article
=
Article
(
url
=
self
.
url
,
language
=
self
.
lang
)
article
=
Article
Parser
(
url
=
self
.
url
,
language
=
self
.
lang
)
article
.
download
()
article
.
download
()
article
.
parse
()
article
.
parse
()
self
.
title
=
article
.
title
self
.
title
=
article
.
title
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment