djangoldp-ds4go 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/PKG-INFO +1 -1
- djangoldp_ds4go-1.0.3/djangoldp_ds4go/__init__.py +1 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/management/commands/import_rss.py +13 -3
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go.egg-info/PKG-INFO +1 -1
- djangoldp_ds4go-1.0.2/djangoldp_ds4go/__init__.py +0 -1
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/README.md +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/admin.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/apps.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/management/__init__.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/management/commands/__init__.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/migrations/0001_initial.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/migrations/0002_djangoldp_i18n.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/migrations/__init__.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/__base_model.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/__base_named_model.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/__init__.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/category.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/fact.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/media.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/translation.py +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go.egg-info/SOURCES.txt +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go.egg-info/dependency_links.txt +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go.egg-info/requires.txt +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go.egg-info/top_level.txt +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/setup.cfg +0 -0
- {djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.0.3'
|
{djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/management/commands/import_rss.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
3
|
from defusedxml.ElementTree import parse
|
|
4
|
+
from django.conf import settings
|
|
4
5
|
from django.core.management.base import BaseCommand
|
|
5
6
|
|
|
6
7
|
from djangoldp_ds4go.models import Category, Fact, Media
|
|
@@ -36,7 +37,12 @@ class Command(BaseCommand):
|
|
|
36
37
|
review = json.loads(review_elem.text) if review_elem is not None else {}
|
|
37
38
|
except json.JSONDecodeError:
|
|
38
39
|
review = {}
|
|
39
|
-
self.stderr.write(
|
|
40
|
+
self.stderr.write(
|
|
41
|
+
self.style.WARNING(
|
|
42
|
+
"Failed to parse review for item with guid %s. Ignoring."
|
|
43
|
+
% (guid)
|
|
44
|
+
)
|
|
45
|
+
)
|
|
40
46
|
|
|
41
47
|
description = item.find("description").text
|
|
42
48
|
content_elem = item.find("content:encoded", ns)
|
|
@@ -66,7 +72,9 @@ class Command(BaseCommand):
|
|
|
66
72
|
setattr(fact, f"author_{language}", author)
|
|
67
73
|
|
|
68
74
|
if enclosure_url:
|
|
69
|
-
setattr(fact, f"enclosure_{language}", enclosure_url)
|
|
75
|
+
setattr(fact, f"enclosure_{language}", enclosure_url).replace(
|
|
76
|
+
"medias/", getattr(settings, "MEDIA_URL", "/media/")
|
|
77
|
+
)
|
|
70
78
|
|
|
71
79
|
fact.save()
|
|
72
80
|
|
|
@@ -79,7 +87,9 @@ class Command(BaseCommand):
|
|
|
79
87
|
|
|
80
88
|
# Medias
|
|
81
89
|
for media_elem in item.findall("media:content", ns):
|
|
82
|
-
url = media_elem.get("url")
|
|
90
|
+
url = media_elem.get("url").replace(
|
|
91
|
+
"medias/", getattr(settings, "MEDIA_URL", "/media/")
|
|
92
|
+
)
|
|
83
93
|
file_size = int(media_elem.get("fileSize", 0))
|
|
84
94
|
width = int(media_elem.get("width", 0))
|
|
85
95
|
height = int(media_elem.get("height", 0))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.0.2'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/management/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/migrations/0002_djangoldp_i18n.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go/models/__base_named_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{djangoldp_ds4go-1.0.2 → djangoldp_ds4go-1.0.3}/djangoldp_ds4go.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|