Admin Log 2.0 (#283)

* Admin log added

* Add admin log to top bar

* Fixed some admin log bugs

* Remove comment_id column because comments die when they are killed

* Fix tabs in admin log template

* Fixed sort of admin logs to be created_time desc

* Fix navbar wrapping to a new line

when 992px <= width <= 1200px

* Put reports and admin log in "Admin" dropdown

Applied ./lint.sh fixes

Fixed long lines

* Updated log to be text instead of id based to account for future deletions

* Small fix in log message formatting
This commit is contained in:
mreweilk
2017-07-04 23:13:59 -05:00
committed by GitHub
parent 1cee6cb647
commit dd8cb4757e
7 changed files with 185 additions and 12 deletions

View File

@@ -10,7 +10,8 @@ from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired
from wtforms import StringField, PasswordField, BooleanField, TextAreaField, SelectField,\
HiddenField
from wtforms.validators import DataRequired, Optional, Email, Length, EqualTo, ValidationError, StopValidation
from wtforms.validators import DataRequired, Optional, Email, Length, EqualTo, ValidationError,\
StopValidation
from wtforms.validators import Regexp
# For DisabledSelectField
@@ -49,6 +50,7 @@ def stop_on_validation_error(f):
raise StopValidation(*e.args) from e
return decorator
_username_validator = Regexp(
r'^[a-zA-Z0-9_\-]+$',
message='Your username must only consist of alphanumerics and _- (a-zA-Z0-9_-)')