password field should be type password
osqa-107:
comment length should be configurable.
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@74
0cfe37f9-358a-4d5e-be75-
b63607b5c754
try:\r
ping_google()\r
except Exception:\r
- logging.debug('problem pinging google did you register you sitemap with google?')\r
+ logging.debug('problem pinging google did you register your sitemap with google?')\r
\r
def mark_deleted(self, user):\r
if super(Comment, self).mark_deleted(user):\r
"""),\r
widget=Textarea))\r
\r
-APP_COPYRIGHT = Setting('APP_COPYRIGHT', 'Copyright OSQA, 2009. Some rights reserved under creative commons license.', BASIC_SET, dict(\r
+APP_COPYRIGHT = Setting('APP_COPYRIGHT', 'Copyright OSQA, 2010. Some rights reserved under creative commons license.', BASIC_SET, dict(\r
label = _("Copyright notice"),\r
help_text = _("""\r
The copyright notice visible at the footer of your page.\r
-""")))
\ No newline at end of file
+""")))\r
+\r
+COMMENT_MAX_LENGTH = Setting('COMMENT_MAX_LENGTH', 300, BASIC_SET, dict(\r
+label = _("Maximum length of comment"),\r
+help_text = _("""\r
+The maximum length a user can enter for a comment.\r
+""")))\r
+\r
from base import Setting, SettingSet\r
from django.utils.translation import ugettext_lazy as _\r
+from django.forms.widgets import PasswordInput\r
\r
EMAIL_SET = SettingSet('email', _('Email Settings'), _("Email server and other email related settings."), 50)\r
\r
help_text = _("""\r
The password for your SMTP connection.\r
"""),\r
-required=False))\r
+required=False,\r
+widget=PasswordInput))\r
\r
EMAIL_USE_TLS = Setting('EMAIL_USE_TLS', False, EMAIL_SET, dict(\r
label = _("Use TLS"),\r
<div class="first">
<h3 class="subtitle">{% trans "What kinds of questions can I ask here?" %}</h3>
- <p>{% trans "Most importanly - questions should be <strong>relevant</strong> to this community." %}
+ <p>{% trans "Most importantly - questions should be <strong>relevant</strong> to this community." %}
{% trans "Before asking the question - please make sure to use search to see whether your question has alredy been answered."%}
</p>
from django.utils.translation import ugettext as _\r
from django.core.urlresolvers import reverse\r
from django import template\r
+from django.conf import settings\r
\r
register = template.Library()\r
\r
'comments': comments,\r
'post': post,\r
'can_comment': user.can_comment(post),\r
- 'max_length': 300,\r
+ 'max_length': settings.COMMENT_MAX_LENGTH,\r
'showing': showing,\r
'total': len(all_comments),\r
}\r