fixtures.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. from misago.settings.fixtures import load_settings_fixture
  2. from misago.utils import ugettext_lazy as _
  3. from misago.utils import get_msgid
  4. settings_fixtures = (
  5. # Spam Countermeasures
  6. ('spam', {
  7. 'name': _("Spam Countermeasures"),
  8. 'description': _("Those settings allow you to combat automatic registrations and spam messages on your forum."),
  9. 'settings': (
  10. ('bots_registration', {
  11. 'type': "string",
  12. 'input': "choice",
  13. 'extra': {'choices': [('', _("No protection")), ('recaptcha', _("reCaptcha")), ('qa', _("Question & Answer"))]},
  14. 'separator': _("Spambots Registrations"),
  15. 'name': _("CAPTCHA type"),
  16. 'description': _('CAPTCHA stands for "Completely Automated Public Turing test to tell Computers and Humans Apart". Its type of test developed on purpose of blocking automatic registrations.'),
  17. }),
  18. ('recaptcha_public', {
  19. 'type': "string",
  20. 'input': "text",
  21. 'separator': _("reCaptcha"),
  22. 'name': _("Public Key"),
  23. 'description': _("Enter public API key that you have received from reCaptcha."),
  24. }),
  25. ('recaptcha_private', {
  26. 'type': "string",
  27. 'input': "text",
  28. 'name': _("Private Key"),
  29. 'description': _("Enter private API key that you have received from reCaptcha."),
  30. }),
  31. ('qa_test', {
  32. 'type': "string",
  33. 'input': "text",
  34. 'separator': _("Question and Answer Test"),
  35. 'name': _("Question"),
  36. 'description': _("Question visible to your users."),
  37. }),
  38. ('qa_test_help', {
  39. 'type': "string",
  40. 'input': "text",
  41. 'name': _("Help Message"),
  42. 'description': _("Optional help message displayed on form."),
  43. }),
  44. ('qa_test_answers', {
  45. 'type': "string",
  46. 'input': "textarea",
  47. 'name': _("Answers"),
  48. 'description': _("Enter allowed answers to this question, each in new line. Test is case-insensitive."),
  49. }),
  50. ),
  51. }),
  52. )
  53. def load_fixture():
  54. load_settings_fixture(settings_fixtures)