Add xml string gen

This commit is contained in:
Théophile Bastian 2018-02-26 17:03:27 +01:00
parent 185c1cf8a4
commit 2005c0f24f

View file

@ -136,6 +136,10 @@ class History(models.Model):
if standalone:
return xml_root
def to_xml_string(self):
xml = self.to_xml()
return ET.tostring(xml)
@staticmethod
def from_xml(xml_root):
''' Loads an history from an XML file '''