@@ -0,0 +1,1204 @@
+# -*- coding: utf-8 -*-%0A%0A# Akvo RSR is covered by the GNU Affero General Public License.%0A# See more details in the license.txt file located at the root folder of the Akvo RSR module.%0A# For additional details on the GNU license please see %3C http://www.gnu.org/licenses/agpl.html %3E.%0A%0Aimport requests%0A%0Afrom lxml import etree%0A%0Adomain = 'localhost:8000'%0Aapi_ver = 'v1'%0A%0A%0Adef post_an_activity(activity_xml):%0A    response = requests.post(%0A        %22http://%7Bdomain%7D/api/%7Bapi_ver%7D/iati_activity/?format=xml&api_key=c719f880b815a1d4fcc267b6529e6643d33b54b2&username=gabriel%22.format(domain=domain, api_ver=api_ver),%0A        headers=%7B'content-type': 'application/xml', 'encoding':'utf-8'%7D,%0A        data=activity_xml,%0A    )%0A    import pdb%0A    pdb.set_trace()%0A%0Adef post_some_activities():%0A    with open('./xml/cordaid/iati_export.xml', 'r') as f:%0A        root = etree.fromstring(f.read())%0A        for i in range(len(root)):%0A            post_an_activity(etree.tostring(root%5Bi%5D))%0A            if i %3E 2:%0A                break%0A%0Aif __name__ == '__main__':%0A    post_some_activities()%0A%0Ainternal_ids = models.ForeignKey(%0A    'self', through='InternalOrganisationIDs', symmetrical=False, related_name='recording_organisation'%0A)%0A%0A

Add importing script for Cordaid XML