Project

General

Profile

0001-franceconnect-maps-FC-gender-to-Publik-title-32876.patch

Benjamin Dauvergne, 07 May 2019 05:35 PM

Download (1.67 KB)

View differences:

Subject: [PATCH] franceconnect: maps FC gender to Publik title (#32876)

 hobo/franceconnect/views.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
hobo/franceconnect/views.py
14 14
# You should have received a copy of the GNU Affero General Public License
15 15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 16

  
17
import json
18

  
17 19
from django.core.urlresolvers import reverse_lazy
18 20
from django.views.generic import RedirectView, FormView
19 21

  
......
82 84
        variable.value = 'true'
83 85
        variable.save()
84 86

  
87
        variable = get_variable('A2_FC_USER_INFO_MAPPINGS')
88
        variable.value = json.dumps({
89
            'last_name': {
90
                'ref': 'family_name',
91
                'verified': True,
92
            },
93
            'first_name': {
94
                'ref': 'given_name',
95
                'verified': True,
96
            },
97
            'title': {
98
                'ref': 'gender',
99
                'translation': 'simple',
100
                'translation_simple': {
101
                    'male': 'Monsieur',
102
                    'female': 'Madame',
103
                },
104
                'verified': True,
105
            },
106
            'email': 'email',
107
        })
108
        variable.save()
109

  
85 110
        return super(HomeView, self).form_valid(form)
86 111

  
87 112
    def get_context_data(self, **kwargs):
88
-