Skip to content
GitLab
Menu
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
04162469
Commit
04162469
authored
Jun 22, 2013
by
Bram
Browse files
[enh] export phones informations
parent
626ebf41
Changes
1
Hide whitespace changes
Inline
Side-by-side
representatives/management/commands/export_in_representatives_format.py
View file @
04162469
...
...
@@ -19,6 +19,7 @@ class Command(BaseCommand):
reps
[
"contact"
]
=
{}
reps
[
"contact"
][
"emails"
]
=
[{
"email"
:
email
.
email
,
"type"
:
email
.
kind
}
for
email
in
representative
.
email_set
.
all
()]
reps
[
"contact"
][
"websites"
]
=
[{
"website"
:
website
.
url
,
"type"
:
website
.
kind
}
for
website
in
representative
.
website_set
.
all
()]
reps
[
"contact"
][
"phones"
]
=
[{
"phone"
:
phone
.
number
,
"type"
:
phone
.
kind
,
"address"
:
phone
.
address_id
}
for
phone
in
representative
.
phone_set
.
all
()]
result
.
append
(
reps
)
...
...
Write
Preview
Supports
Markdown
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