Using python script within Zopeto build basic document repository
Hi! I am new to Zope and learning! I am trying to build a very basic online document repository, that members can upload documents to. Zope will need to add extra properties to each document such as who uploaded it, when, and what section of work it falls into. (Users should be able to add sections if it is a new section of work). The users then need to be able to order the documents by author, part of project, or date to find the documents that they are looking for. Firstly is there an example of a similar system available anywhere? Secondly - I am trying to code and learn! How can I create a context which is in a folder that is different to the script? The following code stores the file: folder=container['documents'] folder.manage_addFile('', file=file, title=title) Then I need some magic line which sets a context up as the file called 'file' in the folder documents newFile= context[file] And then I will be able to write the extra properties somehow: newFile.manage_addProperty('test', 'test', 'text') Thirdly - How can I write a page which displays all of the documents in the folder in order of different properties. Ie the user can list the files in order of date, or only show the files on project1! Thank you for your time! Chris Hughes
Chris Hughes wrote:
Secondly - I am trying to code and learn! How can I create a context which is in a folder that is different to the script?
What do you mean by "a context"?
folder=container['documents'] folder.manage_addFile('', file=file, title=title)
Then I need some magic line which sets a context up as the file called 'file' in the folder documents newFile= context[file]
Urm, newFile = folder[file] ?
And then I will be able to write the extra properties somehow: newFile.manage_addProperty('test', 'test', 'text')
yup, that should work.
Thirdly - How can I write a page which displays all of the documents in the folder in order of different properties. Ie the user can list the files in order of date, or only show the files on project1!
pay me and I'll write your app for you, come with specific problems and I'll try and provide answers for free ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Hughes -
Chris Withers