From 0854354a5bfb879f23235475f22b8ecf016a0343 Mon Sep 17 00:00:00 2001 From: Lennard de Rijk Date: Tue, 7 Apr 2009 21:55:54 +0000 Subject: [PATCH] Added feed_url to StudentProject. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed --- app/soc/models/student_project.py | 7 +++++++ app/soc/views/models/student_project.py | 2 ++ 2 files changed, 9 insertions(+) diff --git a/app/soc/models/student_project.py b/app/soc/models/student_project.py index 908dc2b0..c2e44605 100644 --- a/app/soc/models/student_project.py +++ b/app/soc/models/student_project.py @@ -52,6 +52,13 @@ class StudentProject(soc.models.linkable.Linkable): 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, diff --git a/app/soc/views/models/student_project.py b/app/soc/views/models/student_project.py index 8d49630c..8889e8c3 100644 --- a/app/soc/views/models/student_project.py +++ b/app/soc/views/models/student_project.py @@ -103,6 +103,7 @@ class View(base.View): '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 @@ class View(base.View): 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( -- 2.11.4.GIT