Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
django-representatives
Commits
7da872ab
Commit
7da872ab
authored
Jul 01, 2016
by
Nicolas Joyard
Browse files
Francedata: import first name and last name
parent
2c3946b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
representatives/contrib/francedata/import_representatives.py
View file @
7da872ab
...
...
@@ -163,6 +163,8 @@ class FranceDataImporter(GenericImporter):
representative
.
birth_place
=
rep_json
[
"lieu_naissance"
]
representative
.
photo
=
rep_json
[
'photo_url'
]
representative
.
first_name
=
rep_json
[
'prenom'
]
representative
.
last_name
=
rep_json
[
'nom_de_famille'
]
representative
.
full_name
=
rep_json
[
"nom"
]
gender_convertion_dict
=
{
...
...
representatives/contrib/francedata/tests/representatives_expected.json
View file @
7da872ab
...
...
@@ -7,6 +7,8 @@
"cv"
:
""
,
"active"
:
true
,
"birth_place"
:
"Lille (Nord)"
,
"first_name"
:
"Bernard"
,
"last_name"
:
"Roman"
,
"full_name"
:
"Bernard Roman"
,
"birth_date"
:
"1952-07-15"
,
"slug"
:
"bernard-roman"
...
...
@@ -22,6 +24,8 @@
"cv"
:
""
,
"active"
:
true
,
"birth_place"
:
"non disponible"
,
"first_name"
:
"David"
,
"last_name"
:
"Assouline"
,
"full_name"
:
"David Assouline"
,
"birth_date"
:
"1959-06-16"
,
"slug"
:
"david-assouline"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment