mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-16 00:09:05 +00:00
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:
@@ -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_-)')
|
||||
|
||||
Reference in New Issue
Block a user