X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/22a9e609d7f00bac9d88306d3c9f4cf3bd244dee..5ea4ebb6aed109f6c6fff2d98f667abbddb0c4a0:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 088d0eee6..d74ca7544 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -164,7 +164,7 @@ def tagged_object_list(request, tags=''): objects = fragments else: # get relevant books and their tags - objects = models.Book.tagged.with_all(tags).order_by() + objects = models.Book.tagged.with_all(tags) if not shelf_is_set: # eliminate descendants l_tags = models.Tag.objects.filter(category='book', slug__in=[book.book_tag_slug() for book in objects]) @@ -326,7 +326,7 @@ def _sqlite_word_starts_with(name, prefix): return Q(**kwargs) -if settings.DATABASE_ENGINE == 'sqlite3': +if settings.DATABASES['default']['ENGINE'] == 'django.db.backends.sqlite3': _word_starts_with = _sqlite_word_starts_with