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
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
{% 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 %}
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
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