# HG changeset patch # User Todd Larsen # Date 1232486794 0 # Node ID c193ac0ef59337b1442a033120170522a7aafaa2 # Parent 07fd6a603c24014578abc0da312cd90743ae0f96 Support HTML tags in form field example_text column. Improve the Program Model example_text as an example. Patch by: Todd Larsen Review by: to-be-reviewed diff -r 07fd6a603c24 -r c193ac0ef593 app/soc/models/program.py --- a/app/soc/models/program.py Tue Jan 20 21:00:55 2009 +0000 +++ b/app/soc/models/program.py Tue Jan 20 21:26:34 2009 +0000 @@ -38,14 +38,16 @@ name = db.StringProperty(required=True, verbose_name=ugettext_lazy('Name')) name.help_text = ugettext_lazy('Complete, formal name of the program.') - name.example_text = ugettext_lazy('Google Summer of Code 2009') + name.example_text = ugettext_lazy( + 'e.g. Google Summer of Code 2009') #: Required field storing short name of the group. #: It can be used for displaying group as sidebar menu item. short_name = db.StringProperty(required=True, verbose_name=ugettext_lazy('Short name')) short_name.help_text = ugettext_lazy('Short name used for sidebar menu') - short_name.example_text = ugettext_lazy('GSoC 2009') + short_name.example_text = ugettext_lazy( + 'e.g. GSoC 2009') #: Optional field used to relate it to other programs #: For example, GSoC would be a group label for GSoC2008/GSoC2009 @@ -53,19 +55,25 @@ verbose_name=ugettext_lazy('Group label')) group_label.help_text = ugettext_lazy( 'Optional name used to relate this program to others.') - group_label.example_text = ugettext_lazy('GSoC') + group_label.example_text = ugettext_lazy( + 'e.g. GSoC') #: Required field storing description of the group. description = db.TextProperty(required=True, verbose_name=ugettext_lazy('Description')) - description.example_text = ugettext_lazy('This is the program for GSoC 2009') + description.example_text = ugettext_lazy( + 'for example:
' + 'GSoC 2009 is the Google Summer of Code,' + ' but in 2009!

' + '(rich text formatting is supported)') #: Required field storing the type of workflow this program has workflow = db.StringProperty(required=True, choices=['gsoc', 'ghop'], verbose_name= ugettext_lazy('Workflow type')) - workflow.example_text = ugettext_lazy('Project-based for GSoC workflow type, ' - 'task-based for GHOP workflow type') + workflow.example_text = ugettext_lazy( + 'Project-based for GSoC workflow type,
' + ' Task-based for GHOP workflow type.') #: Required 1:1 relationship indicating the Program the Timeline #: belongs to. diff -r 07fd6a603c24 -r c193ac0ef593 app/soc/templates/soc/templatetags/_as_table_row.html --- a/app/soc/templates/soc/templatetags/_as_table_row.html Tue Jan 20 21:00:55 2009 +0000 +++ b/app/soc/templates/soc/templatetags/_as_table_row.html Tue Jan 20 21:26:34 2009 +0000 @@ -41,7 +41,7 @@ {% endif %} {% if example_text %} - e.g. {{ example_text }} + {{ example_text|safe }} {% else %} {% endif %}