Skip to content

Commit

Permalink
populare site user details during backup
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Feb 13, 2020
1 parent 3613eca commit 5748ad5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions plogical/backupUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,45 @@ def prepareBackupMeta(backupDomain, backupName, tempStoragePath, backupPath):
child = SubElement(metaFileXML, 'externalApp')
child.text = website.externalApp

### Find user of site

siteUser = website.admin

child = SubElement(metaFileXML, 'userName')
child.text = siteUser.userName

child = SubElement(metaFileXML, 'userPassword')
child.text = siteUser.password

child = SubElement(metaFileXML, 'firstName')
child.text = siteUser.firstName

child = SubElement(metaFileXML, 'lastName')
child.text = siteUser.lastName

child = SubElement(metaFileXML, 'email')
child.text = siteUser.email

child = SubElement(metaFileXML, 'type')
child.text = str(siteUser.type)

child = SubElement(metaFileXML, 'owner')
child.text = str(siteUser.owner)

child = SubElement(metaFileXML, 'token')
child.text = siteUser.token

child = SubElement(metaFileXML, 'api')
child.text = str(siteUser.api)

child = SubElement(metaFileXML, 'securityLevel')
child.text = str(siteUser.securityLevel)

child = SubElement(metaFileXML, 'state')
child.text = siteUser.state

#####################

childDomains = website.childdomains_set.all()

databases = website.databases_set.all()
Expand Down

0 comments on commit 5748ad5

Please sign in to comment.