Mercurial > public > sg101
annotate messages/utils.py @ 1096:d9cd3180c12c
More GCalendar V3 conversion in progress.
Built a brand new post editor. It is hardcoded into GCalendar
right now. We will make it more general in the future.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 14 Jun 2016 21:16:09 -0500 |
parents | ee87ea74d46b |
children |
rev | line source |
---|---|
gremmie@1 | 1 """ |
gremmie@1 | 2 This file contains various helper utility functions for the messages |
gremmie@1 | 3 application. |
bgneal@566 | 4 |
gremmie@1 | 5 """ |
gremmie@1 | 6 |
gremmie@1 | 7 |
gremmie@1 | 8 def reply_subject(subject): |
bgneal@566 | 9 """ |
bgneal@566 | 10 Builds a subject line for a reply. |
bgneal@566 | 11 If the subject already starts with Re: then return the subject. |
bgneal@566 | 12 Otherwise, prepend Re: to the subject and return it. |
bgneal@566 | 13 """ |
bgneal@566 | 14 if subject.startswith('Re: '): |
bgneal@566 | 15 return subject |
bgneal@566 | 16 return 'Re: ' + subject |