|
@@ -6,10 +6,6 @@ If you rely on any of those in your code, make sure you use `misago.conf.setting
|
|
instead of Django's `django.conf.settings`.
|
|
instead of Django's `django.conf.settings`.
|
|
"""
|
|
"""
|
|
|
|
|
|
-# Default JS debug to false
|
|
|
|
-# This setting used exclusively by test runner and isn't part of public API
|
|
|
|
-
|
|
|
|
-_MISAGO_JS_DEBUG = False
|
|
|
|
|
|
|
|
# Permissions system extensions
|
|
# Permissions system extensions
|
|
# https://misago.readthedocs.io/en/latest/developers/acls.html#extending-permissions-system
|
|
# https://misago.readthedocs.io/en/latest/developers/acls.html#extending-permissions-system
|
|
@@ -27,16 +23,19 @@ MISAGO_ACL_EXTENSIONS = [
|
|
'misago.search.permissions',
|
|
'misago.search.permissions',
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+
|
|
# Custom markup extensions
|
|
# Custom markup extensions
|
|
|
|
|
|
MISAGO_MARKUP_EXTENSIONS = []
|
|
MISAGO_MARKUP_EXTENSIONS = []
|
|
|
|
|
|
|
|
+
|
|
# Posting middlewares
|
|
# Posting middlewares
|
|
# https://misago.readthedocs.io/en/latest/developers/posting_process.html
|
|
# https://misago.readthedocs.io/en/latest/developers/posting_process.html
|
|
|
|
|
|
MISAGO_POSTING_MIDDLEWARES = [
|
|
MISAGO_POSTING_MIDDLEWARES = [
|
|
# Always keep FloodProtectionMiddleware middleware first one
|
|
# Always keep FloodProtectionMiddleware middleware first one
|
|
'misago.threads.api.postingendpoint.floodprotection.FloodProtectionMiddleware',
|
|
'misago.threads.api.postingendpoint.floodprotection.FloodProtectionMiddleware',
|
|
|
|
+
|
|
'misago.threads.api.postingendpoint.category.CategoryMiddleware',
|
|
'misago.threads.api.postingendpoint.category.CategoryMiddleware',
|
|
'misago.threads.api.postingendpoint.privatethread.PrivateThreadMiddleware',
|
|
'misago.threads.api.postingendpoint.privatethread.PrivateThreadMiddleware',
|
|
'misago.threads.api.postingendpoint.reply.ReplyMiddleware',
|
|
'misago.threads.api.postingendpoint.reply.ReplyMiddleware',
|
|
@@ -59,6 +58,7 @@ MISAGO_POSTING_MIDDLEWARES = [
|
|
'misago.threads.api.postingendpoint.emailnotification.EmailNotificationMiddleware',
|
|
'misago.threads.api.postingendpoint.emailnotification.EmailNotificationMiddleware',
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+
|
|
# Configured thread types
|
|
# Configured thread types
|
|
|
|
|
|
MISAGO_THREAD_TYPES = [
|
|
MISAGO_THREAD_TYPES = [
|
|
@@ -66,6 +66,7 @@ MISAGO_THREAD_TYPES = [
|
|
'misago.threads.threadtypes.privatethread.PrivateThread',
|
|
'misago.threads.threadtypes.privatethread.PrivateThread',
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+
|
|
# Search extensions
|
|
# Search extensions
|
|
|
|
|
|
MISAGO_SEARCH_EXTENSIONS = [
|
|
MISAGO_SEARCH_EXTENSIONS = [
|
|
@@ -73,11 +74,13 @@ MISAGO_SEARCH_EXTENSIONS = [
|
|
'misago.users.search.SearchUsers',
|
|
'misago.users.search.SearchUsers',
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+
|
|
# Misago-admin specific date formats
|
|
# Misago-admin specific date formats
|
|
|
|
|
|
MISAGO_COMPACT_DATE_FORMAT_DAY_MONTH = 'j M'
|
|
MISAGO_COMPACT_DATE_FORMAT_DAY_MONTH = 'j M'
|
|
MISAGO_COMPACT_DATE_FORMAT_DAY_MONTH_YEAR = 'M \'y'
|
|
MISAGO_COMPACT_DATE_FORMAT_DAY_MONTH_YEAR = 'M \'y'
|
|
|
|
|
|
|
|
+
|
|
# Additional registration validators
|
|
# Additional registration validators
|
|
# https://misago.readthedocs.io/en/latest/developers/validating_registrations.html
|
|
# https://misago.readthedocs.io/en/latest/developers/validating_registrations.html
|
|
|
|
|
|
@@ -86,20 +89,24 @@ MISAGO_NEW_REGISTRATIONS_VALIDATORS = [
|
|
'misago.users.validators.validate_with_sfs',
|
|
'misago.users.validators.validate_with_sfs',
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+
|
|
# Stop Forum Spam settings
|
|
# Stop Forum Spam settings
|
|
|
|
|
|
MISAGO_USE_STOP_FORUM_SPAM = True
|
|
MISAGO_USE_STOP_FORUM_SPAM = True
|
|
MISAGO_STOP_FORUM_SPAM_MIN_CONFIDENCE = 80
|
|
MISAGO_STOP_FORUM_SPAM_MIN_CONFIDENCE = 80
|
|
|
|
|
|
|
|
+
|
|
# Login API URL
|
|
# Login API URL
|
|
|
|
|
|
MISAGO_LOGIN_API_URL = 'auth'
|
|
MISAGO_LOGIN_API_URL = 'auth'
|
|
|
|
|
|
|
|
+
|
|
# Misago Admin Path
|
|
# Misago Admin Path
|
|
# Omit starting and trailing slashes. To disable Misago admin, empty this value.
|
|
# Omit starting and trailing slashes. To disable Misago admin, empty this value.
|
|
|
|
|
|
MISAGO_ADMIN_PATH = 'admincp'
|
|
MISAGO_ADMIN_PATH = 'admincp'
|
|
|
|
|
|
|
|
+
|
|
# Admin urls namespaces that Misago's AdminAuthMiddleware should protect
|
|
# Admin urls namespaces that Misago's AdminAuthMiddleware should protect
|
|
|
|
|
|
MISAGO_ADMIN_NAMESPACES = [
|
|
MISAGO_ADMIN_NAMESPACES = [
|
|
@@ -107,68 +114,82 @@ MISAGO_ADMIN_NAMESPACES = [
|
|
'misago:admin',
|
|
'misago:admin',
|
|
]
|
|
]
|
|
|
|
|
|
|
|
+
|
|
# How long (in minutes) since previous request to admin namespace should admin session last.
|
|
# How long (in minutes) since previous request to admin namespace should admin session last.
|
|
|
|
|
|
MISAGO_ADMIN_SESSION_EXPIRATION = 60
|
|
MISAGO_ADMIN_SESSION_EXPIRATION = 60
|
|
|
|
|
|
|
|
+
|
|
# Display threads on forum index
|
|
# Display threads on forum index
|
|
# Change this to false to display categories list instead
|
|
# Change this to false to display categories list instead
|
|
|
|
|
|
MISAGO_THREADS_ON_INDEX = True
|
|
MISAGO_THREADS_ON_INDEX = True
|
|
|
|
|
|
|
|
+
|
|
# Max age of notifications in days
|
|
# Max age of notifications in days
|
|
# Notifications older than this are deleted. On very active forums its better to keep this smaller.
|
|
# Notifications older than this are deleted. On very active forums its better to keep this smaller.
|
|
|
|
|
|
MISAGO_NOTIFICATIONS_MAX_AGE = 40
|
|
MISAGO_NOTIFICATIONS_MAX_AGE = 40
|
|
|
|
|
|
|
|
+
|
|
# Fail-safe limits in case forum is raided by spambot
|
|
# Fail-safe limits in case forum is raided by spambot
|
|
# No user may exceed those limits, however you may disable them by changing them to 0.
|
|
# No user may exceed those limits, however you may disable them by changing them to 0.
|
|
|
|
|
|
MISAGO_DIALY_POST_LIMIT = 600
|
|
MISAGO_DIALY_POST_LIMIT = 600
|
|
MISAGO_HOURLY_POST_LIMIT = 100
|
|
MISAGO_HOURLY_POST_LIMIT = 100
|
|
|
|
|
|
|
|
+
|
|
# Function used for generating individual avatar for user
|
|
# Function used for generating individual avatar for user
|
|
|
|
|
|
MISAGO_DYNAMIC_AVATAR_DRAWER = 'misago.users.avatars.dynamic.draw_default'
|
|
MISAGO_DYNAMIC_AVATAR_DRAWER = 'misago.users.avatars.dynamic.draw_default'
|
|
|
|
|
|
|
|
+
|
|
# Path to directory containing avatar galleries
|
|
# Path to directory containing avatar galleries
|
|
# Those galleries can be loaded by running loadavatargallery command
|
|
# Those galleries can be loaded by running loadavatargallery command
|
|
|
|
|
|
MISAGO_AVATAR_GALLERY = None
|
|
MISAGO_AVATAR_GALLERY = None
|
|
|
|
|
|
|
|
+
|
|
# Save user avatars for sizes
|
|
# Save user avatars for sizes
|
|
# Keep sizes ordered from greatest to smallest
|
|
# Keep sizes ordered from greatest to smallest
|
|
# Max size also controls min size of uploaded image as well as crop size
|
|
# Max size also controls min size of uploaded image as well as crop size
|
|
|
|
|
|
MISAGO_AVATARS_SIZES = [400, 200, 150, 100, 64, 50, 30]
|
|
MISAGO_AVATARS_SIZES = [400, 200, 150, 100, 64, 50, 30]
|
|
|
|
|
|
|
|
+
|
|
# Path to blank avatar image used for guests and removed users.
|
|
# Path to blank avatar image used for guests and removed users.
|
|
|
|
|
|
MISAGO_BLANK_AVATAR = 'blank-avatar.png'
|
|
MISAGO_BLANK_AVATAR = 'blank-avatar.png'
|
|
|
|
|
|
|
|
+
|
|
# Threads lists pagination settings
|
|
# Threads lists pagination settings
|
|
|
|
|
|
MISAGO_THREADS_PER_PAGE = 25
|
|
MISAGO_THREADS_PER_PAGE = 25
|
|
MISAGO_THREADS_TAIL = 15
|
|
MISAGO_THREADS_TAIL = 15
|
|
|
|
|
|
|
|
+
|
|
# Posts lists pagination settings
|
|
# Posts lists pagination settings
|
|
|
|
|
|
MISAGO_POSTS_PER_PAGE = 18
|
|
MISAGO_POSTS_PER_PAGE = 18
|
|
MISAGO_POSTS_TAIL = 6
|
|
MISAGO_POSTS_TAIL = 6
|
|
|
|
|
|
|
|
+
|
|
# Number of events displayed on single thread page
|
|
# Number of events displayed on single thread page
|
|
# If there's more events than specified, oldest events will be trimmed
|
|
# If there's more events than specified, oldest events will be trimmed
|
|
|
|
|
|
MISAGO_EVENTS_PER_PAGE = 20
|
|
MISAGO_EVENTS_PER_PAGE = 20
|
|
|
|
|
|
|
|
+
|
|
# Number of attachments possible to assign to single post
|
|
# Number of attachments possible to assign to single post
|
|
|
|
|
|
MISAGO_POST_ATTACHMENTS_LIMIT = 16
|
|
MISAGO_POST_ATTACHMENTS_LIMIT = 16
|
|
|
|
|
|
|
|
+
|
|
# Max allowed size of image before Misago will generate thumbnail for it
|
|
# Max allowed size of image before Misago will generate thumbnail for it
|
|
|
|
|
|
MISAGO_ATTACHMENT_IMAGE_SIZE_LIMIT = (500, 500)
|
|
MISAGO_ATTACHMENT_IMAGE_SIZE_LIMIT = (500, 500)
|
|
|
|
|
|
|
|
+
|
|
# Length of secret used for attachments url tokens and filenames
|
|
# Length of secret used for attachments url tokens and filenames
|
|
|
|
|
|
MISAGO_ATTACHMENT_SECRET_LENGTH = 64
|
|
MISAGO_ATTACHMENT_SECRET_LENGTH = 64
|
|
@@ -178,12 +199,14 @@ MISAGO_ATTACHMENT_SECRET_LENGTH = 64
|
|
|
|
|
|
MISAGO_ATTACHMENT_ORPHANED_EXPIRE = 24 * 60
|
|
MISAGO_ATTACHMENT_ORPHANED_EXPIRE = 24 * 60
|
|
|
|
|
|
|
|
+
|
|
# Names of files served when user requests file that doesn't exist or is unavailable
|
|
# Names of files served when user requests file that doesn't exist or is unavailable
|
|
# Those files will be sought within STATIC_ROOT directory
|
|
# Those files will be sought within STATIC_ROOT directory
|
|
|
|
|
|
MISAGO_404_IMAGE = 'misago/img/error-404.png'
|
|
MISAGO_404_IMAGE = 'misago/img/error-404.png'
|
|
MISAGO_403_IMAGE = 'misago/img/error-403.png'
|
|
MISAGO_403_IMAGE = 'misago/img/error-403.png'
|
|
|
|
|
|
|
|
+
|
|
# Controls max age in days of items that Misago has to process to make rankings
|
|
# Controls max age in days of items that Misago has to process to make rankings
|
|
# Used for active posters and most liked users lists
|
|
# Used for active posters and most liked users lists
|
|
# If your forum runs out of memory when trying to generate users rankings list
|
|
# If your forum runs out of memory when trying to generate users rankings list
|
|
@@ -196,10 +219,12 @@ MISAGO_RANKING_LENGTH = 30
|
|
|
|
|
|
MISAGO_RANKING_SIZE = 50
|
|
MISAGO_RANKING_SIZE = 50
|
|
|
|
|
|
|
|
+
|
|
# Controls number of users displayed on single page
|
|
# Controls number of users displayed on single page
|
|
|
|
|
|
MISAGO_USERS_PER_PAGE = 12
|
|
MISAGO_USERS_PER_PAGE = 12
|
|
|
|
|
|
|
|
+
|
|
# Controls amount of data used by readtracking system
|
|
# Controls amount of data used by readtracking system
|
|
# Items older than number of days specified below are considered read
|
|
# Items older than number of days specified below are considered read
|
|
# Depending on amount of new content being posted on your forum you may want
|
|
# Depending on amount of new content being posted on your forum you may want
|
|
@@ -207,14 +232,12 @@ MISAGO_USERS_PER_PAGE = 12
|
|
|
|
|
|
MISAGO_READTRACKER_CUTOFF = 40
|
|
MISAGO_READTRACKER_CUTOFF = 40
|
|
|
|
|
|
|
|
+
|
|
# Available Moment.js locales
|
|
# Available Moment.js locales
|
|
|
|
|
|
MISAGO_MOMENT_JS_LOCALES = [
|
|
MISAGO_MOMENT_JS_LOCALES = [
|
|
'af',
|
|
'af',
|
|
- 'ar-ma',
|
|
|
|
- 'ar-sa',
|
|
|
|
- 'ar-tn',
|
|
|
|
- 'ar',
|
|
|
|
|
|
+ 'ar-ma', 'ar-sa', 'ar-tn', 'ar',
|
|
'az',
|
|
'az',
|
|
'be',
|
|
'be',
|
|
'bg',
|
|
'bg',
|
|
@@ -227,12 +250,9 @@ MISAGO_MOMENT_JS_LOCALES = [
|
|
'cv',
|
|
'cv',
|
|
'cy',
|
|
'cy',
|
|
'da',
|
|
'da',
|
|
- 'de-at',
|
|
|
|
- 'de',
|
|
|
|
|
|
+ 'de-at', 'de',
|
|
'el',
|
|
'el',
|
|
- 'en-au',
|
|
|
|
- 'en-ca',
|
|
|
|
- 'en-gb',
|
|
|
|
|
|
+ 'en-au', 'en-ca', 'en-gb',
|
|
'eo',
|
|
'eo',
|
|
'es',
|
|
'es',
|
|
'et',
|
|
'et',
|
|
@@ -247,8 +267,7 @@ MISAGO_MOMENT_JS_LOCALES = [
|
|
'he',
|
|
'he',
|
|
'hi',
|
|
'hi',
|
|
'hr',
|
|
'hr',
|
|
- 'hu',
|
|
|
|
- 'hy-am',
|
|
|
|
|
|
+ 'hu', 'hy-am',
|
|
'id',
|
|
'id',
|
|
'is',
|
|
'is',
|
|
'it',
|
|
'it',
|
|
@@ -262,32 +281,27 @@ MISAGO_MOMENT_JS_LOCALES = [
|
|
'mk',
|
|
'mk',
|
|
'ml',
|
|
'ml',
|
|
'mr',
|
|
'mr',
|
|
- 'ms-my',
|
|
|
|
- 'my',
|
|
|
|
|
|
+ 'ms-my', 'my',
|
|
'nb',
|
|
'nb',
|
|
'ne',
|
|
'ne',
|
|
'nl',
|
|
'nl',
|
|
'nn',
|
|
'nn',
|
|
'pl',
|
|
'pl',
|
|
- 'pt-br',
|
|
|
|
- 'pt',
|
|
|
|
|
|
+ 'pt-br', 'pt',
|
|
'ro',
|
|
'ro',
|
|
'ru',
|
|
'ru',
|
|
'sk',
|
|
'sk',
|
|
'sl',
|
|
'sl',
|
|
'sq',
|
|
'sq',
|
|
- 'sr-cyrl',
|
|
|
|
- 'sr',
|
|
|
|
|
|
+ 'sr-cyrl', 'sr',
|
|
'sv',
|
|
'sv',
|
|
'ta',
|
|
'ta',
|
|
'th',
|
|
'th',
|
|
'tl-ph',
|
|
'tl-ph',
|
|
'tr',
|
|
'tr',
|
|
- 'tzm-latn',
|
|
|
|
- 'tzm',
|
|
|
|
|
|
+ 'tzm-latn', 'tzm',
|
|
'uk',
|
|
'uk',
|
|
'uz',
|
|
'uz',
|
|
'vi',
|
|
'vi',
|
|
- 'zh-cn',
|
|
|
|
- 'zh-tw',
|
|
|
|
|
|
+ 'zh-cn', 'zh-tw',
|
|
]
|
|
]
|