# HG changeset patch # User Lennard de Rijk # Date 1232563822 0 # Node ID 1ad41c8d05e9ebb58e36f25390bc0bcf5dcef9cf # Parent d67557c612de83d5825e201e0006affba1461ac4 Added created and last modified timestamps to the group_app model. Also edited the templates to show some extra information. The review template has the names for the new properties hard coded because the auto_add and auto_add_now datetimeproperties don't show up in the fields of the entity. Patch by: Lennard de Rijk diff -r d67557c612de -r 1ad41c8d05e9 app/soc/models/group_app.py --- a/app/soc/models/group_app.py Wed Jan 21 18:25:37 2009 +0000 +++ b/app/soc/models/group_app.py Wed Jan 21 18:50:22 2009 +0000 @@ -110,3 +110,12 @@ # handled and turned into a group application_completed = db.BooleanProperty(required=True, default=False, verbose_name=ugettext_lazy('Has been completed')) + + # timestamp to record the time on which this application has been created + created_on = db.DateTimeProperty(required=True, auto_now_add=True, + verbose_name=ugettext_lazy('Created on')) + + # timestamp to record the time on which this application has been last modified + # also changes when the review properties change + last_modified_on = db.DateTimeProperty(required=True, auto_now=True, + verbose_name=ugettext_lazy('Last modified on')) diff -r d67557c612de -r 1ad41c8d05e9 app/soc/templates/soc/club_app/list/heading.html --- a/app/soc/templates/soc/club_app/list/heading.html Wed Jan 21 18:25:37 2009 +0000 +++ b/app/soc/templates/soc/club_app/list/heading.html Wed Jan 21 18:50:22 2009 +0000 @@ -1,4 +1,5 @@ Name Link ID + Last Modified on diff -r d67557c612de -r 1ad41c8d05e9 app/soc/templates/soc/club_app/list/row.html --- a/app/soc/templates/soc/club_app/list/row.html Wed Jan 21 18:25:37 2009 +0000 +++ b/app/soc/templates/soc/club_app/list/row.html Wed Jan 21 18:50:22 2009 +0000 @@ -5,4 +5,5 @@ +
{{ list.item.last_modified_on }}
diff -r d67557c612de -r 1ad41c8d05e9 app/soc/templates/soc/club_app/review.html --- a/app/soc/templates/soc/club_app/review.html Wed Jan 21 18:25:37 2009 +0000 +++ b/app/soc/templates/soc/club_app/review.html Wed Jan 21 18:50:22 2009 +0000 @@ -31,9 +31,11 @@ {% readonly_field_as_twoline_table_row entity.fields.irc_channel.label entity.irc_channel %} {% readonly_field_as_twoline_table_row entity.fields.backup_admin.label entity.backup_admin.link_id %} {% readonly_field_as_twoline_table_row entity.fields.member_criteria.label entity.member_criteria %} - {% readonly_field_as_twoline_table_row entity.fields.reviewed.label entity.reviewed %} - {% readonly_field_as_twoline_table_row entity.fields.accepted.label entity.accepted %} - {% readonly_field_as_twoline_table_row entity.fields.application_completed.label entity.application_completed %} + {% readonly_field_as_table_row entity.fields.reviewed.label entity.reviewed %} + {% readonly_field_as_table_row entity.fields.accepted.label entity.accepted %} + {% readonly_field_as_table_row entity.fields.application_completed.label entity.application_completed %} + {% readonly_field_as_table_row "Created on" entity.created_on %} + {% readonly_field_as_table_row "Last Modified on" entity.last_modified_on %}