mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-13 15:19:03 +00:00
Read-only maintenance mode setting for config.py (#356)
Disables all POSTs, optionally allowing users to log in (without updating last login date) Blocked POSTs will redirect to the GET endpoint if possible, otherwise to referrer or in last case, home page. API requests will get a plaintext message with 405 status code.
This commit is contained in:
committed by
Arylide
parent
5e93d7ec6d
commit
c5d705210d
@@ -1,7 +1,13 @@
|
||||
import os
|
||||
|
||||
|
||||
DEBUG = True
|
||||
# A read-only maintenance mode, in which the database is not modified
|
||||
MAINTENANCE_MODE = True
|
||||
# A maintenance message (used in layout.html template)
|
||||
MAINTENANCE_MODE_MESSAGE = 'Site is currently in read-only maintenance mode.'
|
||||
# Allow logging in during maintenance (without updating last login date)
|
||||
MAINTENANCE_MODE_LOGINS = True
|
||||
|
||||
USE_RECAPTCHA = False
|
||||
USE_EMAIL_VERIFICATION = False
|
||||
USE_MYSQL = True
|
||||
|
||||
Reference in New Issue
Block a user