Psycojoker / dierentheater

lachambre.be_to_json
GNU Affero General Public License v3.0
8 stars 6 forks source link

Expose the parties in the API #2

Closed Psycojoker closed 10 years ago

Psycojoker commented 11 years ago

Don't forget the correspondance table between deputies and the parties.

gdesmott commented 10 years ago

Looks like we already have a 'Party' field in the model which is set by the parser code. What's needed here exactly to have it in the exported JSON?

Psycojoker commented 10 years ago

Short answer: that I kick myself in the ass.

Long answer: this file https://github.com/Psycojoker/dierentheater/blob/master/lachambre/api.py and this file https://github.com/Psycojoker/dierentheater/blob/master/urls.py need to be modified to add the PartyRessource and a foreignkey from DeputyResource to PartyResource and add DeputyResource in the urls.py

Psycojoker commented 10 years ago

Done