fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
04cb9d7
)
Using slug from identifier.url instead of generating it from title for newly imported...
author
Marek Stępniowski
<marek@stepniowski.com>
Tue, 16 Sep 2008 09:08:44 +0000
(11:08 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Tue, 16 Sep 2008 09:08:44 +0000
(11:08 +0200)
apps/catalogue/models.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/models.py
b/apps/catalogue/models.py
index
d8565c4
..
05009a5
100644
(file)
--- a/
apps/catalogue/models.py
+++ b/
apps/catalogue/models.py
@@
-137,7
+137,8
@@
class Book(models.Model):
# Read book metadata
book_info = dcparser.parse(xml_file)
- book = Book(title=book_info.title, slug=slughifi(book_info.title))
+ book_base, book_slug = book_info.url.rsplit('/', 1)
+ book = Book(title=book_info.title, slug=book_slug)
book.save()
book_tags = []