]> git.openstreetmap.org Git - osqa.git/commitdiff
1) rick wanted me to change the default size of comments to 600
authorqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 28 Apr 2010 15:19:00 +0000 (15:19 +0000)
committerqw3rty <qw3rty@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 28 Apr 2010 15:19:00 +0000 (15:19 +0000)
2) Fixed OSQA-146
 - Note: if the user doesn't enter a birthday then when they go back to edit there page the page will display there birthday as "1900-01-01."  This is fairly sloppy and will take a little bit of refactoring to fix.

git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@83 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/settings/basic.py
forum/skins/default/templates/users/info.html
forum/views/users.py

index b712365d726617e0e378be4238841939a628eed8..0148452abf215155b47ec70897a4893d481bb7cd 100644 (file)
@@ -60,9 +60,8 @@ help_text = _("""
 The copyright notice visible at the footer of your page.\r
 """)))\r
 \r
-COMMENT_MAX_LENGTH = Setting('COMMENT_MAX_LENGTH', 300, BASIC_SET, dict(\r
+COMMENT_MAX_LENGTH = Setting('COMMENT_MAX_LENGTH', 600, 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
+""")))
\ No newline at end of file
index 690fc7e35d07d43b0ee98feaad99c8e2b8b9bc03..fb6fcde2ad2751e04b579668b020309e5d88e2f7 100644 (file)
                 {% if view_user.date_of_birth%}
                 <tr>
                                        <!--todo  - redo this with blocktrans -->
-                    <td>{% trans "age" %}</td>
-                    <td>{% get_age view_user.date_of_birth %} {% trans "age unit" %}</td>
+                    {% if view_user.date_of_birth.year != 1900%}
+                        <td>{% trans "age" %}</td>
+                        <td>{% get_age view_user.date_of_birth %} {% trans "age unit" %}</td>
+                    {% endif %}
                 </tr>
                 {% endif %}
                 {% if request.user.is_superuser %}
index 227cdf603f140aabb0a6aa0385b68b7c4b3094c3..c64764ebf10a3bbff6aa1690b8d56db20f65d64c 100644 (file)
@@ -16,6 +16,7 @@ from django.core.urlresolvers import reverse
 from forum.forms import *\r
 from forum.utils.html import sanitize_html\r
 from forum.authentication import user_updated\r
+from datetime import date\r
 import decorators\r
 \r
 import time\r
@@ -115,7 +116,7 @@ def edit_user(request, id):
             user.website = sanitize_html(form.cleaned_data['website'])\r
             user.location = sanitize_html(form.cleaned_data['city'])\r
             user.date_of_birth = sanitize_html(form.cleaned_data['birthday'])\r
-            if len(user.date_of_birth) == 0:\r
+            if user.date_of_birth == "None":\r
                 user.date_of_birth = '1900-01-01'\r
             user.about = sanitize_html(form.cleaned_data['about'])\r
 \r