mirror of https://gitlab.com/litecord/litecord.git
config.example.py: add NAME attribute
- static: give inst_name on context - static/index: use inst_name
This commit is contained in:
parent
2852f57f96
commit
b629fcace2
|
|
@ -6,6 +6,9 @@ class Config:
|
|||
#: Main URL of the instance.
|
||||
MAIN_URL = 'discordapp.io'
|
||||
|
||||
#: Name of the instance
|
||||
NAME = 'Litecord/Nya'
|
||||
|
||||
#: Enable debug logging?
|
||||
DEBUG = False
|
||||
|
||||
|
|
@ -36,6 +39,7 @@ class Config:
|
|||
|
||||
class Development(Config):
|
||||
DEBUG = True
|
||||
|
||||
POSTGRES = {
|
||||
'host': 'localhost',
|
||||
'user': 'litecord',
|
||||
|
|
@ -47,3 +51,10 @@ class Development(Config):
|
|||
class Production(Config):
|
||||
DEBUG = False
|
||||
IS_SSL = True
|
||||
|
||||
POSTGRES = {
|
||||
'host': 'some_production_postgres',
|
||||
'user': 'some_production_user',
|
||||
'password': 'some_production_password',
|
||||
'database': 'litecord_or_anything_else_really',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,4 +18,5 @@ async def static_pages(path):
|
|||
async def index_handler():
|
||||
"""Handler for the index page."""
|
||||
index_path = Path.cwd() / Path('static') / 'index.html'
|
||||
return await render_template_string(index_path.read_text())
|
||||
return await render_template_string(
|
||||
index_path.read_text(), inst_name=app.config['NAME'])
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{% block body %}
|
||||
<center>
|
||||
<h1>
|
||||
welcome to a Litecord instance
|
||||
welcome to {{ inst_name }}, a Litecord instance
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
It supports nodeinfo, despise not being part
|
||||
It supports nodeinfo, despite not being part
|
||||
in any federated network.
|
||||
</p>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue