fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add dry_run to fix_rdf_about
[redakcja.git]
/
apps
/
catalogue
/
models
/
book.py
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
76381b8
..
8c9e6e6
100755
(executable)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-72,6
+72,11
@@
class Book(models.Model):
def get_absolute_url(self):
return ("catalogue_book", [self.slug])
def get_absolute_url(self):
return ("catalogue_book", [self.slug])
+ def correct_about(self):
+ return "http://%s%s" % (
+ Site.objects.get_current().domain,
+ self.get_absolute_url()
+ )
# Creating & manipulating
# =======================
# Creating & manipulating
# =======================
@@
-230,7
+235,7
@@
class Book(models.Model):
except ValidationError, e:
raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e))
except ValidationError, e:
raise AssertionError(_('Invalid Dublin Core') + ': ' + str(e))
- valid_about =
"http://%s%s" % (Site.objects.get_current().domain, self.get_absolute_url()
)
+ valid_about =
self.correct_about(
)
assert bi.about == valid_about, _("rdf:about is not") + " " + valid_about
def hidden(self):
assert bi.about == valid_about, _("rdf:about is not") + " " + valid_about
def hidden(self):