diff options
| author | Aurélien Bompard <aurelien@bompard.org> | 2012-10-05 15:01:59 +0200 |
|---|---|---|
| committer | Aurélien Bompard <aurelien@bompard.org> | 2012-10-05 15:01:59 +0200 |
| commit | 596cf07a0c41a8632284b02f4c9fc27d58d56123 (patch) | |
| tree | 147cd9e6e981acdd11efd6fd3950d8f936f8ae42 /hyperkitty/lib/__init__.py | |
| parent | ec25f22ade2ad941ffccaacd6e9ef9df71552757 (diff) | |
Improve appearance
Diffstat (limited to 'hyperkitty/lib/__init__.py')
| -rw-r--r-- | hyperkitty/lib/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hyperkitty/lib/__init__.py b/hyperkitty/lib/__init__.py index 0ae2a7f..1ab04cd 100644 --- a/hyperkitty/lib/__init__.py +++ b/hyperkitty/lib/__init__.py @@ -59,3 +59,12 @@ def get_months(store, list_name): def get_store(request): return request.environ["kittystore.store"] + + +def stripped_subject(mlist, subject): + if mlist is None: + return subject + list_name = mlist.display_name or mlist.name[:mlist.name.index("@")] + if subject.lower().startswith("[%s] " % list_name.lower()): + subject = subject[len(list_name)+3 : ] + return subject |
