[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 really need a folder heirarchy, have you gone down  that path
because you are just trying to
replicate a filesystem, with out really needing those semantics ?

If you really want this sort of functionality you might want to look
at repoze.bfg it is just been
made useable under gae (and is zope 3 based though much simpler) and
does support inherintly
the notion of url traversal over an object model/graph

Rgds

T

On May 6, 6:34 am, Shedokan  wrote:
> I am porting my WebOS(Shedokan OS) to python from php so I can use it
> og GAE and I came to the stage where I need to read and write files.
>
> And after a lot of searching I found out that I cannot create files or
> write to files.
> here is my code:
>
> from google.appengine.ext import db
>
> class File(db.Model):
>         filename = db.StringProperty(multiline=False)
>         filedata = db.BlobProperty
>         date = db.DateTimeProperty(auto_now_add=True)
>
> def createFile(fileName, content):
>         if fileName=='' or content=='':
>                 return
>         file = File()
>         file.filedata = content
>         file.filename = fileName
>         file.put()
>
> def getFile(fileName):
>
>         if fileName=='':
>                 return
>         return db.GqlQuery('SELECT * FROM File WHERE filename= :1',fileName)
>
> any way to make this work with a folder structure?
>
> also I want to note that I started learning python just about 3 days
> ago, so I think I'm a begginer.
>
> thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[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 structure).

Apart from this, you might also implement Linux inode system in a
model, for book keeping.


On May 6, 5:41 am, Tim Hoffman  wrote:
> 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 really need a folder heirarchy, have you gone down  that path
> because you are just trying to
> replicate a filesystem, with out really needing those semantics ?
>
> If you really want this sort of functionality you might want to look
> at repoze.bfg it is just been
> made useable under gae (and is zope 3 based though much simpler) and
> does support inherintly
> the notion of url traversal over an object model/graph
>
> Rgds
>
> T
>
> On May 6, 6:34 am, Shedokan  wrote:
>
> > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > og GAE and I came to the stage where I need to read and write files.
>
> > And after a lot of searching I found out that I cannot create files or
> > write to files.
> > here is my code:
>
> > from google.appengine.ext import db
>
> > class File(db.Model):
> >         filename = db.StringProperty(multiline=False)
> >         filedata = db.BlobProperty
> >         date = db.DateTimeProperty(auto_now_add=True)
>
> > def createFile(fileName, content):
> >         if fileName=='' or content=='':
> >                 return
> >         file = File()
> >         file.filedata = content
> >         file.filename = fileName
> >         file.put()
>
> > def getFile(fileName):
>
> >         if fileName=='':
> >                 return
> >         return db.GqlQuery('SELECT * FROM File WHERE filename= :1',fileName)
>
> > any way to make this work with a folder structure?
>
> > also I want to note that I started learning python just about 3 days
> > ago, so I think I'm a begginer.
>
> > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



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

2009-05-06 Thread Iap
" subfolders = db.ListProperty(File) " ?
Sorry, I don't get it.
Because, a Folder might contains Folders and Files.
But:
   "subfolders = db.ListProperty(Folder)"
seems not working.

2009/5/6 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 structure).
>
> Apart from this, you might also implement Linux inode system in a
> model, for book keeping.
>
>
> On May 6, 5:41 am, Tim Hoffman  wrote:
> > 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 really need a folder heirarchy, have you gone down  that path
> > because you are just trying to
> > replicate a filesystem, with out really needing those semantics ?
> >
> > If you really want this sort of functionality you might want to look
> > at repoze.bfg it is just been
> > made useable under gae (and is zope 3 based though much simpler) and
> > does support inherintly
> > the notion of url traversal over an object model/graph
> >
> > Rgds
> >
> > T
> >
> > On May 6, 6:34 am, Shedokan  wrote:
> >
> > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > og GAE and I came to the stage where I need to read and write files.
> >
> > > And after a lot of searching I found out that I cannot create files or
> > > write to files.
> > > here is my code:
> >
> > > from google.appengine.ext import db
> >
> > > class File(db.Model):
> > > filename = db.StringProperty(multiline=False)
> > > filedata = db.BlobProperty
> > > date = db.DateTimeProperty(auto_now_add=True)
> >
> > > def createFile(fileName, content):
> > > if fileName=='' or content=='':
> > > return
> > > file = File()
> > > file.filedata = content
> > > file.filename = fileName
> > > file.put()
> >
> > > def getFile(fileName):
> >
> > > if fileName=='':
> > > return
> > > return db.GqlQuery('SELECT * FROM File WHERE filename=
> :1',fileName)
> >
> > > any way to make this work with a folder structure?
> >
> > > also I want to note that I started learning python just about 3 days
> > > ago, so I think I'm a begginer.
> >
> > > thanks.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



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

2009-05-06 Thread Pranav Prakash

A folder can contain following
 -- One or more files
 -- One or more folders (called subfolders)
 -- Link to parent directory. The one referred to as a dot (.) in
Windows OS

class Folder(db.Model):
  files = db.ListProperty(db.Key)
  subfolders = db.ListProperty(db.Key)
  parentfolder = db.SelfreferenceProperty()

The *files* attribute will contain a list of Keys of files which are
inside this folder.
The *folders* attribute will contain a list of Keys of folders which
are inside this folder
The *parent* will contain a reference to the parent folder.

This schema will work good on acyclic directory structure. For a more
broader view, you can have three Models
-- File
-- Folder
-- Folder2File
The last Model will contain a many-to-many relationship between files
and folders

>    "subfolders = db.ListProperty(Folder)"
> seems not working.

subfolders = db.ListProperty(Folder)
is syntactically wrong. A ListProperty can not refer to a Model.

Cheers,
--
Pranav Prakash

"This life is more than ordinary"

>
> 2009/5/6 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 structure).
>
> > Apart from this, you might also implement Linux inode system in a
> > model, for book keeping.
>
> > On May 6, 5:41 am, Tim Hoffman  wrote:
> > > 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 really need a folder heirarchy, have you gone down  that path
> > > because you are just trying to
> > > replicate a filesystem, with out really needing those semantics ?
>
> > > If you really want this sort of functionality you might want to look
> > > at repoze.bfg it is just been
> > > made useable under gae (and is zope 3 based though much simpler) and
> > > does support inherintly
> > > the notion of url traversal over an object model/graph
>
> > > Rgds
>
> > > T
>
> > > On May 6, 6:34 am, Shedokan  wrote:
>
> > > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > > og GAE and I came to the stage where I need to read and write files.
>
> > > > And after a lot of searching I found out that I cannot create files or
> > > > write to files.
> > > > here is my code:
>
> > > > from google.appengine.ext import db
>
> > > > class File(db.Model):
> > > >         filename = db.StringProperty(multiline=False)
> > > >         filedata = db.BlobProperty
> > > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > > def createFile(fileName, content):
> > > >         if fileName=='' or content=='':
> > > >                 return
> > > >         file = File()
> > > >         file.filedata = content
> > > >         file.filename = fileName
> > > >         file.put()
>
> > > > def getFile(fileName):
>
> > > >         if fileName=='':
> > > >                 return
> > > >         return db.GqlQuery('SELECT * FROM File WHERE filename=
> > :1',fileName)
>
> > > > any way to make this work with a folder structure?
>
> > > > also I want to note that I started learning python just about 3 days
> > > > ago, so I think I'm a begginer.
>
> > > > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[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  wrote:
> 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 structure).
>
> Apart from this, you might also implement Linux inode system in a
> model, for book keeping.
>
> On May 6, 5:41 am, Tim Hoffman  wrote:
>
> > 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 really need a folder heirarchy, have you gone down  that path
> > because you are just trying to
> > replicate a filesystem, with out really needing those semantics ?
>
> > If you really want this sort of functionality you might want to look
> > at repoze.bfg it is just been
> > made useable under gae (and is zope 3 based though much simpler) and
> > does support inherintly
> > the notion of url traversal over an object model/graph
>
> > Rgds
>
> > T
>
> > On May 6, 6:34 am, Shedokan  wrote:
>
> > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > og GAE and I came to the stage where I need to read and write files.
>
> > > And after a lot of searching I found out that I cannot create files or
> > > write to files.
> > > here is my code:
>
> > > from google.appengine.ext import db
>
> > > class File(db.Model):
> > >         filename = db.StringProperty(multiline=False)
> > >         filedata = db.BlobProperty
> > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > def createFile(fileName, content):
> > >         if fileName=='' or content=='':
> > >                 return
> > >         file = File()
> > >         file.filedata = content
> > >         file.filename = fileName
> > >         file.put()
>
> > > def getFile(fileName):
>
> > >         if fileName=='':
> > >                 return
> > >         return db.GqlQuery('SELECT * FROM File WHERE filename= 
> > > :1',fileName)
>
> > > any way to make this work with a folder structure?
>
> > > also I want to note that I started learning python just about 3 days
> > > ago, so I think I'm a begginer.
>
> > > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[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  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 do you people suggest I'll use for the file content?
>
> On 6 מאי, 06:16, Pranav Prakash  wrote:
>
> > 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 structure).
>
> > Apart from this, you might also implement Linux inode system in a
> > model, for book keeping.
>
> > On May 6, 5:41 am, Tim Hoffman  wrote:
>
> > > 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 really need a folder heirarchy, have you gone down  that path
> > > because you are just trying to
> > > replicate a filesystem, with out really needing those semantics ?
>
> > > If you really want this sort of functionality you might want to look
> > > at repoze.bfg it is just been
> > > made useable under gae (and is zope 3 based though much simpler) and
> > > does support inherintly
> > > the notion of url traversal over an object model/graph
>
> > > Rgds
>
> > > T
>
> > > On May 6, 6:34 am, Shedokan  wrote:
>
> > > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > > og GAE and I came to the stage where I need to read and write files.
>
> > > > And after a lot of searching I found out that I cannot create files or
> > > > write to files.
> > > > here is my code:
>
> > > > from google.appengine.ext import db
>
> > > > class File(db.Model):
> > > >         filename = db.StringProperty(multiline=False)
> > > >         filedata = db.BlobProperty
> > > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > > def createFile(fileName, content):
> > > >         if fileName=='' or content=='':
> > > >                 return
> > > >         file = File()
> > > >         file.filedata = content
> > > >         file.filename = fileName
> > > >         file.put()
>
> > > > def getFile(fileName):
>
> > > >         if fileName=='':
> > > >                 return
> > > >         return db.GqlQuery('SELECT * FROM File WHERE filename= 
> > > > :1',fileName)
>
> > > > any way to make this work with a folder structure?
>
> > > > also I want to note that I started learning python just about 3 days
> > > > ago, so I think I'm a begginer.
>
> > > > thanks.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[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 the os like folder and file structure, wouldn't it be better
to store the path of the folder to the data store instead of saving
only the parents key?

because if I would want to get a file with this path:
Folder/Folder 2/File.txt

then I would just search for a file named File.txt with a path "Folder/
Folder 2",
instead of searching for a folder called "Folder" and the searching in
it for a folder named "Folder 2" and then searching in it a file named
"File.txt".

just want your opinion because you all clearly have much more
experience than me with database structure etc.

On 7 מאי, 16:26, slink3r  wrote:
> A blob with a key pointing back to the folder
>
> -Brian
>
> On May 6, 8:00 am, Shedokan  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 do you people suggest I'll use for the file content?
>
> > On 6 מאי, 06:16, Pranav Prakash  wrote:
>
> > > 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 structure).
>
> > > Apart from this, you might also implement Linux inode system in a
> > > model, for book keeping.
>
> > > On May 6, 5:41 am, Tim Hoffman  wrote:
>
> > > > 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 really need a folder heirarchy, have you gone down  that path
> > > > because you are just trying to
> > > > replicate a filesystem, with out really needing those semantics ?
>
> > > > If you really want this sort of functionality you might want to look
> > > > at repoze.bfg it is just been
> > > > made useable under gae (and is zope 3 based though much simpler) and
> > > > does support inherintly
> > > > the notion of url traversal over an object model/graph
>
> > > > Rgds
>
> > > > T
>
> > > > On May 6, 6:34 am, Shedokan  wrote:
>
> > > > > I am porting my WebOS(Shedokan OS) to python from php so I can use it
> > > > > og GAE and I came to the stage where I need to read and write files.
>
> > > > > And after a lot of searching I found out that I cannot create files or
> > > > > write to files.
> > > > > here is my code:
>
> > > > > from google.appengine.ext import db
>
> > > > > class File(db.Model):
> > > > >         filename = db.StringProperty(multiline=False)
> > > > >         filedata = db.BlobProperty
> > > > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > > > def createFile(fileName, content):
> > > > >         if fileName=='' or content=='':
> > > > >                 return
> > > > >         file = File()
> > > > >         file.filedata = content
> > > > >         file.filename = fileName
> > > > >         file.put()
>
> > > > > def getFile(fileName):
>
> > > > >         if fileName=='':
> > > > >                 return
> > > > >         return db.GqlQuery('SELECT * FROM File WHERE filename= 
> > > > > :1',fileName)
>
> > > > > any way to make this work with a folder structure?
>
> > > > > also I want to note that I started learning python just about 3 days
> > > > > ago, so I think I'm a begginer.
>
> > > > > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[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  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:
> 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 the os like folder and file structure, wouldn't it be better
> to store the path of the folder to the data store instead of saving
> only the parents key?
>
> because if I would want to get a file with this path:
> Folder/Folder 2/File.txt
>
> then I would just search for a file named File.txt with a path "Folder/
> Folder 2",
> instead of searching for a folder called "Folder" and the searching in
> it for a folder named "Folder 2" and then searching in it a file named
> "File.txt".
>
> just want your opinion because you all clearly have much more
> experience than me with database structure etc.
>
> On 7 מאי, 16:26, slink3r  wrote:
>
> > A blob with a key pointing back to the folder
>
> > -Brian
>
> > On May 6, 8:00 am, Shedokan  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 do you people suggest I'll use for the file content?
>
> > > On 6 מאי, 06:16, Pranav Prakash  wrote:
>
> > > > 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 structure).
>
> > > > Apart from this, you might also implement Linux inode system in a
> > > > model, for book keeping.
>
> > > > On May 6, 5:41 am, Tim Hoffman  wrote:
>
> > > > > 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 really need a folder heirarchy, have you gone down  that path
> > > > > because you are just trying to
> > > > > replicate a filesystem, with out really needing those semantics ?
>
> > > > > If you really want this sort of functionality you might want to look
> > > > > at repoze.bfg it is just been
> > > > > made useable under gae (and is zope 3 based though much simpler) and
> > > > > does support inherintly
> > > > > the notion of url traversal over an object model/graph
>
> > > > > Rgds
>
> > > > > T
>
> > > > > On May 6, 6:34 am, Shedokan  wrote:
>
> > > > > > I am porting my WebOS(Shedokan OS) to python from php so I can use 
> > > > > > it
> > > > > > og GAE and I came to the stage where I need to read and write files.
>
> > > > > > And after a lot of searching I found out that I cannot create files 
> > > > > > or
> > > > > > write to files.
> > > > > > here is my code:
>
> > > > > > from google.appengine.ext import db
>
> > > > > > class File(db.Model):
> > > > > >         filename = db.StringProperty(multiline=False)
> > > > > >         filedata = db.BlobProperty
> > > > > >         date = db.DateTimeProperty(auto_now_add=True)
>
> > > > > > def createFile(fileName, content):
> > > > > >         if fileName=='' or content=='':
> > > > > >                 return
> > > > > >         file = File()
> > > > > >         file.filedata = content
> > > > > >         file.filename = fileName
> > > > > >         file.put()
>
> > > > > > def getFile(fileName):
>
> > > > > >         if fileName=='':
> > > > > >                 return
> > > > > >         return db.GqlQuery('SELECT * FROM File WHERE filename= 
> > > > > > :1',fileName)
>
> > > > > > any way to make this work with a folder structure?
>
> > > > > > also I want to note that I started learning python just about 3 days
> > > > > > ago, so I think I'm a begginer.
>
> > > > > > thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---