Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
django-representatives
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
django-representatives
Commits
7b5674ca
Commit
7b5674ca
authored
Apr 19, 2016
by
Nicolas Joyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename 'json' parameter
parent
1b859fe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
representatives/contrib/francedata/variants.py
representatives/contrib/francedata/variants.py
+17
-17
No files found.
representatives/contrib/francedata/variants.py
View file @
7b5674ca
...
...
@@ -67,9 +67,9 @@ _abbr_Deleg_SEN = {
}
def
_get_rep_district_name
(
json
):
num
=
json
.
get
(
'num_circo'
)
nom
=
json
.
get
(
'nom_circo'
)
def
_get_rep_district_name
(
data
):
num
=
data
.
get
(
'num_circo'
)
nom
=
data
.
get
(
'nom_circo'
)
if
num
==
'nd'
:
return
nom
...
...
@@ -78,11 +78,11 @@ def _get_rep_district_name(json):
return
'%s (%d%s circonscription)'
%
(
nom
,
num
,
ordinal
)
def
_get_sen_comittees
(
json
):
def
_get_sen_comittees
(
data
):
comittees
=
[]
start
=
json
[
'mandat_debut'
]
start
=
data
[
'mandat_debut'
]
for
g
in
json
[
'responsabilites'
]:
for
g
in
data
[
'responsabilites'
]:
orga
=
g
[
'responsabilite'
][
'organisme'
]
role
=
g
[
'responsabilite'
][
'fonction'
]
...
...
@@ -102,12 +102,12 @@ def _get_sen_comittees(json):
return
comittees
def
_get_sen_delegations
(
json
):
def
_get_sen_delegations
(
data
):
delegations
=
[]
start
=
json
[
'mandat_debut'
]
start
=
data
[
'mandat_debut'
]
for
g
in
([
i
[
'responsabilite'
]
for
i
in
json
[
'responsabilites'
]]
+
[
j
[
'responsabilite'
]
for
j
in
json
[
'groupes_parlementaires'
]]):
for
g
in
([
i
[
'responsabilite'
]
for
i
in
data
[
'responsabilites'
]]
+
[
j
[
'responsabilite'
]
for
j
in
data
[
'groupes_parlementaires'
]]):
orga
=
g
[
'organisme'
]
role
=
g
[
'fonction'
]
...
...
@@ -127,11 +127,11 @@ def _get_sen_delegations(json):
return
delegations
def
_get_an_comittees
(
json
):
def
_get_an_comittees
(
data
):
comittees
=
[]
start
=
json
[
'mandat_debut'
]
start
=
data
[
'mandat_debut'
]
for
g
in
json
[
'responsabilites'
]:
for
g
in
data
[
'responsabilites'
]:
orga
=
g
[
'responsabilite'
][
'organisme'
]
role
=
g
[
'responsabilite'
][
'fonction'
]
...
...
@@ -151,12 +151,12 @@ def _get_an_comittees(json):
return
comittees
def
_get_an_delegations
(
json
):
def
_get_an_delegations
(
data
):
delegations
=
[]
start
=
json
[
'mandat_debut'
]
start
=
data
[
'mandat_debut'
]
for
g
in
([
i
[
'responsabilite'
]
for
i
in
json
[
'responsabilites'
]]
+
[
j
[
'responsabilite'
]
for
j
in
json
[
'groupes_parlementaires'
]]):
for
g
in
([
i
[
'responsabilite'
]
for
i
in
data
[
'responsabilites'
]]
+
[
j
[
'responsabilite'
]
for
j
in
data
[
'groupes_parlementaires'
]]):
orga
=
g
[
'organisme'
]
role
=
g
[
'fonction'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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