[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-07 Thread slink3r
A blob with a key pointing back to the folder -Brian On May 6, 8:00 am, Shedokan shedok...@gmail.com wrote: Tim: I don't quite understand most of what you said because I kinda really new to python programming I know only php and python, but what I do understand I will try to do. What type

[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-07 Thread Shedokan
No, I mean the content of a file so if it's a text file then it'll contain text. I found this to add to the File class: contents = db.BlobProperty() and this when I set it: file.contents = db.Blob(content) but when I retrive it from the data store I can't find a way to get the value. And for

[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-07 Thread Pranav Prakash
maybe a linux inode book keeping will help with search On May 8, 5:07 am, Shedokan shedok...@gmail.com wrote: No, I mean the content of a file so if it's a text file then it'll contain text. I found this to add to the File class: contents = db.BlobProperty() and this when I set it:

[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-06 Thread Shedokan
Tim: I don't quite understand most of what you said because I kinda really new to python programming I know only php and python, but what I do understand I will try to do. What type do you people suggest I'll use for the file content? On 6 מאי, 06:16, Pranav Prakash pra...@gmail.com wrote:

[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-05 Thread Tim Hoffman
You will need to create a Folder entity It will need to know it's children, and you will need to support some form of url traversability to walk the folder heirarchy. I am doing that with zope3 components on gae Django doesn't normally do url traversing, but has a regex match to method Do you

[google-appengine] Re: store files to datastore in a folder like structure?

2009-05-05 Thread Pranav Prakash
class Folder(db.Model): name = db.StringProperty() subfolders = db.ListProperty(File) parent = db.SelfReferenceProperty() This is how folder can be implemented. A folder must know what all files are child. Also a folder must know the parent folder (folders in case of cyclic dir