parametrize site redirect URL
This commit is contained in:
parent
53a7fa90cb
commit
aac1e817bb
4 changed files with 4 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ class ConfigParameter(Enum):
|
|||
SITE_URL = "site.url"
|
||||
SITE_TOKEN = "site.token"
|
||||
SITE_ADMIN_EMAIL = "site.admin_email"
|
||||
SITE_REDIRECT = "site.redirect"
|
||||
|
||||
|
||||
class Config:
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ def new_form_comment():
|
|||
# add a row to Comment table
|
||||
dao.create_comment(url, author_name, author_site, author_gravatar, message)
|
||||
|
||||
return redirect("/redirect/", code=302)
|
||||
return redirect(app.config.get("SITE_REDIRECT"), code=302)
|
||||
|
||||
|
||||
def check_form_data(d):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue