view messages/utils.py @ 752:95f4e7f352fd

For Django 1.6: contrib auth password reset confirm view signature changed. The uidb64 parameter was previously base 36 encoded and named uidb36. Had to update urls.py. While I was in there I decided to make the password reset email use the {% url %} tag to be more resilient if the url changes.
author Brian Neal <bgneal@gmail.com>
date Wed, 01 Jan 2014 19:52:07 -0600
parents ee87ea74d46b
children
line wrap: on
line source
"""
This file contains various helper utility functions for the messages
application.

"""


def reply_subject(subject):
    """
    Builds a subject line for a reply.
    If the subject already starts with Re: then return the subject.
    Otherwise, prepend Re: to the subject and return it.
    """
    if subject.startswith('Re: '):
        return subject
    return 'Re: ' + subject