X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ce8d791a5298e0cb2569034aec4c8b57afac97b2..082959e2bac9f53965f8fcdf56bfeaf8fb2e48dc:/apps/catalogue/models/book.py diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index 1b043a47..fb593889 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -42,7 +42,6 @@ class Book(models.Model): ordering = ['parent_number', 'title'] verbose_name = _('book') verbose_name_plural = _('books') - permissions = [('can_pubmark', 'Can mark for publishing')] # Representing @@ -99,7 +98,7 @@ class Book(models.Model): # if there are more parts, set the rest to empty strings book_len = len(instance) for i in range(book_len - len(texts)): - texts.append(u'pusta część %d' % (i + 1), u'') + texts.append((u'pusta część %d' % (i + 1), u'')) i = 0 for i, (title, text) in enumerate(texts): @@ -110,8 +109,8 @@ class Book(models.Model): if i < book_len: chunk = instance[i] - chunk.slug = slug - chunk.title = title + chunk.slug = slug[:50] + chunk.title = title[:255] chunk.save() else: chunk = instance.add(slug, title, adjust_slug=True)