1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 09:30:01 +00:00

Move hardcoded urls into config.

This commit is contained in:
snowfag 2017-06-03 14:40:32 -04:00
parent 3165389d52
commit 68c2c965a4
2 changed files with 4 additions and 4 deletions

View file

@ -21,7 +21,7 @@ SECRET_KEY = '***'
# Prefix for running multiple sites, user table will not be prefixed. # Prefix for running multiple sites, user table will not be prefixed.
SITE_FLAVOR = 'nyaa' # 'nyaa' or 'sukebei' SITE_FLAVOR = 'nyaa' # 'nyaa' or 'sukebei'
EXTERNAL_URLS = {'fap':'***', 'main':'***'}
# for recaptcha and email verification: # for recaptcha and email verification:
# keys for localhost. Change as appropriate when actual domain is registered. # keys for localhost. Change as appropriate when actual domain is registered.
RECAPTCHA_PUBLIC_KEY = '***' RECAPTCHA_PUBLIC_KEY = '***'
@ -57,4 +57,4 @@ USE_ELASTIC_SEARCH = False
ENABLE_ELASTIC_SEARCH_HIGHLIGHT = False ENABLE_ELASTIC_SEARCH_HIGHLIGHT = False
# Max ES search results, do not set over 10000 # Max ES search results, do not set over 10000
ES_MAX_SEARCH_RESULT = 1000 ES_MAX_SEARCH_RESULT = 1000
ES_INDEX_NAME = SITE_FLAVOR # we create indicies named nyaa or sukebei ES_INDEX_NAME = SITE_FLAVOR # we create indicies named nyaa or sukebei

View file

@ -84,9 +84,9 @@
</li> </li>
<li><a href="{% if rss_filter %}{{ url_for('home', page='rss', **rss_filter) }}{% else %}{{ url_for('home', page='rss') }}{% endif %}">RSS</a></li> <li><a href="{% if rss_filter %}{{ url_for('home', page='rss', **rss_filter) }}{% else %}{{ url_for('home', page='rss') }}{% endif %}">RSS</a></li>
{% if config.SITE_FLAVOR == 'nyaa' %} {% if config.SITE_FLAVOR == 'nyaa' %}
<li><a href="https://sukebei.nyaa.si/">Fap</a></li> <li><a href="//{{ config.EXTERNAL_URLS['fap'] }}">Fap</a></li>
{% elif config.SITE_FLAVOR == 'sukebei' %} {% elif config.SITE_FLAVOR == 'sukebei' %}
<li><a href="https://nyaa.si/">Fun</a></li> <li><a href="//{{ config.EXTERNAL_URLS['main'] }}">Fun</a></li>
{% endif %} {% endif %}
{% if g.user.is_moderator %} {% if g.user.is_moderator %}
<li><a href="{{ url_for('view_reports') }}">Reports</a> </li> <li><a href="{{ url_for('view_reports') }}">Reports</a> </li>