summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.gitignore1
-rw-r--r--askbot/conf/__init__.py2
-rw-r--r--askbot/conf/forum_data_rules.py15
-rw-r--r--askbot/conf/question_lists.py (renamed from askbot/conf/main_pages.py)30
-rw-r--r--askbot/templates/macros.html4
5 files changed, 27 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index b8629b7b..e2e3cd09 100755
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,7 @@ tinymce
*.iml
lint
env
+/custom_settings
/static
django
lamson
diff --git a/askbot/conf/__init__.py b/askbot/conf/__init__.py
index c1989f8d..0f92bf99 100644
--- a/askbot/conf/__init__.py
+++ b/askbot/conf/__init__.py
@@ -8,7 +8,7 @@ import askbot.conf.karma_and_badges_visibility
import askbot.conf.email
import askbot.conf.forum_data_rules
import askbot.conf.moderation
-import askbot.conf.main_pages
+import askbot.conf.question_lists
import askbot.conf.flatpages
import askbot.conf.site_settings
import askbot.conf.license
diff --git a/askbot/conf/forum_data_rules.py b/askbot/conf/forum_data_rules.py
index 524ab16a..b318e4a2 100644
--- a/askbot/conf/forum_data_rules.py
+++ b/askbot/conf/forum_data_rules.py
@@ -31,6 +31,21 @@ settings.register(
settings.register(
livesettings.BooleanValue(
FORUM_DATA_RULES,
+ 'ASK_BUTTON_ENABLED',
+ default=True,
+ description=_('Enable big Ask button'),
+ help_text=_(
+ 'Disabling this button will reduce number of new questions. '
+ 'If this button is disabled, the ask button in the search menu '
+ 'will still be available.'
+ )
+ )
+)
+
+
+settings.register(
+ livesettings.BooleanValue(
+ FORUM_DATA_RULES,
'ENABLE_VIDEO_EMBEDDING',
default = False,
description = _('Enable embedding videos. '),
diff --git a/askbot/conf/main_pages.py b/askbot/conf/question_lists.py
index 06339a2f..dcf06378 100644
--- a/askbot/conf/main_pages.py
+++ b/askbot/conf/question_lists.py
@@ -6,29 +6,15 @@ from askbot.conf.super_groups import DATA_AND_FORMATTING
from askbot.deps import livesettings
from django.utils.translation import ugettext_lazy as _
-MAIN_PAGES = livesettings.ConfigurationGroup(
- 'MAIN_PAGES',
- _('Logic of the questions page'),
+QUESTION_LISTS = livesettings.ConfigurationGroup(
+ 'QUESTION_LISTS',
+ _('Listings of questions'),
super_group=DATA_AND_FORMATTING
)
settings.register(
livesettings.BooleanValue(
- MAIN_PAGES,
- 'ASK_BUTTON_ENABLED',
- default=True,
- description=_('Enable big Ask button'),
- help_text=_(
- 'Disabling this button will reduce number of new questions. '
- 'If this button is disabled, the ask button in the search menu '
- 'will still be available.'
- )
- )
-)
-
-settings.register(
- livesettings.BooleanValue(
- MAIN_PAGES,
+ QUESTION_LISTS,
'ALL_SCOPE_ENABLED',
default=True,
description=_('Enable "All Questions" selector'),
@@ -38,7 +24,7 @@ settings.register(
settings.register(
livesettings.BooleanValue(
- MAIN_PAGES,
+ QUESTION_LISTS,
'UNANSWERED_SCOPE_ENABLED',
default=True,
description=_('Enable "Unanswered Questions" selector'),
@@ -48,7 +34,7 @@ settings.register(
settings.register(
livesettings.BooleanValue(
- MAIN_PAGES,
+ QUESTION_LISTS,
'FOLLOWED_SCOPE_ENABLED',
default=True,
description=_('Enable "Followed Questions" selector'),
@@ -71,7 +57,7 @@ SCOPE_CHOICES_AUTHENTICATED = (
settings.register(
livesettings.StringValue(
- MAIN_PAGES,
+ QUESTION_LISTS,
'DEFAULT_SCOPE_AUTHENTICATED',
choices=SCOPE_CHOICES_AUTHENTICATED,
default='all',
@@ -87,7 +73,7 @@ SCOPE_CHOICES_ANONYMOUS = (#anonymous users can't see followed questions
settings.register(
livesettings.StringValue(
- MAIN_PAGES,
+ QUESTION_LISTS,
'DEFAULT_SCOPE_ANONYMOUS',
choices=SCOPE_CHOICES_ANONYMOUS,
default='all',
diff --git a/askbot/templates/macros.html b/askbot/templates/macros.html
index 6c6b22d4..6545e76e 100644
--- a/askbot/templates/macros.html
+++ b/askbot/templates/macros.html
@@ -658,8 +658,8 @@ answer {% if answer.accepted() %}accepted-answer{% endif %} {% if answer.author_
{%- macro user_website_link(user, max_display_length=25) -%}
{% if user.website and (not user.is_blocked()) %}
<a
- href="{{user.website}}"
- title="{% trans username=user.username|escape, url=user.website %}{{username}}'s website is {{url}}{% endtrans %}"
+ href="{{user.website|escape}}"
+ title="{% trans username=user.username|escape, url=user.website|escape %}{{username}}'s website is {{url}}{% endtrans %}"
{% if user.can_have_strong_url() == False %}
rel="nofollow"
{% endif %}