add openlibrary switch
parent
5843d1c804
commit
bd25522d6d
|
@ -673,6 +673,8 @@ def despam_description(description):
|
|||
return description.replace('\r\n', '\n')
|
||||
|
||||
def add_openlibrary(work, hard_refresh=False):
|
||||
if not settings.USE_OPENLIBRARY and not settings.DEBUG:
|
||||
return
|
||||
if (not hard_refresh) and work.openlibrary_lookup is not None:
|
||||
# don't hit OL if we've visited in the past month or so
|
||||
if now()- work.openlibrary_lookup < timedelta(days=90):
|
||||
|
|
|
@ -514,6 +514,7 @@ BOOXTREAM_TEST_EPUB_URL = 'https://github.com/Gluejar/open_access_ebooks_ebook/r
|
|||
TEST_PDF_URL = "https://github.com/Gluejar/flatland/raw/master/downloads/Flatland.pdf"
|
||||
FILE_UPLOAD_MAX_MEMORY_SIZE = 20971520 #20MB
|
||||
|
||||
USE_OPENLIBRARY = False
|
||||
|
||||
# Selenium related -- set if Se tests run
|
||||
FIREFOX_PATH = ''
|
||||
|
|
Loading…
Reference in New Issue