def load(): AttachmentType.objects.create( name=_('Image file').message, extensions='gif,jpg,jpeg,png', size_limit=0, ) AttachmentType.objects.create( name=_('Archive').message, extensions='rar,zip,7z,tar.gz', size_limit=0, ) AttachmentType.objects.create( name=_('Document').message, extensions='pdf,txt,doc,docx,xls,xlsx,xlsm,xlsb', size_limit=0, )
def load(): AttachmentType.objects.create( name=_('Image file').message, extensions='gif,jpg,jpeg,png', size_limit=0, ) AttachmentType.objects.create( name=_('Archive').message, extensions='rar,zip,7z,tar.gz', size_limit=0, ) AttachmentType.objects.create( name=_('Document').message, extensions='pdf,txt,doc,docx,xls,xlsx,xlsm,xlsb', size_limit=0, )
def load(): Rank.objects.create( name=_("Forum Team").message, slug='forum-team', title=_("Forum Team").message, style='team', special=True, order=0, as_tab=True, on_index=True, ) Rank.objects.create( name=_("Most Valuable Posters").message, slug='most-valuable-posters', title=_("MVP").message, style='mvp', special=True, order=1, as_tab=True, ) Rank.objects.create( name=_("Top Posters").message, slug='top-posters', title="Top", style='top', order=2, criteria="10%", as_tab=True, ) Rank.objects.create( name=_("Members").message, slug='members', order=4, criteria="75%" ) Rank.objects.create( name=_("Lurkers").message, slug='lurkers', order=5, criteria="100%" )
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('accounts', { 'name': _("Users Accounts Settings"), 'description': _("Those settings allow you to increase security of your members accounts."), 'settings': ( ('account_activation', { 'type': "string", 'input': "choice", 'extra': {'choices': [('', _("No validation required")), ('user', _("Activation Token sent to User")), ('admin', _("Activation by Administrator")), ('block', _("Dont allow new registrations"))]}, 'separator': _("Users Registrations"), 'name': _("New accounts validation"), }), ('default_timezone', { 'value': "utc", 'type': "string", 'input': "select", 'extra': {'choices': '#TZ#'}, 'name': _("Default Timezone"), 'description': _("Used by guests, crawlers and newly registered users."), }), ('username_length_min', { 'value': 3, 'type': "integer", 'input': "text", 'extra': {'min': 3}, 'separator': _("Users Names"), 'name': _("Minimum allowed username length"),
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Threads Settings ('threads', { 'name': _("Threads and Posts Settings"), 'description': _("Those settings control your forum's threads and posts."), 'settings': ( ('thread_name_min', { 'value': 4, 'type': "integer", 'input': "text", 'extra': {'min': 1}, 'separator': _("Threads"), 'name': _("Min. Thread Name Length"), 'description': _('Minimal allowed thread name length.'), }), ('thread_name_max', { 'value': 150, 'type': "integer", 'input': "text", 'extra': {'min': 5, 'max': 250}, 'name': _("Max. Thread Name Length"), 'description': _('Maximum allowed thread name length.'), }), ('threads_per_page', { 'value': 25, 'type': "integer", 'input': "text", 'extra': {'min': 5},
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Spam Countermeasures ('captcha', { 'name': _("Spam Countermeasures"), 'description': _("Those settings allow you to combat automatic registrations and spam messages on your forum."), 'settings': ( ('bots_registration', { 'value': 'no', 'type': "string", 'input': "choice", 'extra': {'choices': [('no', _("No protection")), ('recaptcha', _("reCaptcha")), ('qa', _("Question & Answer"))]}, 'separator': _("Spambots Registrations"), 'name': _("CAPTCHA type"), '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.'), }), ('recaptcha_public', { 'type': "string", 'input': "text", 'separator': _("reCaptcha"), 'name': _("Public Key"), 'description': _("Enter public API key that you have received from reCaptcha."), }), ('recaptcha_private', { 'type': "string", 'input': "text", 'name': _("Private Key"), 'description': _("Enter private API key that you have received from reCaptcha."), }),
def load(): role = Role(name=_("Administrator").message, _special='admin', protected=True) role.permissions = { 'name_changes_allowed': 5, 'changes_expire': 7, 'can_search_forums': True, 'search_cooldown': 0, 'can_use_acp': True, 'can_use_mcp': True, 'can_use_signature': True, 'allow_signature_links': True, 'allow_signature_images': True, 'can_search_users': True, 'can_see_users_emails': True, 'can_see_users_trails': True, 'can_see_hidden_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': True, 'private_thread_attachment_size': 0, 'private_thread_attachments_limit': 0, 'can_invite_ignoring': True, 'private_threads_mod': True, 'can_delete_checkpoints': 2, 'can_report_content': True, 'can_handle_reports': True, 'can_mod_reports_discussions': True, 'can_delete_reports': True, 'forums': { 3: 1, 5: 1, 6: 1 }, } role.save(force_insert=True) role = Role(name=_("Moderator").message, _special='mod', protected=True) role.permissions = { 'name_changes_allowed': 3, 'changes_expire': 14, 'can_search_forums': True, 'search_cooldown': 0, 'can_use_mcp': True, 'can_use_signature': True, 'allow_signature_links': True, 'can_search_users': True, 'can_see_users_emails': True, 'can_see_users_trails': True, 'can_see_hidden_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': True, 'private_thread_attachment_size': 0, 'private_thread_attachments_limit': 0, 'can_invite_ignoring': True, 'private_threads_mod': True, 'can_delete_checkpoints': 1, 'can_report_content': True, 'can_handle_reports': True, 'forums': { 3: 1, 5: 1, 6: 1 }, } role.save(force_insert=True) role = Role(name=_("Registered").message, _special='registered') role.permissions = { 'name_changes_allowed': 2, 'can_search_forums': True, 'search_cooldown': 20, 'can_use_signature': False, 'can_search_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': False, 'private_thread_attachment_size': 100, 'private_thread_attachments_limit': 30, 'can_invite_ignoring': False, 'private_threads_mod': False, 'can_report_content': True, 'forums': { 4: 3, 5: 3, 6: 3 }, } role.save(force_insert=True) role = Role(name=_("Guest").message, _special='guest') role.permissions = { 'can_search_forums': True, 'search_cooldown': 45, 'can_search_users': True, 'forums': { 4: 6, 5: 6, 6: 6 }, } role.save(force_insert=True)
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('brute-force', { 'name': _("Brute-force Countermeasures"), 'description': _("Those settings allow you to protect your forum from brute-force attacks." ), 'settings': ( ('attempts_limit', { 'value': 3, 'default': 3, 'type': "integer", 'input': "text", 'separator': _("Brute-force Countermeasures"), 'name': _("IP invalid attempts limit"), 'description': _('Enter maximal number of allowed attempts before IP address "jams". Defautly forum records only failed sign-in attempts.' ), }), ('registrations_jams', { 'value':
def load(): role = ForumRole() role.name = _('Full Access').message role.permissions = { 'can_see_forum': True, 'can_see_forum_contents': True, 'can_read_threads': 2, 'can_start_threads': 2, 'can_edit_own_threads': True, 'can_soft_delete_own_threads': True, 'can_write_posts': 2, 'can_edit_own_posts': True, 'can_soft_delete_own_posts': True, 'can_upvote_posts': True, 'can_downvote_posts': True, 'can_see_posts_scores': 2, 'can_see_votes': True, 'can_make_polls': True, 'can_vote_in_polls': True, 'can_see_poll_votes': True, 'can_see_attachments': True, 'can_upload_attachments': True, 'can_download_attachments': True, 'attachment_size': 5000, 'attachment_limit': 15, 'can_approve': True, 'can_edit_labels': True, 'can_see_changelog': True, 'can_pin_threads': 2, 'can_edit_threads_posts': True, 'can_move_threads_posts': True, 'can_close_threads': True, 'can_protect_posts': True, 'can_delete_threads': 2, 'can_delete_posts': 2, 'can_delete_polls': 2, 'can_delete_attachments': True, 'can_see_deleted_checkpoints': True, 'can_delete_checkpoints': 2, } role.save(force_insert=True) role = ForumRole() role.name = _('Standard Access and Upload').message role.permissions = { 'can_see_forum': True, 'can_see_forum_contents': True, 'can_read_threads': 2, 'can_start_threads': 2, 'can_edit_own_threads': True, 'can_write_posts': 2, 'can_edit_own_posts': True, 'can_soft_delete_own_posts': True, 'can_upvote_posts': True, 'can_downvote_posts': True, 'can_see_posts_scores': 2, 'can_make_polls': True, 'can_vote_in_polls': True, 'can_upload_attachments': True, 'can_download_attachments': True, 'attachment_size': 100, 'attachment_limit': 3, } role.save(force_insert=True) role = ForumRole() role.name = _('Standard Access').message role.permissions = { 'can_see_forum': True, 'can_see_forum_contents': True, 'can_read_threads': 2, 'can_start_threads': 2, 'can_edit_own_threads': True, 'can_write_posts': 2, 'can_edit_own_posts': True, 'can_soft_delete_own_posts': True, 'can_upvote_posts': True, 'can_downvote_posts': True, 'can_see_posts_scores': 2, 'can_make_polls': True, 'can_vote_in_polls': True, 'can_download_attachments': True, } role.save(force_insert=True) role = ForumRole() role.name = _('Read and Download').message role.permissions = { 'can_see_forum': True, 'can_see_forum_contents': True, 'can_read_threads': 2, 'can_download_attachments': True, 'can_see_posts_scores': 2, } role.save(force_insert=True) role = ForumRole() role.name = _('Threads list only').message role.permissions = { 'can_see_forum': True, 'can_see_forum_contents': True, } role.save(force_insert=True) role = ForumRole() role.name = _('Read only').message role.permissions = { 'can_see_forum': True, 'can_see_forum_contents': True, 'can_read_threads': 2, 'can_see_posts_scores': 2, } role.save(force_insert=True)
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('signin', { 'name': _("Sign-In and Sessions Settings"), 'description': _("Those settings control behaviour of signed-in accounts."), 'settings': ( ('sessions_validate_ip', { 'value': True, 'type': "boolean", 'input': "yesno", 'separator': _("Sessions Settings"), 'name': _("Check IP on session authorization"), 'description': _("Makes sessions more secure, but can cause problems with proxies and VPN's."), }), ('remember_me_allow', { 'value': True, 'type': "boolean", 'input': "yesno", 'separator': _('"Remember Me" Feature'), 'name': _('Enable "Remember Me" feature'), 'description': _("Turning this option on allows users to sign in on to your board using cookie-based tokens. This may result in account compromisation when user fails to sign out on shared computer or his cookie is stolen."), }), ('remember_me_lifetime', { 'value': 90, 'type': "integer", 'input': "text", 'name': _('"Remember Me" token lifetime'), 'description': _('Number of days since either last use or creation of "Remember Me" token to its expiration.'),
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Users Ranking Settings ('ranking', { 'name': _("Members Ranking"), 'description': _("Those settings control mechanisms of members activity ranking which allows you to gamificate your forum."), 'settings': ( ('ranking_inflation', { 'value': 5, 'type': "integer", 'input': "text", 'extra': {'min': 0, 'max': 99}, 'separator': _("Basic Ranking Settings"), 'name': _("Ranking Inflation"), 'description': _("Enter size of ranking scores inflation in percent. Scores inflation is important mechanism that allows ranking self-regulation, punishing inactivity and requiring users to remain active in order to remain high in ranking."), }), ('ranking_positions_visible', { 'value': True, 'type': "boolean", 'input': "yesno", 'name': _("Don't Keep Users Ranking Positions Secret"), 'description': _("Changing this to yes will cause forum to display user position in ranking on his profile page."), }), ('ranking_scores_visible', { 'value': True, 'type': "boolean", 'input': "yesno", 'name': _("Don't Keep Users Scores Secret"), 'description': _("Changing this to yes will cause forum to display user score on his profile page."),
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('accounts', { 'name': _("Users Accounts Settings"), 'description': _("Those settings allow you to increase security of your members accounts."), 'settings': ( ('account_activation', { 'value': "none", 'type': "string", 'input': "choice", 'extra': {'choices': [('none', _("No validation required")), ('user', _("Activation Token sent to User")), ('admin', _("Activation by Administrator")), ('block', _("Dont allow new registrations"))]}, 'separator': _("Users Registrations"), 'name': _("New accounts validation"), }), ('default_timezone', { 'value': "utc", 'type': "string", 'input': "select", 'extra': {'choices': '#TZ#'}, 'name': _("Default Timezone"), 'description': _("Used by guests, crawlers and newly registered users."), }), ('username_length_min', { 'value': 3, 'type': "integer", 'input': "text", 'extra': {'min': 3}, 'separator': _("Users Names"),
def load(): role = ForumRole() role.name = _("Full Access").message role.permissions = { "can_see_forum": True, "can_see_forum_contents": True, "can_read_threads": 2, "can_start_threads": 2, "can_edit_own_threads": True, "can_soft_delete_own_threads": True, "can_write_posts": 2, "can_edit_own_posts": True, "can_soft_delete_own_posts": True, "can_upvote_posts": True, "can_downvote_posts": True, "can_see_posts_scores": 2, "can_see_votes": True, "can_make_polls": True, "can_vote_in_polls": True, "can_see_poll_votes": True, "can_see_attachments": True, "can_upload_attachments": True, "can_download_attachments": True, "attachment_size": 5000, "attachment_limit": 15, "can_approve": True, "can_edit_labels": True, "can_see_changelog": True, "can_pin_threads": 2, "can_edit_threads_posts": True, "can_move_threads_posts": True, "can_close_threads": True, "can_protect_posts": True, "can_delete_threads": 2, "can_delete_posts": 2, "can_delete_polls": 2, "can_delete_attachments": True, "can_see_deleted_checkpoints": True, "can_delete_checkpoints": 2, } role.save(force_insert=True) role = ForumRole() role.name = _("Standard Access and Upload").message role.permissions = { "can_see_forum": True, "can_see_forum_contents": True, "can_read_threads": 2, "can_start_threads": 2, "can_edit_own_threads": True, "can_write_posts": 2, "can_edit_own_posts": True, "can_soft_delete_own_posts": True, "can_upvote_posts": True, "can_downvote_posts": True, "can_see_posts_scores": 2, "can_make_polls": True, "can_vote_in_polls": True, "can_upload_attachments": True, "can_download_attachments": True, "attachment_size": 100, "attachment_limit": 3, } role.save(force_insert=True) role = ForumRole() role.name = _("Standard Access").message role.permissions = { "can_see_forum": True, "can_see_forum_contents": True, "can_read_threads": 2, "can_start_threads": 2, "can_edit_own_threads": True, "can_write_posts": 2, "can_edit_own_posts": True, "can_soft_delete_own_posts": True, "can_upvote_posts": True, "can_downvote_posts": True, "can_see_posts_scores": 2, "can_make_polls": True, "can_vote_in_polls": True, "can_download_attachments": True, } role.save(force_insert=True) role = ForumRole() role.name = _("Read and Download").message role.permissions = { "can_see_forum": True, "can_see_forum_contents": True, "can_read_threads": 2, "can_download_attachments": True, "can_see_posts_scores": 2, } role.save(force_insert=True) role = ForumRole() role.name = _("Threads list only").message role.permissions = {"can_see_forum": True, "can_see_forum_contents": True} role.save(force_insert=True) role = ForumRole() role.name = _("Read only").message role.permissions = { "can_see_forum": True, "can_see_forum_contents": True, "can_read_threads": 2, "can_see_posts_scores": 2, } role.save(force_insert=True)
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Basic options ('basic', { 'name': _("Basic Settings"), 'settings': ( ('board_name', { 'value': "Misago", 'type': "string", 'input': "text", 'separator': _("Board Name"), 'name': _("Board Name"), }), ('board_header', { 'type': "string", 'input': "text", 'name': _("Board Header"), 'description': _("Some themes allow you to define text in board header. Leave empty to use Board Name instead."), }), ('board_header_postscript', { 'value': "Work in progress", 'type': "string", 'input': "text", 'name': _("Board Header Postscript"), 'description': _("Additional text displayed in some themes board header after board name."), }), ('board_index_title', { 'type': "string", 'input': "text",
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('signin', { 'name': _("Sign-In and Sessions Settings"), 'description': _("Those settings control behaviour of signed-in accounts."), 'settings': ( ('sessions_validate_ip', { 'value': True, 'type': "boolean", 'input': "yesno", 'separator': _("Sessions Settings"), 'name': _("Check IP on session authorization"), 'description': _("Makes sessions more secure, but can cause problems with proxies and VPN's." ), }), ('remember_me_allow', { 'value': True, 'type': "boolean",
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Avatars Settings ('avatars', { 'name': _("Users Avatars Settings"), 'description': _("Those settings allow you to control your users avatars."), 'settings': ( ('avatars_types', { 'value': ['gravatar', 'gallery'], 'type': "array", 'input': "mlist", 'extra': {'choices': [('gravatar', _("Gravatar")), ('upload', _("Uploaded Avatar")), ('gallery', _("Avatars Gallery"))]}, 'separator': _("General Settings"), 'name': _("Allowed Avatars"), 'description': _("Select Avatar types allowed on your forum."), }), ('default_avatar', { 'value': "gravatar", 'type': "string", 'input': "select", 'extra': {'choices': [('gravatar', _("Gravatar")), ('gallery', _("Random Avatar from Gallery"))]}, 'name': _("Default Avatar"), 'description': _("Default Avatar assigned to new members. If you creade directory and name it \"_default\", forum will select random avatar from that directory instead of regular gallery. If no avatar can be picked from gallery, Gravatar will be used."), }), ('upload_limit', { 'value': 128, 'type': "integer", 'input': "text", 'extra': {'min': 0},
def load(): role = Role(name=_("Administrator").message, _special="admin", protected=True) role.permissions = { "name_changes_allowed": 5, "changes_expire": 7, "can_search_forums": True, "search_cooldown": 0, "can_use_acp": True, "can_use_mcp": True, "can_use_signature": True, "allow_signature_links": True, "allow_signature_images": True, "can_search_users": True, "can_see_users_emails": True, "can_see_users_trails": True, "can_see_hidden_users": True, "can_use_private_threads": True, "can_start_private_threads": True, "can_upload_attachments_in_private_threads": True, "private_thread_attachment_size": 0, "private_thread_attachments_limit": 0, "can_invite_ignoring": True, "private_threads_mod": True, "can_delete_checkpoints": 2, "can_report_content": True, "can_handle_reports": True, "can_mod_reports_discussions": True, "can_delete_reports": True, "forums": {3: 1, 5: 1, 6: 1}, } role.save(force_insert=True) role = Role(name=_("Moderator").message, _special="mod", protected=True) role.permissions = { "name_changes_allowed": 3, "changes_expire": 14, "can_search_forums": True, "search_cooldown": 0, "can_use_mcp": True, "can_use_signature": True, "allow_signature_links": True, "can_search_users": True, "can_see_users_emails": True, "can_see_users_trails": True, "can_see_hidden_users": True, "can_use_private_threads": True, "can_start_private_threads": True, "can_upload_attachments_in_private_threads": True, "private_thread_attachment_size": 0, "private_thread_attachments_limit": 0, "can_invite_ignoring": True, "private_threads_mod": True, "can_delete_checkpoints": 1, "can_report_content": True, "can_handle_reports": True, "forums": {3: 1, 5: 1, 6: 1}, } role.save(force_insert=True) role = Role(name=_("Registered").message, _special="registered") role.permissions = { "name_changes_allowed": 2, "can_search_forums": True, "search_cooldown": 20, "can_use_signature": False, "can_search_users": True, "can_use_private_threads": True, "can_start_private_threads": True, "can_upload_attachments_in_private_threads": False, "private_thread_attachment_size": 100, "private_thread_attachments_limit": 30, "can_invite_ignoring": False, "private_threads_mod": False, "can_report_content": True, "forums": {4: 3, 5: 3, 6: 3}, } role.save(force_insert=True) role = Role(name=_("Guest").message, _special="guest") role.permissions = { "can_search_forums": True, "search_cooldown": 45, "can_search_users": True, "forums": {4: 6, 5: 6, 6: 6}, } role.save(force_insert=True)
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Threads Settings ('private-threads', { 'name': _("Private Threads Settings"), 'description': _("Those settings control your forum's private threads."), 'settings': ( ('enable_private_threads', { 'value': True, 'type': "boolean", 'input': "yesno", 'separator': _("Private Threads"), 'name': _("Enable Private Threads"), }), ), }), ) def load(): load_settings_fixture(settings_fixture) def update(): update_settings_fixture(settings_fixture)
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Threads Settings ('threads', { 'name': _("Threads and Posts Settings"), 'description': _("Those settings control your forum's threads and posts."), 'settings': ( ('thread_name_min', { 'value': 4, 'type': "integer", 'input': "text", 'extra': { 'min': 1 }, 'separator': _("Threads"), 'name': _("Min. Thread Name Length"), 'description': _('Minimal allowed thread name length.'), }), ('thread_name_max', { 'value': 150, 'type': "integer", 'input': "text", 'extra': { 'min': 5, 'max': 250 }, 'name': _("Max. Thread Name Length"),
def load(): role = Role(name=_("Administrator").message, _special='admin', protected=True) role.permissions = { 'name_changes_allowed': 5, 'changes_expire': 7, 'can_search_forums': True, 'search_cooldown': 0, 'can_use_acp': True, 'can_use_signature': True, 'allow_signature_links': True, 'allow_signature_images': True, 'can_search_users': True, 'can_see_users_emails': True, 'can_see_users_trails': True, 'can_see_hidden_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': True, 'private_thread_attachment_size': 0, 'private_thread_attachments_limit': 0, 'can_invite_ignoring': True, 'private_threads_mod': True, 'can_delete_checkpoints': 2, 'can_report_content': True, 'can_handle_reports': True, 'can_mod_reports_discussions': True, 'can_delete_reports': True, 'forums': {3: 1, 5: 1, 6: 1}, 'can_destroy_user_newer_than': 14, 'can_destroy_users_with_less_posts_than': 10, 'can_warn_members': True, 'can_see_other_members_warns': True, 'can_cancel_warnings': 2, 'can_cancel_warnings_newer_than': 0, 'can_delete_warnings': True, 'can_be_warned': False, } role.save(force_insert=True) role = Role(name=_("Moderator").message, _special='mod', protected=True) role.permissions = { 'name_changes_allowed': 3, 'changes_expire': 14, 'can_search_forums': True, 'search_cooldown': 0, 'can_use_signature': True, 'allow_signature_links': True, 'can_search_users': True, 'can_see_users_emails': True, 'can_see_users_trails': True, 'can_see_hidden_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': True, 'private_thread_attachment_size': 500, 'private_thread_attachments_limit': 4, 'can_invite_ignoring': True, 'private_threads_mod': True, 'can_delete_checkpoints': 1, 'can_report_content': True, 'can_handle_reports': True, 'forums': {3: 1, 5: 1, 6: 1}, 'can_destroy_user_newer_than': 5, 'can_destroy_users_with_less_posts_than': 10, 'can_warn_members': True, 'can_see_other_members_warns': True, 'can_cancel_warnings': 1, 'can_cancel_warnings_newer_than': 30, 'can_delete_warnings': False, 'can_be_warned': False, } role.save(force_insert=True) role = Role(name=_("Registered").message, _special='registered') role.permissions = { 'name_changes_allowed': 2, 'can_search_forums': True, 'search_cooldown': 20, 'can_use_signature': False, 'can_search_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': False, 'private_thread_attachment_size': 100, 'private_thread_attachments_limit': 3, 'can_invite_ignoring': False, 'private_threads_mod': False, 'can_report_content': True, 'forums': {4: 3, 5: 3, 6: 3}, } role.save(force_insert=True) role = Role(name=_("Guest").message, _special='guest') role.permissions = { 'can_search_forums': True, 'search_cooldown': 45, 'can_search_users': True, 'forums': {4: 6, 5: 6, 6: 6}, } role.save(force_insert=True)
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Avatars Settings ('tos', { 'name': _("Forum Terms of Service"), 'description': _("Those settings allow you to set up forum terms of service."), 'settings': ( ('tos_title', { 'value': "Terms of Service", 'type': "string", 'input': "text", 'separator': _("Terms of Service Options"), 'name': _("Page Title"), 'description': _("Title of page community ToS are displayed on."), }), ('tos_url', { 'value': "", 'type': "string", 'input': "text", 'name': _("Link to remote page with ToS"), 'description': _("If your forum's ToS are located on remote page, enter here its address."), }), ('tos_content', { 'value': "", 'type': "string", 'input': "textarea", 'name': _("OR enter ToS content"), '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."), }),
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Avatars Settings ('tos', { 'name': _("Forum Terms of Service"), 'description': _("Those settings allow you to set up forum terms of service."), 'settings': ( ('tos_title', { 'value': "Terms of Service", 'type': "string", 'input': "text", 'separator': _("Terms of Service Options"), 'name': _("Page Title"), 'description': _("Title of page community ToS are displayed on."), }), ('tos_url', { 'value': "", 'type': "string", 'input': "text", 'name': _("Link to remote page with ToS"), 'description': _("If your forum's ToS are located on remote page, enter here its address."
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Users Ranking Settings ('ranking', { 'name': _("Members Ranking"), 'description': _("Those settings control mechanisms of members activity ranking which allows you to gamificate your forum." ), 'settings': ( ('ranking_inflation', { 'value': 5, 'type': "integer", 'input': "text", 'extra': { 'min': 0, 'max': 99 }, 'separator': _("Basic Ranking Settings"), 'name': _("Ranking Inflation"), 'description': _("Enter size of ranking scores inflation in percent. Scores inflation is important mechanism that allows ranking self-regulation, punishing inactivity and requiring users to remain active in order to remain high in ranking." ), }),
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Avatars Settings ('avatars', { 'name': _("Users Avatars Settings"), 'description': _("Those settings allow you to control your users avatars."), 'settings': ( ('avatars_types', { 'value': ['gravatar', 'gallery'], 'type': "array", 'input': "mlist", 'extra': { 'choices': [('gravatar', _("Gravatar")), ('upload', _("Uploaded Avatar")), ('gallery', _("Avatars Gallery"))] }, 'separator': _("General Settings"), 'name': _("Allowed Avatars"), 'description': _("Select Avatar types allowed on your forum."), }), ('default_avatar', { 'value': "gravatar", 'type': "string", 'input': "select",
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('brute-force', { 'name': _("Brute-force Countermeasures"), 'description': _("Those settings allow you to protect your forum from brute-force attacks."), 'settings': ( ('attempts_limit', { 'value': 3, 'default': 3, 'type': "integer", 'input': "text", 'separator': _("Brute-force Countermeasures"), 'name': _("IP invalid attempts limit"), 'description': _('Enter maximal number of allowed attempts before IP address "jams". Defautly forum records only failed sign-in attempts.'), }), ('registrations_jams', { 'value': False, 'default': False, 'type': "boolean", 'input': "yesno", 'name': _("Protect register form"), 'description': _("Set this setting to yes if you want failed register attempts to count into limit. Majority of failed register attempts are caused by CAPTCHA protection against spam-bots, however same protection may cause problems for users with disabilities or ones that have problems understanding Q&A challenge."), }), ('jams_lifetime', { 'value': 15, 'default': 15, 'type': "integer", 'input': "text",
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Register and Sign-In Settings ('signin', { 'name': _("Sign-In and Sessions Settings"), 'description': _("Those settings control behaviour of signed-in accounts."), 'settings': ( ('sessions_validate_ip', { 'value': True, 'type': "boolean", 'input': "yesno", 'separator': _("Sessions Settings"), 'name': _("Check IP on session authorization"), 'description': _("Makes sessions more secure, but can cause problems with proxies and VPN's."), }), ('remember_me_allow', { 'value': True, 'type': "boolean", 'input': "yesno", 'separator': _('"Remember Me" Feature'), 'name': _('Enable "Remember Me" feature'), 'description': _("Turning this option on allows users to sign in on to your board using cookie-based tokens. This may result in account compromisation when user fails to sign out on shared computer or his cookie is stolen."), }), ('remember_me_lifetime', { 'value': 90, 'type': "integer", 'input': "text", 'name': _('"Remember Me" token lifetime'), 'description': _('Number of days since either last use or creation of "Remember Me" token to its expiration.'),
from misago.utils.fixtures import load_settings_fixture, update_settings_fixture from misago.utils.translation import ugettext_lazy as _ settings_fixture = ( # Spam Countermeasures ('captcha', { 'name': _("Spam Countermeasures"), 'description': _("Those settings allow you to combat automatic registrations and spam messages on your forum." ), 'settings': ( ('bots_registration', { 'value': 'no', 'type': "string", 'input': "choice", 'extra': { 'choices': [('no', _("No protection")), ('recaptcha', _("reCaptcha")), ('qa', _("Question & Answer"))] }, 'separator': _("Spambots Registrations"), 'name': _("CAPTCHA type"), '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.' ),
def load(): role = Role(name=_("Administrator").message, _special='admin', protected=True) role.permissions = { 'name_changes_allowed': 5, 'changes_expire': 7, 'can_use_acp': True, 'can_use_mcp': True, 'can_use_signature': True, 'allow_signature_links': True, 'allow_signature_images': True, 'can_search_users': True, 'can_see_users_emails': True, 'can_see_users_trails': True, 'can_see_hidden_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': True, 'private_thread_attachment_size': 0, 'private_thread_attachments_limit': 0, 'can_invite_ignoring': True, 'private_threads_mod': True, 'forums': {3: 1, 5: 1, 6: 1}, } role.save(force_insert=True) role = Role(name=_("Moderator").message, _special='mod', protected=True) role.permissions = { 'name_changes_allowed': 3, 'changes_expire': 14, 'can_use_mcp': True, 'can_use_signature': True, 'allow_signature_links': True, 'can_search_users': True, 'can_see_users_emails': True, 'can_see_users_trails': True, 'can_see_hidden_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': True, 'private_thread_attachment_size': 0, 'private_thread_attachments_limit': 0, 'can_invite_ignoring': True, 'private_threads_mod': True, 'forums': {3: 1, 5: 1, 6: 1}, } role.save(force_insert=True) role = Role(name=_("Registered").message, _special='registered') role.permissions = { 'name_changes_allowed': 2, 'can_use_signature': False, 'can_search_users': True, 'can_use_private_threads': True, 'can_start_private_threads': True, 'can_upload_attachments_in_private_threads': False, 'private_thread_attachment_size': 100, 'private_thread_attachments_limit': 30, 'can_invite_ignoring': False, 'private_threads_mod': False, 'forums': {4: 3, 5: 3, 6: 3}, } role.save(force_insert=True) role = Role(name=_("Guest").message, _special='guest') role.permissions = { 'can_search_users': True, 'forums': {4: 6, 5: 6, 6: 6}, } role.save(force_insert=True)