mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Don’t show styleguide on live environment
Its audience is people working on the product, not the end users.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import render_template
|
||||
from flask import render_template, current_app, abort
|
||||
from flask_wtf import Form
|
||||
from wtforms import StringField, PasswordField, TextAreaField, FileField, validators
|
||||
from app.main import main
|
||||
@@ -7,6 +7,9 @@ from app.main import main
|
||||
@main.route('/_styleguide')
|
||||
def styleguide():
|
||||
|
||||
if not current_app.config['SHOW_STYLEGUIDE']:
|
||||
abort(404)
|
||||
|
||||
class FormExamples(Form):
|
||||
username = StringField(u'Username')
|
||||
password = PasswordField(u'Password', [validators.required()])
|
||||
|
||||
Reference in New Issue
Block a user