1 from base import Setting, SettingSet
\r
2 from django.utils.translation import ugettext_lazy as _
\r
4 VOTE_RULES_SET = SettingSet('voting', _('Voting rules'), _("Configure the voting rules on your site."), 400)
\r
6 USER_REPUTATION_TO_MAX_VOTES = Setting('USER_REPUTATION_TO_MAX_VOTES', True, VOTE_RULES_SET, dict(
\r
7 label = _("Add reputation to max votes per day"), required=False,
\r
8 help_text = _("The user reputation is added to the static MAX_VOTES_PER_DAY option. Users with higher reputation can vote more.")))
\r
10 MAX_VOTES_PER_DAY = Setting('MAX_VOTES_PER_DAY', 30, VOTE_RULES_SET, dict(
\r
11 label = _("Maximum votes per day"),
\r
12 help_text = _("The maximum number of votes an user can cast per day.")))
\r
14 START_WARN_VOTES_LEFT = Setting('START_WARN_VOTES_LEFT', 10, VOTE_RULES_SET, dict(
\r
15 label = _("Start warning about votes left"),
\r
16 help_text = _("From how many votes left should an user start to be warned about it.")))
\r
18 MAX_FLAGS_PER_DAY = Setting('MAX_FLAGS_PER_DAY', 5, VOTE_RULES_SET, dict(
\r
19 label = _("Maximum flags per day"),
\r
20 help_text = _("The maximum number of times an can flag a post per day.")))
\r
22 FLAG_COUNT_TO_HIDE_POST = Setting('FLAG_COUNT_TO_HIDE_POST', 3, VOTE_RULES_SET, dict(
\r
23 label = _("Flag count to hide post"),
\r
24 help_text = _("How many times a post needs to be flagged to be hidden from the main page.")))
\r
26 FLAG_COUNT_TO_DELETE_POST = Setting('FLAG_COUNT_TO_DELETE_POST', 5, VOTE_RULES_SET, dict(
\r
27 label = _("Flag count to delete post"),
\r
28 help_text = _("How many times a post needs to be flagged to be deleted.")))
\r
30 DENY_UNVOTE_DAYS = Setting('DENY_UNVOTE_DAYS', 1, VOTE_RULES_SET, dict(
\r
31 label = _("Days to cancel a vote"),
\r
32 help_text = _("How many days an user can cancel a vote after he originaly casted it.")))