1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
5 from django.conf import settings
6 from django.utils.module_loading import import_string
7 from catalogue.utils import AppSettings
10 class Settings(AppSettings):
11 """Default settings for catalogue app."""
12 DEFAULT_LANGUAGE = 'pol'
13 # PDF needs TeXML + XeLaTeX, MOBI needs Calibre.
14 DONT_BUILD = {'pdf', 'mobi'}
16 REDAKCJA_URL = "http://redakcja.wolnelektury.pl"
17 GOOD_LICENSES = {r'CC BY \d\.\d', r'CC BY-SA \d\.\d'}
18 RELATED_RANDOM_PICTURE_CHANCE = .5
19 GET_MP3_LENGTH = 'catalogue.utils.get_mp3_length'
21 def _more_GET_MP3_LENGTH(self, value):
22 return import_string(value)
25 app_settings = Settings('CATALOGUE')