2017-05-12 18:51:49 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
DEBUG = True
|
|
|
|
USE_RECAPTCHA = False
|
|
|
|
USE_EMAIL_VERIFICATION = False
|
|
|
|
USE_MYSQL = True
|
|
|
|
|
|
|
|
# Enable this once stat integration is done
|
2017-05-27 23:15:39 +00:00
|
|
|
ENABLE_SHOW_STATS = True
|
2017-05-12 18:51:49 +00:00
|
|
|
|
|
|
|
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
if USE_MYSQL:
|
2017-05-22 22:46:26 +00:00
|
|
|
SQLALCHEMY_DATABASE_URI = ('mysql://test:test123@localhost/nyaav2?charset=utf8mb4')
|
2017-05-12 18:51:49 +00:00
|
|
|
else:
|
|
|
|
SQLALCHEMY_DATABASE_URI = (
|
|
|
|
'sqlite:///' + os.path.join(BASE_DIR, 'test.db') + '?check_same_thread=False')
|
|
|
|
|
|
|
|
CSRF_SESSION_KEY = '***'
|
|
|
|
SECRET_KEY = '***'
|
|
|
|
|
|
|
|
# Prefix for running multiple sites, user table will not be prefixed.
|
2017-05-12 23:23:02 +00:00
|
|
|
SITE_FLAVOR = 'nyaa' # 'nyaa' or 'sukebei'
|
2017-06-03 18:40:32 +00:00
|
|
|
EXTERNAL_URLS = {'fap':'***', 'main':'***'}
|
2017-05-12 18:51:49 +00:00
|
|
|
# for recaptcha and email verification:
|
|
|
|
# keys for localhost. Change as appropriate when actual domain is registered.
|
|
|
|
RECAPTCHA_PUBLIC_KEY = '***'
|
|
|
|
RECAPTCHA_PRIVATE_KEY = '***'
|
|
|
|
SMTP_SERVER = '***'
|
|
|
|
SMTP_PORT = 587
|
|
|
|
MAIL_FROM_ADDRESS = '***'
|
|
|
|
SMTP_USERNAME = '***'
|
|
|
|
SMTP_PASSWORD = '***'
|
|
|
|
|
2017-05-27 23:15:39 +00:00
|
|
|
# What the site identifies itself as. This affects templates, not database stuff.
|
2017-05-12 18:51:49 +00:00
|
|
|
SITE_NAME = 'Nyaa'
|
|
|
|
|
|
|
|
# The maximum number of files a torrent can contain
|
|
|
|
# until the site says "Too many files to display."
|
|
|
|
MAX_FILES_VIEW = 1000
|
|
|
|
|
2017-05-27 23:15:39 +00:00
|
|
|
#
|
2017-05-12 18:51:49 +00:00
|
|
|
# Setting to make sure main announce url is present in torrent
|
2017-05-27 23:15:39 +00:00
|
|
|
#
|
2017-05-12 18:51:49 +00:00
|
|
|
ENFORCE_MAIN_ANNOUNCE_URL = False
|
2017-08-06 21:55:45 +00:00
|
|
|
MAIN_ANNOUNCE_URL = 'http://127.0.0.1:6881/announce'
|
|
|
|
TRACKER_API_URL = 'http://127.0.0.1:6881/api'
|
|
|
|
TRACKER_API_AUTH = 'topsecret'
|
2017-08-20 00:48:08 +00:00
|
|
|
# Torrents uploaded without an account must be at least this big in total (bytes)
|
|
|
|
# Set to 0 to disable
|
|
|
|
MINIMUM_ANONYMOUS_TORRENT_SIZE = 1 * 1024 * 1024
|
2017-05-12 18:51:49 +00:00
|
|
|
|
|
|
|
BACKUP_TORRENT_FOLDER = 'torrents'
|
2017-05-16 06:51:58 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Search Options
|
|
|
|
#
|
|
|
|
RESULTS_PER_PAGE = 75
|
|
|
|
|
2017-05-27 23:15:39 +00:00
|
|
|
# See README.MD on Elasticsearch setup
|
2017-05-16 06:51:58 +00:00
|
|
|
USE_ELASTIC_SEARCH = False
|
|
|
|
ENABLE_ELASTIC_SEARCH_HIGHLIGHT = False
|
2017-05-27 23:15:39 +00:00
|
|
|
# Max ES search results, do not set over 10000
|
2017-05-16 06:51:58 +00:00
|
|
|
ES_MAX_SEARCH_RESULT = 1000
|
2017-06-03 18:40:32 +00:00
|
|
|
ES_INDEX_NAME = SITE_FLAVOR # we create indicies named nyaa or sukebei
|