summaryrefslogtreecommitdiffstats
path: root/forum/const.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-06 20:25:06 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-04-06 20:25:06 -0400
commitb94fddfb8495960569f6a6c64196a11d76b95fd4 (patch)
tree2e22f7c6e1b4d11b2d6fd8b22a0511b2ee6e3768 /forum/const.py
parent0f74420a76887d1aa079cb158463f174b0398f99 (diff)
downloadaskbot-b94fddfb8495960569f6a6c64196a11d76b95fd4.tar.gz
askbot-b94fddfb8495960569f6a6c64196a11d76b95fd4.tar.bz2
askbot-b94fddfb8495960569f6a6c64196a11d76b95fd4.zip
another intermediate commit (still broken)
Diffstat (limited to 'forum/const.py')
-rwxr-xr-xforum/const.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/forum/const.py b/forum/const.py
index 4c107572..7b78032a 100755
--- a/forum/const.py
+++ b/forum/const.py
@@ -32,6 +32,30 @@ TYPE_REPUTATION = (
(-8, 'lose_by_upvote_canceled'),
)
+POST_SORT_METHODS = (
+ _('newest'), _('oldest'),_('active'),
+ _('inactive'),_('hot'),_('cold'),
+ _('popular'),_('unpopular'),_('relevance')
+ )
+#todo: add assertion here that all sort methods are unique
+#because they are keys to the hash used in implementations of Q.run_advanced_search
+
+DEFAULT_POST_SORT_METHOD = _('newest')
+POST_SCOPES = (_('all'),_('unanswered'),_('favorite'))
+DEFAULT_POST_SCOPE = _('all')
+
+QUESTIONS_PAGE_SIZE = 30
+
+#todo:
+#this probably needs to be language-specific
+#and selectable/changeable from the admin interface
+#however it will be hard to expect that people will type
+#correct regexes - plus this must be an anchored regex
+#to do full string match
+TAG_REGEX = r'^[a-z0-9\+\.\-]+$'
+MAX_TAG_LENGTH = 20 #default 20 chars
+MAX_TAGS_PER_POST = 5 #no more than five tags
+
TYPE_ACTIVITY_ASK_QUESTION=1
TYPE_ACTIVITY_ANSWER=2
TYPE_ACTIVITY_COMMENT_QUESTION=3