X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/4b3016bf455bd8faca4209acf3c4b4fa361e4c85..a9f9e367a4aa563d907c5d2282ae732c9224f36a:/apps/catalogue/models/book.py?ds=inline diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index d60a3b67..5125532c 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -27,8 +27,8 @@ class Book(models.Model): gallery = models.CharField(_('scan gallery name'), max_length=255, blank=True) #wl_slug = models.CharField(_('title'), max_length=255, null=True, db_index=True, editable=False) - parent = models.ForeignKey('self', null=True, blank=True, verbose_name=_('parent'), related_name="children") - parent_number = models.IntegerField(_('parent number'), null=True, blank=True, db_index=True) + parent = models.ForeignKey('self', null=True, blank=True, verbose_name=_('parent'), related_name="children", editable=False) + parent_number = models.IntegerField(_('parent number'), null=True, blank=True, db_index=True, editable=False) # Cache _short_html = models.TextField(null=True, blank=True, editable=False) @@ -44,7 +44,7 @@ class Book(models.Model): class Meta: app_label = 'catalogue' - ordering = ['parent_number', 'title'] + ordering = ['title', 'slug'] verbose_name = _('book') verbose_name_plural = _('books')