Moving site name to config.py
This commit is contained in:
parent
309009d3a4
commit
01cb4354e0
3 changed files with 6 additions and 3 deletions
6
app.py
6
app.py
|
|
@ -334,6 +334,10 @@ def after_request(response):
|
|||
g.db.close()
|
||||
return response
|
||||
|
||||
@app.context_processor
|
||||
def _inject_variables():
|
||||
return {'site_name': app.config['SITE_NAME']}
|
||||
|
||||
@login_manager.user_loader
|
||||
def _inject_user(userid):
|
||||
return User[userid]
|
||||
|
|
@ -618,7 +622,7 @@ _enrich_symbols = [
|
|||
(r'https?://(?:[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*|\[[A-Fa-f0-9:]+\])'
|
||||
r'(?::\d+)?(?:/.*)?(?:\?.*)?(?:#.*)?', 'URL'),
|
||||
(_mention_re, 'MENTION'),
|
||||
(r'[^\n+]+', 'TEXT'),
|
||||
(r'[^h\n+]+', 'TEXT'),
|
||||
(r'.', 'TEXT')
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DATABASE = 'coriplus.sqlite'
|
||||
DEBUG = True
|
||||
SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b'
|
||||
|
||||
SITE_NAME = 'Cori+'
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% set site_name = "Cori+" %}
|
||||
<title>{{ site_name }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="/static/style.css">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue