defaults.py 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. """
  2. Default settings for the ``mezzanine.core`` app. Each of these can be
  3. overridden in your project's settings module, just like regular
  4. Django settings. The ``editable`` argument for each controls whether
  5. the setting is editable via Django's admin.
  6. Thought should be given to how a setting is actually used before
  7. making it editable, as it may be inappropriate - for example settings
  8. that are only read during startup shouldn't be editable, since changing
  9. them would require an application reload.
  10. """
  11. from __future__ import unicode_literals
  12. from django.conf import settings
  13. from django.utils.translation import ugettext_lazy as _
  14. from mezzanine.conf import register_setting
  15. register_setting(
  16. name="ADMIN_MENU_ORDER",
  17. description=_("Controls the ordering and grouping of the admin menu."),
  18. editable=False,
  19. default=(
  20. (_("Content"), ("pages.Page", "blog.BlogPost",
  21. "generic.ThreadedComment", (_("Media Library"), "media-library"),)),
  22. (_("Site"), ("sites.Site", "redirects.Redirect", "conf.Setting")),
  23. (_("Users"), ("auth.User", "auth.Group",)),
  24. ),
  25. )
  26. register_setting(
  27. name="ADMIN_MENU_COLLAPSED",
  28. label=_("Collapse the Admin menu"),
  29. description=_("Controls whether or not the left-hand admin menu is "
  30. "collapsed by default."),
  31. editable=True,
  32. default=False,
  33. )
  34. register_setting(
  35. name="ADMIN_REMOVAL",
  36. description=_("A sequence of Python dotted paths to models "
  37. "(eg: ``['mezzanine.blog.models.BlogPost',]``) that should be "
  38. "removed from the admin."),
  39. editable=False,
  40. default=(),
  41. )
  42. register_setting(
  43. name="ADMIN_THUMB_SIZE",
  44. description=_("Size of thumbnail previews for image fields in the "
  45. "admin interface."),
  46. editable=False,
  47. default="24x24",
  48. )
  49. register_setting(
  50. name="AKISMET_API_KEY",
  51. label=_("Akismet API Key"),
  52. description=_("Key for http://akismet.com spam filtering service. Used "
  53. "for filtering comments and forms."),
  54. editable=True,
  55. default="",
  56. )
  57. register_setting(
  58. name="BITLY_ACCESS_TOKEN",
  59. label=_("bit.ly access token"),
  60. description=_("Access token for http://bit.ly URL shortening service."),
  61. editable=True,
  62. default="",
  63. )
  64. register_setting(
  65. name="CACHE_SET_DELAY_SECONDS",
  66. description=_("Mezzanine's caching uses a technique know as mint "
  67. "caching. This is where the requested expiry for a cache entry "
  68. "is stored with the cache entry in cache, and the real expiry "
  69. "used has the ``CACHE_SET_DELAY`` added to it. Then on a cache get, "
  70. "the store expiry is checked, and if it has passed, the cache entry "
  71. "is set again, and no entry is returned. This tries to ensure that "
  72. "cache misses never occur, and if many clients were to get a cache "
  73. "miss at once, only one would actually need to re-generated the "
  74. "cache entry."),
  75. editable=False,
  76. default=30,
  77. )
  78. if "mezzanine.blog" in settings.INSTALLED_APPS:
  79. dashboard_tags = (
  80. ("blog_tags.quick_blog", "mezzanine_tags.app_list"),
  81. ("comment_tags.recent_comments",),
  82. ("mezzanine_tags.recent_actions",),
  83. )
  84. else:
  85. dashboard_tags = (
  86. ("mezzanine_tags.app_list",),
  87. ("mezzanine_tags.recent_actions",),
  88. (),
  89. )
  90. register_setting(
  91. name="DASHBOARD_TAGS",
  92. description=_("A three item sequence, each containing a sequence of "
  93. "template tags used to render the admin dashboard."),
  94. editable=False,
  95. default=dashboard_tags,
  96. )
  97. register_setting(
  98. name="DEVICE_DEFAULT",
  99. description=_("Device specific template sub-directory to use as the "
  100. "default device."),
  101. editable=False,
  102. default="",
  103. )
  104. register_setting(
  105. name="DEVICE_USER_AGENTS",
  106. description=_("Mapping of device specific template sub-directory names to "
  107. "the sequence of strings that may be found in their user agents."),
  108. editable=False,
  109. default=(
  110. ("mobile", ("2.0 MMP", "240x320", "400X240", "AvantGo", "BlackBerry",
  111. "Blazer", "Cellphone", "Danger", "DoCoMo", "Elaine/3.0",
  112. "EudoraWeb", "Googlebot-Mobile", "hiptop", "IEMobile",
  113. "KYOCERA/WX310K", "LG/U990", "MIDP-2.", "MMEF20", "MOT-V",
  114. "NetFront", "Newt", "Nintendo Wii", "Nitro", "Nokia",
  115. "Opera Mini", "Palm", "PlayStation Portable", "portalmmm",
  116. "Proxinet", "ProxiNet", "SHARP-TQ-GX10", "SHG-i900",
  117. "Small", "SonyEricsson", "Symbian OS", "SymbianOS",
  118. "TS21i-10", "UP.Browser", "UP.Link", "webOS", "Windows CE",
  119. "WinWAP", "YahooSeeker/M1A1-R2D2", "iPhone", "iPod", "Android",
  120. "BlackBerry9530", "LG-TU915 Obigo", "LGE VX", "webOS",
  121. "Nokia5800",)),
  122. ),
  123. )
  124. register_setting(
  125. name="FORMS_USE_HTML5",
  126. description=_("If ``True``, website forms will use HTML5 features."),
  127. editable=False,
  128. default=False,
  129. )
  130. register_setting(
  131. name="EMAIL_FAIL_SILENTLY",
  132. description=_("If ``True``, failures to send email will happen "
  133. "silently, otherwise an exception is raised. "
  134. "Defaults to ``settings.DEBUG``."),
  135. editable=False,
  136. default=settings.DEBUG,
  137. )
  138. register_setting(
  139. name="EXTRA_MODEL_FIELDS",
  140. description=_("A sequence of fields that will be injected into "
  141. "Mezzanine's (or any library's) models. Each item in the sequence is "
  142. "a four item sequence. The first two items are the dotted path to the "
  143. "model and its field name to be added, and the dotted path to the "
  144. "field class to use for the field. The third and fourth items are a "
  145. "sequence of positional args and a dictionary of keyword args, to use "
  146. "when creating the field instance. When specifying the field class, "
  147. "the path ``django.models.db.`` can be omitted for regular Django "
  148. "model fields."),
  149. editable=False,
  150. default=(),
  151. )
  152. register_setting(
  153. name="GOOGLE_ANALYTICS_ID",
  154. label=_("Google Analytics ID"),
  155. description=_("Google Analytics ID (http://www.google.com/analytics/)"),
  156. editable=True,
  157. default="",
  158. )
  159. register_setting(
  160. name="HOST_THEMES",
  161. description=_("A sequence mapping host names to themes, allowing "
  162. "different templates to be served per HTTP host. "
  163. "Each item in the sequence is a two item sequence, "
  164. "containing a host such as ``othersite.example.com``, and "
  165. "the name of an importable Python package for the theme. "
  166. "If the host is matched for a request, the templates "
  167. "directory inside the theme package will be first searched "
  168. "when loading templates."),
  169. editable=False,
  170. default=(),
  171. )
  172. register_setting(
  173. name="INLINE_EDITING_ENABLED",
  174. description=_("If ``True``, front-end inline editing will be enabled."),
  175. editable=False,
  176. default=True,
  177. )
  178. register_setting(
  179. name="JQUERY_FILENAME",
  180. label=_("Name of the jQuery file."),
  181. description=_("Name of the jQuery file found in "
  182. "mezzanine/core/static/mezzanine/js/"),
  183. editable=False,
  184. default="jquery-1.8.3.min.js",
  185. )
  186. register_setting(
  187. name="JQUERY_UI_FILENAME",
  188. label=_("Name of the jQuery UI file."),
  189. description=_("Name of the jQuery UI file found in "
  190. "mezzanine/core/static/mezzanine/js/"),
  191. editable=False,
  192. default="jquery-ui-1.8.24.min.js",
  193. )
  194. register_setting(
  195. name="MAX_PAGING_LINKS",
  196. label=_("Max paging links"),
  197. description=_("Max number of paging links to display when paginating."),
  198. editable=True,
  199. default=10,
  200. )
  201. register_setting(
  202. name="MEDIA_LIBRARY_PER_SITE",
  203. label=_("Media library per site"),
  204. description=_("If ``True``, each site will use its own directory within "
  205. "the filebrowser media library."),
  206. editable=False,
  207. default=False,
  208. )
  209. register_setting(
  210. name="OWNABLE_MODELS_ALL_EDITABLE",
  211. description=_("Models that subclass ``Ownable`` and use the "
  212. "``OwnableAdmin`` have their admin change-list records filtered "
  213. "down to records owned by the current user. This setting contains a "
  214. "sequence of models in the format ``app_label.object_name``, that "
  215. "when subclassing ``Ownable``, will still show all records in the "
  216. "admin change-list interface, regardless of the current user."),
  217. editable=False,
  218. default=(),
  219. )
  220. register_setting(
  221. name="RICHTEXT_WIDGET_CLASS",
  222. description=_("Dotted package path and class name of the widget to use "
  223. "for the ``RichTextField``."),
  224. editable=False,
  225. default="mezzanine.core.forms.TinyMceWidget",
  226. )
  227. register_setting(
  228. name="RICHTEXT_ALLOWED_TAGS",
  229. description=_("List of HTML tags that won't be stripped from "
  230. "``RichTextField`` instances."),
  231. editable=False,
  232. default=("a", "abbr", "acronym", "address", "area", "article", "aside",
  233. "b", "bdo", "big", "blockquote", "br", "button", "caption", "center",
  234. "cite", "code", "col", "colgroup", "dd", "del", "dfn", "dir", "div",
  235. "dl", "dt", "em", "fieldset", "figure", "font", "footer", "form",
  236. "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "i", "img",
  237. "input", "ins", "kbd", "label", "legend", "li", "map", "menu",
  238. "nav", "ol", "optgroup", "option", "p", "pre", "q", "s", "samp",
  239. "section", "select", "small", "span", "strike", "strong",
  240. "sub", "sup", "table", "tbody", "td", "textarea",
  241. "tfoot", "th", "thead", "tr", "tt", "u", "ul", "var", "wbr"),
  242. )
  243. register_setting(
  244. name="RICHTEXT_ALLOWED_ATTRIBUTES",
  245. description=_("List of HTML attributes that won't be stripped from "
  246. "``RichTextField`` instances."),
  247. editable=False,
  248. default=("abbr", "accept", "accept-charset", "accesskey", "action",
  249. "align", "alt", "axis", "border", "cellpadding", "cellspacing",
  250. "char", "charoff", "charset", "checked", "cite", "class", "clear",
  251. "cols", "colspan", "color", "compact", "coords", "datetime", "dir",
  252. "disabled", "enctype", "for", "frame", "headers", "height", "href",
  253. "hreflang", "hspace", "id", "ismap", "label", "lang", "longdesc",
  254. "maxlength", "media", "method", "multiple", "name", "nohref",
  255. "noshade", "nowrap", "prompt", "readonly", "rel", "rev", "rows",
  256. "rowspan", "rules", "scope", "selected", "shape", "size", "span",
  257. "src", "start", "style", "summary", "tabindex", "target", "title",
  258. "type", "usemap", "valign", "value", "vspace", "width", "xml:lang"),
  259. )
  260. register_setting(
  261. name="RICHTEXT_ALLOWED_STYLES",
  262. description=_("List of inline CSS styles that won't be stripped from "
  263. "``RichTextField`` instances."),
  264. editable=False,
  265. default=("border", "display", "float", "list-style-type", "margin",
  266. "margin-bottom", "margin-left", "margin-right", "margin-top",
  267. "padding-left", "text-align", "text-decoration", "vertical-align"),
  268. )
  269. register_setting(
  270. name="RICHTEXT_FILTERS",
  271. description=_("List of dotted paths to functions, called in order, on a "
  272. "``RichTextField`` value before it is rendered to the template."),
  273. editable=False,
  274. default=("mezzanine.utils.html.thumbnails",),
  275. )
  276. RICHTEXT_FILTER_LEVEL_HIGH = 1
  277. RICHTEXT_FILTER_LEVEL_LOW = 2
  278. RICHTEXT_FILTER_LEVEL_NONE = 3
  279. RICHTEXT_FILTER_LEVELS = (
  280. (RICHTEXT_FILTER_LEVEL_HIGH, _("High")),
  281. (RICHTEXT_FILTER_LEVEL_LOW, _("Low (allows video, iframe, Flash, etc)")),
  282. (RICHTEXT_FILTER_LEVEL_NONE, _("No filtering")),
  283. )
  284. register_setting(
  285. name="RICHTEXT_FILTER_LEVEL",
  286. label=_("Rich Text filter level"),
  287. description=_("*Do not change this setting unless you know what you're "
  288. "doing.*\n\nWhen content is saved in a Rich Text (WYSIWYG) field, "
  289. "unsafe HTML tags and attributes are stripped from the content to "
  290. "protect against staff members intentionally adding code that could "
  291. "be used to cause problems, such as changing their account to "
  292. "a super-user with full access to the system.\n\n"
  293. "This setting allows you to change the level of filtering that "
  294. "occurs. Setting it to low will allow certain extra tags to be "
  295. "permitted, such as those required for embedding video. While these "
  296. "tags are not the main candidates for users adding malicious code, "
  297. "they are still considered dangerous and could potentially be "
  298. "mis-used by a particularly technical user, and so are filtered out "
  299. "when the filtering level is set to high.\n\n"
  300. "Setting the filtering level to no filtering, will disable all "
  301. "filtering, and allow any code to be entered by staff members, "
  302. "including script tags."),
  303. editable=True,
  304. choices=RICHTEXT_FILTER_LEVELS,
  305. default=RICHTEXT_FILTER_LEVEL_HIGH,
  306. )
  307. register_setting(
  308. name="SEARCH_MODEL_CHOICES",
  309. description=_("Sequence of models that will be provided by default as "
  310. "choices in the search form. Each model should be in the format "
  311. "``app_label.model_name``. Only models that subclass "
  312. "``mezzanine.core.models.Displayable`` should be used."),
  313. editable=False,
  314. default=("pages.Page", "blog.BlogPost"),
  315. )
  316. register_setting(
  317. name="SEARCH_PER_PAGE",
  318. label=_("Search results per page"),
  319. description=_("Number of results shown in the search results page."),
  320. editable=True,
  321. default=10,
  322. )
  323. register_setting(
  324. name="SITE_PREFIX",
  325. description=_("A URL prefix for mounting all of Mezzanine's urlpatterns "
  326. "under. When using this, you'll also need to manually apply it to "
  327. "your project's root ``urls.py`` module. The root ``urls.py`` module "
  328. "provided by Mezzanine's ``mezzanine-project`` command contains an "
  329. "example of this towards its end."),
  330. editable=False,
  331. default="",
  332. )
  333. register_setting(
  334. name="SITE_TITLE",
  335. label=_("Site Title"),
  336. description=_("Title that will display at the top of the site, and be "
  337. "appended to the content of the HTML title tags on every page."),
  338. editable=True,
  339. default="Mezzanine",
  340. translatable=True,
  341. )
  342. register_setting(
  343. name="SITE_TAGLINE",
  344. label=_("Tagline"),
  345. description=_("A tag line that will appear at the top of all pages."),
  346. editable=True,
  347. default=_("An open source content management platform."),
  348. translatable=True,
  349. )
  350. register_setting(
  351. name="SLUGIFY",
  352. description=_("Dotted Python path to the callable for converting "
  353. "strings into URL slugs. Defaults to "
  354. "``mezzanine.utils.urls.slugify_unicode`` which allows for non-ascii "
  355. "URLs. Change to ``django.template.defaultfilters.slugify`` to use "
  356. "Django's slugify function, or something of your own if required."),
  357. editable=False,
  358. default="mezzanine.utils.urls.slugify_unicode",
  359. )
  360. register_setting(
  361. name="SPAM_FILTERS",
  362. description=_("Sequence of dotted Python paths to callable functions "
  363. "used for checking posted content (such as forms or comments) is "
  364. "spam. Each function should accept three arguments: the request "
  365. "object, the form object, and the URL that was posted from. "
  366. "Defaults to ``mezzanine.utils.views.is_spam_akismet`` which will "
  367. "use the http://akismet.com spam filtering service when the "
  368. "``AKISMET_API_KEY`` setting is configured."),
  369. editable=False,
  370. default=("mezzanine.utils.views.is_spam_akismet",),
  371. )
  372. register_setting(
  373. name="SSL_ENABLED",
  374. label=_("Enable SSL"),
  375. description=_("If ``True``, users will be automatically redirected to "
  376. "HTTPS for the URLs specified by the ``SSL_FORCE_URL_PREFIXES`` "
  377. "setting."),
  378. editable=False,
  379. default=False,
  380. )
  381. register_setting(
  382. name="SSL_FORCE_HOST",
  383. label=_("Force Host"),
  384. description=_("Host name that the site should always be accessed via that "
  385. "matches the SSL certificate."),
  386. editable=False,
  387. default="",
  388. )
  389. register_setting(
  390. name="SSL_FORCE_URL_PREFIXES",
  391. description="Sequence of URL prefixes that will be forced to run over "
  392. "SSL when ``SSL_ENABLED`` is ``True``. i.e. "
  393. "('/admin', '/example') would force all URLs beginning with "
  394. "/admin or /example to run over SSL.",
  395. editable=False,
  396. default=("/admin", "/account"),
  397. )
  398. register_setting(
  399. name="SSL_FORCED_PREFIXES_ONLY",
  400. description=_("If ``True``, only URLs specified by the "
  401. "``SSL_FORCE_URL_PREFIXES`` setting will be accessible over SSL, "
  402. "and all other URLs will be redirected back to HTTP if accessed "
  403. "over HTTPS."),
  404. editable=False,
  405. default=True,
  406. )
  407. register_setting(
  408. name="STOP_WORDS",
  409. description=_("List of words which will be stripped from search queries."),
  410. editable=False,
  411. default=(
  412. "a", "about", "above", "above", "across", "after",
  413. "afterwards", "again", "against", "all", "almost", "alone",
  414. "along", "already", "also", "although", "always", "am",
  415. "among", "amongst", "amoungst", "amount", "an", "and",
  416. "another", "any", "anyhow", "anyone", "anything", "anyway",
  417. "anywhere", "are", "around", "as", "at", "back", "be",
  418. "became", "because", "become", "becomes", "becoming", "been",
  419. "before", "beforehand", "behind", "being", "below", "beside",
  420. "besides", "between", "beyond", "bill", "both", "bottom",
  421. "but", "by", "call", "can", "cannot", "cant", "co", "con",
  422. "could", "couldnt", "cry", "de", "describe", "detail", "do",
  423. "done", "down", "due", "during", "each", "eg", "eight",
  424. "either", "eleven", "else", "elsewhere", "empty", "enough",
  425. "etc", "even", "ever", "every", "everyone", "everything",
  426. "everywhere", "except", "few", "fifteen", "fifty", "fill",
  427. "find", "fire", "first", "five", "for", "former", "formerly",
  428. "forty", "found", "four", "from", "front", "full", "further",
  429. "get", "give", "go", "had", "has", "hasnt", "have", "he",
  430. "hence", "her", "here", "hereafter", "hereby", "herein",
  431. "hereupon", "hers", "herself", "him", "himself", "his",
  432. "how", "however", "hundred", "ie", "if", "in", "inc",
  433. "indeed", "interest", "into", "is", "it", "its", "itself",
  434. "keep", "last", "latter", "latterly", "least", "less", "ltd",
  435. "made", "many", "may", "me", "meanwhile", "might", "mill",
  436. "mine", "more", "moreover", "most", "mostly", "move", "much",
  437. "must", "my", "myself", "name", "namely", "neither", "never",
  438. "nevertheless", "next", "nine", "no", "nobody", "none",
  439. "noone", "nor", "not", "nothing", "now", "nowhere", "of",
  440. "off", "often", "on", "once", "one", "only", "onto", "or",
  441. "other", "others", "otherwise", "our", "ours", "ourselves",
  442. "out", "over", "own", "part", "per", "perhaps", "please",
  443. "put", "rather", "re", "same", "see", "seem", "seemed",
  444. "seeming", "seems", "serious", "several", "she", "should",
  445. "show", "side", "since", "sincere", "six", "sixty", "so",
  446. "some", "somehow", "someone", "something", "sometime",
  447. "sometimes", "somewhere", "still", "such", "system", "take",
  448. "ten", "than", "that", "the", "their", "them", "themselves",
  449. "then", "thence", "there", "thereafter", "thereby",
  450. "therefore", "therein", "thereupon", "these", "they",
  451. "thickv", "thin", "third", "this", "those", "though",
  452. "three", "through", "throughout", "thru", "thus", "to",
  453. "together", "too", "top", "toward", "towards", "twelve",
  454. "twenty", "two", "un", "under", "until", "up", "upon", "us",
  455. "very", "via", "was", "we", "well", "were", "what", "whatever",
  456. "when", "whence", "whenever", "where", "whereafter", "whereas",
  457. "whereby", "wherein", "whereupon", "wherever", "whether",
  458. "which", "while", "whither", "who", "whoever", "whole", "whom",
  459. "whose", "why", "will", "with", "within", "without", "would",
  460. "yet", "you", "your", "yours", "yourself", "yourselves", "the",
  461. ),
  462. )
  463. register_setting(
  464. name="TAG_CLOUD_SIZES",
  465. label=_("Tag Cloud Sizes"),
  466. description=_("Number of different sizes for tags when shown as a cloud."),
  467. editable=True,
  468. default=4,
  469. )
  470. register_setting(
  471. name="TEMPLATE_ACCESSIBLE_SETTINGS",
  472. description=_("Sequence of setting names available within templates."),
  473. editable=False,
  474. append=True,
  475. default=(
  476. "ACCOUNTS_APPROVAL_REQUIRED", "ACCOUNTS_VERIFICATION_REQUIRED",
  477. "ADMIN_MENU_COLLAPSED",
  478. "BITLY_ACCESS_TOKEN", "BLOG_USE_FEATURED_IMAGE",
  479. "COMMENTS_DISQUS_SHORTNAME", "COMMENTS_NUM_LATEST",
  480. "COMMENTS_DISQUS_API_PUBLIC_KEY", "COMMENTS_DISQUS_API_SECRET_KEY",
  481. "COMMENTS_USE_RATINGS", "DEV_SERVER", "FORMS_USE_HTML5",
  482. "GRAPPELLI_INSTALLED", "GOOGLE_ANALYTICS_ID", "JQUERY_FILENAME",
  483. "JQUERY_UI_FILENAME", "LOGIN_URL", "LOGOUT_URL", "SITE_TITLE",
  484. "SITE_TAGLINE", "USE_L10N", "USE_MODELTRANSLATION",
  485. ),
  486. )
  487. register_setting(
  488. name="THUMBNAILS_DIR_NAME",
  489. description=_("Directory name to store thumbnails in, that will be "
  490. "created relative to the original image's directory."),
  491. editable=False,
  492. default=".thumbnails",
  493. )
  494. register_setting(
  495. name="TINYMCE_SETUP_JS",
  496. description=_("URL for the JavaScript file (relative to ``STATIC_URL``) "
  497. "that handles configuring TinyMCE when the default "
  498. "``RICHTEXT_WIDGET_CLASS`` is used."),
  499. editable=False,
  500. default="mezzanine/js/tinymce_setup.js",
  501. )
  502. register_setting(
  503. name="UPLOAD_TO_HANDLERS",
  504. description=_("Dict mapping file field names in the format "
  505. "``app_label.model_name.field_name`` to the Python dotted path "
  506. "to function names that will be used for the file field's "
  507. "``upload_to`` argument."),
  508. editable=False,
  509. default={},
  510. )
  511. # The following settings are defined here for documentation purposes
  512. # as this file is used to auto-generate the documentation for all
  513. # available settings. They are Mezzanine specific, but their values
  514. # are *always* overridden by the project's settings or local_settings
  515. # modules, so the default values defined here will never be used.
  516. register_setting(
  517. name="USE_MODELTRANSLATION",
  518. description=_("If ``True``, the django-modeltranslation application will "
  519. "be automatically added to the ``INSTALLED_APPS`` setting."),
  520. editable=False,
  521. default=False,
  522. )
  523. register_setting(
  524. name="NEVERCACHE_KEY",
  525. description=_("Unique random string like ``SECRET_KEY``, but used for "
  526. "two-phased cache responses. Like ``SECRET_KEY``, should be "
  527. "automatically generated by the ``mezzanine-project`` command."),
  528. editable=False,
  529. default="",
  530. )