Skip to content

Commit

Permalink
#702: further cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Feb 26, 2017
1 parent 0d3b72c commit 956d702
Show file tree
Hide file tree
Showing 12 changed files with 745 additions and 615 deletions.
1 change: 1 addition & 0 deletions misago/acl/providers.py
Expand Up @@ -5,6 +5,7 @@

class PermissionProviders(object):
"""manager for permission providers"""

def __init__(self):
self._initialized = False
self._providers = []
Expand Down
128 changes: 71 additions & 57 deletions misago/core/migrations/0002_basic_settings.py
Expand Up @@ -21,68 +21,82 @@ def create_basic_settings_group(apps, schema_editor):
"Those settings control most basic properties "
"of your forum like its name or description."
),
'settings': ({
'setting': 'forum_name',
'name': _("Forum name"),
'legend': _("General"),
'value': "Misago",
'field_extra': {
'min_length': 2,
'max_length': 255
'settings': [
{
'setting': 'forum_name',
'name': _("Forum name"),
'legend': _("General"),
'value': "Misago",
'field_extra': {
'min_length': 2,
'max_length': 255
},
'is_public': True,
},
'is_public': True,
}, {
'setting': 'forum_index_title',
'name': _("Index title"),
'description': _("You may set custon title on "
"forum index by typing it here."),
'legend': _("Forum index"),
'field_extra': {
'max_length': 255
{
'setting':
'forum_index_title',
'name':
_("Index title"),
'description':
_("You may set custon title on "
"forum index by typing it here."),
'legend':
_("Forum index"),
'field_extra': {
'max_length': 255
},
'is_public':
True,
},
'is_public': True,
}, {
'setting': 'forum_index_meta_description',
'name': _("Meta Description"),
'description': _("Short description of your forum "
"for internet crawlers."),
'field_extra': {
'max_length': 255
{
'setting': 'forum_index_meta_description',
'name': _("Meta Description"),
'description': _("Short description of your forum "
"for internet crawlers."),
'field_extra': {
'max_length': 255
},
},
}, {
'setting': 'forum_branding_display',
'name': _("Display branding"),
'description': _("Switch branding in forum's navbar."),
'legend': _("Branding"),
'value': True,
'python_type': 'bool',
'form_field': 'yesno',
'is_public': True,
}, {
'setting': 'forum_branding_text',
'name': _("Branding text"),
'description': _("Optional text displayed besides "
"brand image in navbar."),
'value': "Misago",
'field_extra': {
'max_length': 255
{
'setting': 'forum_branding_display',
'name': _("Display branding"),
'description': _("Switch branding in forum's navbar."),
'legend': _("Branding"),
'value': True,
'python_type': 'bool',
'form_field': 'yesno',
'is_public': True,
},
'is_public': True,
}, {
'setting':
'email_footer',
'name':
_("E-mails footer"),
'description':
_("Optional short message included "
"at the end of e-mails sent by "
"forum"),
'legend':
_("Forum e-mails"),
'field_extra': {
'max_length': 255
{
'setting': 'forum_branding_text',
'name': _("Branding text"),
'description': _("Optional text displayed besides "
"brand image in navbar."),
'value': "Misago",
'field_extra': {
'max_length': 255
},
'is_public': True,
},
}, )
{
'setting':
'email_footer',
'name':
_("E-mails footer"),
'description':
_(
"Optional short message included "
"at the end of e-mails sent by "
"forum"
),
'legend':
_("Forum e-mails"),
'field_extra': {
'max_length': 255
},
},
],
}
)

Expand Down
227 changes: 117 additions & 110 deletions misago/legal/migrations/0001_initial.py
Expand Up @@ -19,123 +19,130 @@ def create_legal_settings_group(apps, schema_editor):
'description':
_("Those settings allow you to set forum terms of "
"service and privacy policy"),
'settings': ({
'setting': 'terms_of_service_title',
'name': _("Terms title"),
'legend': _("Terms of Service"),
'description': _("Leave this field empty to "
"use default title."),
'value': "",
'field_extra': {
'max_length': 255,
'required': False,
'settings': [
{
'setting': 'terms_of_service_title',
'name': _("Terms title"),
'legend': _("Terms of Service"),
'description': _("Leave this field empty to use default title."),
'value': "",
'field_extra': {
'max_length': 255,
'required': False,
},
'is_public': True,
},
'is_public': True,
}, {
'setting':
'terms_of_service_link',
'name':
_("Terms link"),
'description':
_("If terms of service are located "
"on other page, enter there its link."),
'value':
"",
'field_extra': {
'max_length': 255,
'required': False,
{
'setting':
'terms_of_service_link',
'name':
_("Terms link"),
'description':
_(
"If terms of service are located "
"on other page, enter there its link."
),
'value':
"",
'field_extra': {
'max_length': 255,
'required': False,
},
'is_public':
True,
},
'is_public':
True,
}, {
'setting':
'terms_of_service',
'name':
_("Terms contents"),
'description':
_(
"Your forums can have custom terms of "
"service page. To create it, write or "
"paste here its contents. Full Misago "
"markup is available for formatting."
),
'value':
"",
'form_field':
'textarea',
'field_extra': {
'max_length': 128000,
'required': False,
'rows': 8,
{
'setting':
'terms_of_service',
'name':
_("Terms contents"),
'description':
_(
"Your forums can have custom terms of "
"service page. To create it, write or "
"paste here its contents. Full Misago "
"markup is available for formatting."
),
'value':
"",
'form_field':
'textarea',
'field_extra': {
'max_length': 128000,
'required': False,
'rows': 8,
},
'is_public':
True,
'is_lazy':
True,
},
'is_public':
True,
'is_lazy':
True,
}, {
'setting': 'privacy_policy_title',
'name': _("Policy title"),
'legend': _("Privacy policy"),
'description': _("Leave this field empty to "
"use default title."),
'value': "",
'field_extra': {
'max_length': 255,
'required': False,
{
'setting': 'privacy_policy_title',
'name': _("Policy title"),
'legend': _("Privacy policy"),
'description': _("Leave this field empty to use default title."),
'value': "",
'field_extra': {
'max_length': 255,
'required': False,
},
'is_public': True,
},
'is_public': True,
}, {
'setting':
'privacy_policy_link',
'name':
_("Policy link"),
'description':
_("If privacy policy is located on "
"other page, enter there its link."),
'value':
"",
'field_extra': {
'max_length': 255,
'required': False,
{
'setting':
'privacy_policy_link',
'name':
_("Policy link"),
'description':
_("If privacy policy is located on "
"other page, enter there its link."),
'value':
"",
'field_extra': {
'max_length': 255,
'required': False,
},
'is_public':
True,
},
'is_public':
True,
}, {
'setting':
'privacy_policy',
'name':
_("Policy contents"),
'description':
_(
"Your forums can have custom privacy "
"policy page. To create it, write or "
"paste here its contents. Full Misago "
"markup is available for formatting."
),
'value':
"",
'form_field':
'textarea',
'field_extra': {
'max_length': 128000,
'required': False,
'rows': 8,
{
'setting':
'privacy_policy',
'name':
_("Policy contents"),
'description':
_(
"Your forums can have custom privacy "
"policy page. To create it, write or "
"paste here its contents. Full Misago "
"markup is available for formatting."
),
'value':
"",
'form_field':
'textarea',
'field_extra': {
'max_length': 128000,
'required': False,
'rows': 8,
},
'is_public':
True,
'is_lazy':
True,
},
'is_public':
True,
'is_lazy':
True,
}, {
'setting': 'forum_footnote',
'name': _("Footnote"),
'description': _("Short message displayed "
"in forum footer."),
'legend': _("Forum footer"),
'field_extra': {
'max_length': 300
{
'setting': 'forum_footnote',
'name': _("Footnote"),
'description': _("Short message displayed in forum footer."),
'legend': _("Forum footer"),
'field_extra': {
'max_length': 300
},
'is_public': True,
},
'is_public': True,
}, )
],
}
)

Expand Down

0 comments on commit 956d702

Please sign in to comment.