comparison sat_website/utils.py @ 41:1a0f24401866

send adhesion form results via email to the admins and the new member
author souliane <souliane@mailoo.org>
date Tue, 03 Feb 2015 15:15:59 +0100
parents dfe7139dae0a
children 746e53efc188
comparison
equal deleted inserted replaced
40:dfe7139dae0a 41:1a0f24401866
20 along with Foobar. If not, see <http://www.gnu.org/licenses/>. 20 along with Foobar. If not, see <http://www.gnu.org/licenses/>.
21 """ 21 """
22 22
23 from os.path import basename, realpath, join 23 from os.path import basename, realpath, join
24 from django.conf import settings 24 from django.conf import settings
25 from django.utils import translation
25 from collections import OrderedDict 26 from collections import OrderedDict
26 27
27 28
28 def get_projects_infos(infos): 29 def get_projects_infos(infos):
29 """Return a dict binding project names to a tuple containing: 30 """Return a dict binding project names to a tuple containing:
76 return items 77 return items
77 78
78 def get_asso_subscr_amounts(): 79 def get_asso_subscr_amounts():
79 """Returns the subscription amounts as defined in the Rules of the association.""" 80 """Returns the subscription amounts as defined in the Rules of the association."""
80 return settings.ASSO_SUBSCR_AMOUNTS 81 return settings.ASSO_SUBSCR_AMOUNTS
82
83 def get_language_name_local(language):
84 """Returns the localised language name.
85
86 @param language (str): language code (e.g. 'fr' or 'en')
87 """
88 return translation.get_language_info(language)['name_local']