0002_basic_settings.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import models, migrations
  4. from django.utils.translation import ugettext as _
  5. from misago.conf.migrationutils import migrate_settings_group
  6. def create_basic_settings_group(apps, schema_editor):
  7. migrate_settings_group(
  8. apps,
  9. {
  10. 'key': 'basic',
  11. 'name': _("Basic forum settings"),
  12. 'description': _("Those settings control most basic properties "
  13. "of your forum like its name or description."),
  14. 'settings': (
  15. {
  16. 'setting': 'forum_name',
  17. 'name': _("Forum name"),
  18. 'legend': _("General"),
  19. 'value': "Misago",
  20. 'field_extra': {
  21. 'min_length': 2,
  22. 'max_length': 255
  23. },
  24. },
  25. {
  26. 'setting': 'forum_index_title',
  27. 'name': _("Forum index title"),
  28. 'description': _("You may set custon title on "
  29. "forum index by typing it here."),
  30. 'legend': _("Forum index"),
  31. 'field_extra': {
  32. 'max_length': 255
  33. },
  34. },
  35. {
  36. 'setting': 'forum_index_meta_description',
  37. 'name': _("Forum index Meta Description"),
  38. 'description': _("Short description of your forum "
  39. "for internet crawlers."),
  40. 'field_extra': {
  41. 'max_length': 255
  42. },
  43. },
  44. {
  45. 'setting': 'email_footer',
  46. 'name': _("E-mails footer"),
  47. 'description': _("Optional short message included "
  48. "at the end of e-mails sent by "
  49. "forum"),
  50. 'legend': _("Forum e-mails"),
  51. 'field_extra': {
  52. 'max_length': 255
  53. },
  54. },
  55. )
  56. })
  57. class Migration(migrations.Migration):
  58. dependencies = [
  59. ('misago_core', '0001_initial'),
  60. ('misago_conf', '0001_initial'),
  61. ]
  62. operations = [
  63. migrations.RunPython(create_basic_settings_group),
  64. ]