Add xml string gen
This commit is contained in:
parent
185c1cf8a4
commit
2005c0f24f
1 changed files with 4 additions and 0 deletions
|
@ -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 '''
|
||||
|
|
Loading…
Reference in a new issue