1 from base import Setting, SettingSet
2 from django.utils.translation import ugettext_lazy as _
5 VIEW_SET = SettingSet('view', _('View settings'), _("Set up how certain parts of the site are displayed."), 20)
7 EMBED_YOUTUBE_VIDEOS = Setting('EMBED_YOUTUBE_VIDEOS', True, VIEW_SET, dict(
8 label = _("Embed YouTube Videos"),
9 help_text = _("If you check this YouTube videos will be embedded"),
12 SUMMARY_LENGTH = Setting('SUMMARY_LENGTH', 300, VIEW_SET, dict(
13 label = _("Summary Length"),
14 help_text = _("The number of characters that are going to be displayed in order to get the content summary.")))
17 RECENT_TAGS_SIZE = Setting('RECENT_TAGS_SIZE', 25, VIEW_SET, dict(
18 label = _("Recent tags block size"),
19 help_text = _("The number of tags to display in the recent tags block in the front page.")))
21 SHOW_TAGS_IN_A_CLOUD = Setting('SHOW_TAGS_IN_A_CLOUD', True, VIEW_SET, dict(
22 label = _("Show tags in a cloud"),
23 help_text = _("If selected the tags in the recent tags widget will be displayed in a cloud."),
26 TAGS_CLOUD_MIN_OCCURS = Setting('TAGS_CLOUD_MIN_OCCURS', 1, VIEW_SET, dict(
27 label = _("Tags cloud min occurs"),
28 help_text = _("Used to calculate the font size of the tags in the cloud widget.")))
30 TAGS_CLOUD_MAX_OCCURS = Setting('TAGS_CLOUD_MAX_OCCURS', 35, VIEW_SET, dict(
31 label = _("Tags cloud max occurs"),
32 help_text = _("Used to calculate the font size of the tags in the cloud widget.")))
34 TAGS_CLOUD_MIN_FONT_SIZE = Setting('TAGS_CLOUD_MIN_FONT_SIZE', 10, VIEW_SET, dict(
35 label = _("Tags cloud min font size"),
36 help_text = _("Used to calculate the font size of the tags in the cloud widget.")))
38 TAGS_CLOUD_MAX_FONT_SIZE = Setting('TAGS_CLOUD_MAX_FONT_SIZE', 25, VIEW_SET, dict(
39 label = _("Tags cloud max font size"),
40 help_text = _("Used to calculate the font size of the tags in the cloud widget.")))
42 RECENT_AWARD_SIZE = Setting('RECENT_AWARD_SIZE', 15, VIEW_SET, dict(
43 label = _("Recent awards block size"),
44 help_text = _("The number of awards to display in the recent awards block in the front page.")))
46 UPDATE_LATEST_ACTIVITY_ON_TAG_EDIT = Setting('UPDATE_LATEST_ACTIVITY_ON_TAG_EDIT', True, VIEW_SET, dict(
47 label = _("Update latest activity on tag edit"), required=False,
48 help_text = _("If you check this the latest activity will be updated when editing only the tags of a question.")))
50 LIMIT_RELATED_TAGS = Setting('LIMIT_RELATED_TAGS', 0, VIEW_SET, dict(
51 label = _("Limit related tags block"),
52 help_text = _("Limit related tags block size in questions list pages. Set to 0 to display all all tags.")))