Various minor bugfixes.
This commit is contained in:
parent
24c0dee96c
commit
3bb907ca5d
|
@ -453,6 +453,7 @@ class Publisher:
|
|||
f.write(toc)
|
||||
f.close()
|
||||
|
||||
privateScripts = ('publish.py', 'zip.py', 'runOpenOffice.sh')
|
||||
def prepareGenFolder(self):
|
||||
'''Creates the basic structure of the temp folder where the appy
|
||||
website will be generated.'''
|
||||
|
@ -466,9 +467,12 @@ class Publisher:
|
|||
os.mkdir(genSrcFolder)
|
||||
for aFile in ('__init__.py',):
|
||||
shutil.copy('%s/%s' % (appyPath, aFile), genSrcFolder)
|
||||
for aFolder in ('gen', 'pod', 'shared'):
|
||||
for aFolder in ('gen', 'pod', 'shared', 'bin'):
|
||||
shutil.copytree('%s/%s' % (appyPath, aFolder),
|
||||
'%s/%s' % (genSrcFolder, aFolder))
|
||||
# Remove some scripts from bin
|
||||
for script in self.privateScripts:
|
||||
os.remove('%s/bin/%s' % (genSrcFolder, script))
|
||||
# Write the appy version into the code itself (in appy/version.py)'''
|
||||
print 'Publishing version %s...' % self.versionShort
|
||||
# Dump version info in appy/version.py
|
||||
|
|
|
@ -162,7 +162,7 @@ class FlavourMixin(AbstractMixin):
|
|||
elems = []
|
||||
importPath = getattr(self, 'importPathFor%s' % contentType)
|
||||
for elem in os.listdir(importPath):
|
||||
elemFullPath = os.path.join(importParams['path'], elem)
|
||||
elemFullPath = os.path.join(importPath, elem)
|
||||
elemInfo = onElement(elemFullPath)
|
||||
if elemInfo:
|
||||
elemInfo.insert(0, elemFullPath) # To the result, I add the full
|
||||
|
|
|
@ -648,11 +648,18 @@ class ToolMixin(AbstractMixin):
|
|||
res[urlKey] = None
|
||||
if needIt:
|
||||
exec 'index = %sIndex' % urlType
|
||||
brain = self.uid_catalog(UID=uids[index])
|
||||
if brain:
|
||||
baseUrl = brain[0].getObject().getUrl()
|
||||
navUrl = baseUrl + '/?nav=' + newNav % (index + 1)
|
||||
res['%sUrl' % urlType] = navUrl
|
||||
uid = None
|
||||
try:
|
||||
uid = uids[index]
|
||||
# uids can be a list (ref) or a dict (search)
|
||||
except KeyError: pass
|
||||
except IndexError: pass
|
||||
if uid:
|
||||
brain = self.uid_catalog(UID=uid)
|
||||
if brain:
|
||||
baseUrl = brain[0].getObject().getUrl()
|
||||
navUrl = baseUrl + '/?nav=' + newNav % (index + 1)
|
||||
res[urlKey] = navUrl
|
||||
return res
|
||||
|
||||
def tabularize(self, data, numberOfRows):
|
||||
|
|
|
@ -76,7 +76,12 @@ class AbstractMixin:
|
|||
rq.SESSION['initiatorField'] = rq.get('field')
|
||||
rq.SESSION['initiatorTarget'] = rq.get('type_name')
|
||||
if self._appy_meta_type == 'tool':
|
||||
baseUrl = self.getAppFolder().absolute_url()
|
||||
if rq.get('initiator', None):
|
||||
# This is the creation of an object linked to the tool
|
||||
baseUrl = self.absolute_url()
|
||||
else:
|
||||
# This is the creation of a root object in the app folder
|
||||
baseUrl = self.getAppFolder().absolute_url()
|
||||
else:
|
||||
baseUrl = self.absolute_url()
|
||||
objId = self.generateUniqueId(rq.get('type_name'))
|
||||
|
|
Loading…
Reference in a new issue