Mercurial > sat_legacy_website
view sat_website/social_contract.py @ 60:0d20fb28c32e
many small changes:
- set opacity 0.85 to libervia screenshot on the main page
- remove videos from the repository (stored on external ftp)
- more details in the README concerning the i18n
- settings can be overriden by an external file (for the stats)
- add in basic features.html a button to experimental features
- add a link to the SàT MUC in downloads section
- add link to bugzilla + improve other links in dev/community
- add + symbol for projects using standard blogging system
- add ~ symbol for projects being no communication tool
- save subscription form results to a text file
- update press.py and links.py
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 15 May 2015 17:15:40 +0200 |
parents | bdd6ccffe149 |
children |
line wrap: on
line source
#!/usr/bin/python # -*- coding: utf-8 -*- """ SàT website: Salut à Toi's presentation website Copyright (C) 2012 Jérôme Poisson (goffi@goffi.org) This file is part of SàT website. SàT website is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Foobar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. """ from os.path import join, dirname, exists from django.utils.translation import get_language CONTRAT_SOCIAL = "CONTRAT_SOCIAL" def get_social_contract(): """Return the localised social contract version""" language_code = get_language().split("-")[0] filename = CONTRAT_SOCIAL if language_code == "fr" else "CONTRAT_SOCIAL_%s" % (language_code,) path = join(dirname(__file__), filename) if not exists(path): path = join(dirname(__file__), CONTRAT_SOCIAL) #we default to original version with open(path) as f: text = f.read() return text