]> git.openstreetmap.org Git - osqa.git/blob - forum/settings/accept.py
OSQA-678, call super in the beginning of the clean methods for the qanda forms
[osqa.git] / forum / settings / accept.py
1 from base import Setting, SettingSet
2 from django.forms.widgets import RadioSelect
3 from django.utils.translation import ugettext_lazy as _
4
5 ACCEPT_SET = SettingSet('accept', _('Accepting answers'), _("Settings to tweak the behaviour of accepting answers."), 500)
6
7 DISABLE_ACCEPTING_FEATURE = Setting('DISABLE_ACCEPTING_FEATURE', False, ACCEPT_SET, dict(
8 label = _("Disallow answers to be accepted"),
9 help_text = _("Disable accepting answers feature. If you re-enable it in the future, currently accepted answers will still be marked as accepted."),
10 required=False))
11
12 MAXIMUM_ACCEPTED_ANSWERS = Setting('MAXIMUM_ACCEPTED_ANSWERS', 1, ACCEPT_SET, dict(
13 label = _("Maximum accepted answers per question"),
14 help_text = _("How many accepted answers are allowed per question. Use 0 for no limit.")))
15
16 MAXIMUM_ACCEPTED_PER_USER = Setting('MAXIMUM_ACCEPTED_PER_USER', 1, ACCEPT_SET, dict(
17 label = _("Maximum accepted answers per user/question"),
18 help_text = _("If more than one accpeted answer is allowed, how many can be accepted per single user per question.")))
19
20 USERS_CAN_ACCEPT_OWN = Setting('USERS_CAN_ACCEPT_OWN', False, ACCEPT_SET, dict(
21 label = _("Users an accept own answer"),
22 help_text = _("Are normal users allowed to accept their own answers.."),
23 required=False))
24
25