# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from os.path import abspath, dirname, join
import tempfile
from traceback import extract_stack
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from os.path import abspath, dirname, join
import tempfile
from traceback import extract_stack
@override_settings(
MEDIA_ROOT=tempfile.mkdtemp(prefix='djangotest_'),
CATALOGUE_DONT_BUILD={'pdf', 'mobi', 'epub', 'txt', 'fb2', 'cover'},
NO_SEARCH_INDEX=True,
@override_settings(
MEDIA_ROOT=tempfile.mkdtemp(prefix='djangotest_'),
CATALOGUE_DONT_BUILD={'pdf', 'mobi', 'epub', 'txt', 'fb2', 'cover'},
NO_SEARCH_INDEX=True,
- 'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
- },
- SOLR=settings.SOLR_TEST,
- SSIFY_RENDER=False,
+ 'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'},
+ },
def __init__(self, first_names, last_name):
self.first_names = first_names
def __init__(self, first_names, last_name):
self.first_names = first_names
_empty_fields = ['cover_url', 'variant_of']
# allow single definition for multiple-value fields
_salias = {
_empty_fields = ['cover_url', 'variant_of']
# allow single definition for multiple-value fields
_salias = {
def info_args(title, language=None):
""" generate some keywords for comfortable BookInfoCreation """
def info_args(title, language=None):
""" generate some keywords for comfortable BookInfoCreation """
- 'title': unicode(title),
- 'url': WLURI.from_slug(slug),
- 'about': u"http://wolnelektury.pl/example/URI/%s" % slug,
+ 'title': str(title),
+ 'url': WLURI(slug),
+ 'about': "http://wolnelektury.pl/example/URI/%s" % slug,
mod_path = extract_stack(limit=2)[0][0]
f_path = join(dirname(abspath(mod_path)), 'files', path)
return f_path
mod_path = extract_stack(limit=2)[0][0]
f_path = join(dirname(abspath(mod_path)), 'files', path)
return f_path