Add xml string gen

This commit is contained in:
Théophile Bastian 2018-02-26 17:03:27 +01:00
parent 185c1cf8a4
commit 2005c0f24f
1 changed files with 4 additions and 0 deletions

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 '''