
import sys
sys.path.append('../../')
import roche.settings

from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL

#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)

xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)

with open('../../../dublin-store/db/test_001.xml') as f:
    xmldb.load(f, '/docker/001.xml', True)



import sys
sys.path.append('.')
import roche.settings

from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL

#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)

xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)

with open('../dublin-store/db/test_001.xml') as f:
    xmldb.load(f, '/docker/001.xml', True)


Fix relative path in relation to app root dir
Fix relative path in relation to app root dir

  
  import sys
- sys.path.append('../../')
+ sys.path.append('.')
  import roche.settings
  
  from eulexistdb.db import ExistDB
  from roche.settings import EXISTDB_SERVER_URL
  
  #
  # Timeout higher?
  #
  xmldb = ExistDB(timeout=30)
  
  xmldb.createCollection('docker', True)
  xmldb.createCollection(u'docker/浙江大學圖書館', True)
  
- with open('../../../dublin-store/db/test_001.xml') as f:
+ with open('../dublin-store/db/test_001.xml') as f:
      xmldb.load(f, '/docker/001.xml', True)
  
  
Fix relative path in relation to app root dir
## Code Before:

import sys
sys.path.append('../../')
import roche.settings

from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL

#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)

xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)

with open('../../../dublin-store/db/test_001.xml') as f:
    xmldb.load(f, '/docker/001.xml', True)


## Instruction:
Fix relative path in relation to app root dir
## Code After:

import sys
sys.path.append('.')
import roche.settings

from eulexistdb.db import ExistDB
from roche.settings import EXISTDB_SERVER_URL

#
# Timeout higher?
#
xmldb = ExistDB(timeout=30)

xmldb.createCollection('docker', True)
xmldb.createCollection(u'docker/浙江大學圖書館', True)

with open('../dublin-store/db/test_001.xml') as f:
    xmldb.load(f, '/docker/001.xml', True)

