fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Librarian in regular requirements.
[redakcja.git]
/
apps
/
catalogue
/
models
/
image.py
diff --git
a/apps/catalogue/models/image.py
b/apps/catalogue/models/image.py
index
fffa4b3
..
646dd0a
100755
(executable)
--- a/
apps/catalogue/models/image.py
+++ b/
apps/catalogue/models/image.py
@@
-48,10
+48,14
@@
class Image(dvcs_models.Document):
return ("catalogue_image", [self.slug])
def correct_about(self):
return ("catalogue_image", [self.slug])
def correct_about(self):
- return "http://%s%s" % (
+ return
[
"http://%s%s" % (
Site.objects.get_current().domain,
self.get_absolute_url()
Site.objects.get_current().domain,
self.get_absolute_url()
- )
+ ),
+ "http://%s%s" % (
+ 'obrazy.redakcja.wolnelektury.pl',
+ self.get_absolute_url()
+ )]
# State & cache
# =============
# State & cache
# =============
@@
-76,7
+80,8
@@
class Image(dvcs_models.Document):
picture_xml = publishable.materialize()
try:
picture_xml = publishable.materialize()
try:
- picture = WLPicture.from_string(picture_xml.encode('utf-8'),
+ picture = WLPicture.from_bytes(
+ picture_xml.encode('utf-8'),
image_store=SelfImageStore)
except ParseError, e:
raise AssertionError(_('Invalid XML') + ': ' + str(e))
image_store=SelfImageStore)
except ParseError, e:
raise AssertionError(_('Invalid XML') + ': ' + str(e))
@@
-86,8
+91,8
@@
class Image(dvcs_models.Document):
raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e))
valid_about = self.correct_about()
raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e))
valid_about = self.correct_about()
- assert picture.picture_info.about
==
valid_about, \
- _("rdf:about is not") + " " + valid_about
+ assert picture.picture_info.about
in
valid_about, \
+ _("rdf:about is not") + " " + valid_about
[0]
def publishable_error(self):
try:
def publishable_error(self):
try: