X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/92ee86bde94e75c38f9f8b2e1242acd031e73dc0..46f96a4ae489ed958389c76caed52d991473e1f8:/apps/catalogue/models/chunk.py?ds=inline diff --git a/apps/catalogue/models/chunk.py b/apps/catalogue/models/chunk.py index 3ce20504..8b8f56b3 100755 --- a/apps/catalogue/models/chunk.py +++ b/apps/catalogue/models/chunk.py @@ -22,6 +22,7 @@ class Chunk(dvcs_models.Document): number = models.IntegerField(_('number')) slug = models.SlugField(_('slug')) title = models.CharField(_('title'), max_length=255, blank=True) + gallery_start = models.IntegerField(_('gallery start'), null=True, blank=True) # cache _short_html = models.TextField(null=True, blank=True, editable=False) @@ -38,6 +39,7 @@ class Chunk(dvcs_models.Document): ordering = ['number'] verbose_name = _('chunk') verbose_name_plural = _('chunks') + permissions = [('can_pubmark', 'Can mark for publishing')] # Representing # ============ @@ -61,7 +63,7 @@ class Chunk(dvcs_models.Document): # Creating and manipulation # ========================= - def split(self, slug, title='', adjust_slug=False, **kwargs): + def split(self, slug, title='', **kwargs): """ Create an empty chunk after this one """ self.book.chunk_set.filter(number__gt=self.number).update( number=models.F('number')+1)