Added feed_url to StudentProject.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/models/student_project.py Tue Apr 07 21:40:23 2009 +0000
+++ b/app/soc/models/student_project.py Tue Apr 07 21:55:54 2009 +0000
@@ -52,6 +52,13 @@
additional_info.help_text = ugettext(
'Link to a resource containing more information about this project.')
+ #: Optional field storing a feed URL; displayed publicly.
+ feed_url = db.LinkProperty(
+ verbose_name=ugettext('Project Feed URL'))
+ feed_url.help_text = ugettext(
+ 'The URL should be a valid ATOM or RSS feed. '
+ 'Feed entries are shown on the home page.')
+
#: A property containing which mentor has been assigned to this project.
#: A project must have a mentor at all times
mentor = db.ReferenceProperty(reference_class=soc.models.mentor.Mentor,
--- a/app/soc/views/models/student_project.py Tue Apr 07 21:40:23 2009 +0000
+++ b/app/soc/views/models/student_project.py Tue Apr 07 21:55:54 2009 +0000
@@ -103,6 +103,7 @@
'clean_student': cleaning.clean_link_id('student'),
'clean_mentor': cleaning.clean_link_id('mentor'),
'clean_additional_info': cleaning.clean_url('additional_info'),
+ 'clean_feed_url': cleaning.clean_feed_url,
'clean': cleaning.validate_student_project('scope_path',
'mentor_id', 'student_id')
}
@@ -138,6 +139,7 @@
dynaproperties = {
'clean_abstract': cleaning.clean_content_length('abstract'),
'clean_additional_info': cleaning.clean_url('additional_info'),
+ 'clean_feed_url': cleaning.clean_feed_url,
}
student_edit_form = dynaform.newDynaForm(