diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2013-12-04 10:51:20 +0100 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2013-12-04 10:51:20 +0100 |
commit | b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2 (patch) | |
tree | b2461e717a2ea893cbf59a20a5ef5b04ae1b2f90 /hyperkitty/lib/view_helpers.py | |
parent | 0bd5582a75d5a610885241ba52186033e2272424 (diff) | |
download | hyperkitty-b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2.tar.gz hyperkitty-b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2.tar.xz hyperkitty-b3ffd97a0b433647a53ecd7a5cc63f7bdc1e1ee2.zip |
Add a config option to only display lists from the same virtual host
Diffstat (limited to 'hyperkitty/lib/view_helpers.py')
-rw-r--r-- | hyperkitty/lib/view_helpers.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hyperkitty/lib/view_helpers.py b/hyperkitty/lib/view_helpers.py index fb8e897..283c1e3 100644 --- a/hyperkitty/lib/view_helpers.py +++ b/hyperkitty/lib/view_helpers.py @@ -156,3 +156,10 @@ def get_recent_list_activity(store, mlist): # return the proper format for the javascript chart function return [ {"date": d, "count": emails_per_date[d]} for d in sorted(emails_per_date) ] + + +def show_mlist(mlist, request): + def get_domain(host): + return ".".join(host.split(".")[-2:]) + return (get_domain(mlist.name.partition("@")[2]) + == get_domain(request.get_host())) |