fixtures.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from misago.settings.fixtures import load_settings_fixture, update_settings_fixture
  2. from misago.utils import ugettext_lazy as _
  3. from misago.utils import get_msgid
  4. settings_fixtures = (
  5. # Avatars Settings
  6. ('tos', {
  7. 'name': _("Forum Terms of Service"),
  8. 'description': _("Those settings allow you to set up forum terms of service."),
  9. 'settings': (
  10. ('tos_title', {
  11. 'value': "Terms of Service",
  12. 'type': "string",
  13. 'input': "text",
  14. 'separator': _("Terms of Service Options"),
  15. 'name': _("Page Title"),
  16. 'description': _("Title of page community ToS are displayed on."),
  17. }),
  18. ('tos_url', {
  19. 'value': "",
  20. 'type': "string",
  21. 'input': "text",
  22. 'name': _("Link to remote page with ToS"),
  23. 'description': _("If your forum's ToS are located on remote page, enter here its address."),
  24. }),
  25. ('tos_content', {
  26. 'value': "",
  27. 'type': "string",
  28. 'input': "textarea",
  29. 'name': _("OR enter ToS content"),
  30. 'description': _("Instead of linking to remote page, forum can create dedicated ToS page for you. To display ToS page, enter here your forum Terms of Service."),
  31. }),
  32. ),
  33. }),
  34. )
  35. def load_fixtures():
  36. load_settings_fixture(settings_fixtures)
  37. def update_fixtures():
  38. update_settings_fixture(settings_fixtures)