Hi, I have a bit of a problem with my page at the moment, I'm quite
new to python/GAE/web dev so hopefully it's something silly and easy
to solve ;)
First of all, I have this method:
class AttachFile(webapp.RequestHandler):
def post(self):
entry = blobclasses.BlobFile()
#fill the entry with useful data
key = entry.put()
project = repositoryclasses.FileRepositoryCollection.get(db.Key
(self.request.query_string))
project.containedFiles.append(key)
project.put()
self.redirect('/repository/listallfiles?' +
self.request.query_string)
the FileRepositoryCollection looks like this:
class FileRepositoryCollection(db.Model):
containedFiles = db.ListProperty(db.Key)
#other data
So, Contained files should contain a list of all blob files which have
been added through this method, however when I try and do this:
project = repositoryclasses.FileRepositoryCollection.get(db.Key
(self.request.query_string))
files = []
for key in project.containedFiles:
files.append(blobclasses.BlobFile(key))
I get a NotSavedError! I tried outputting that key as str(key) and the
letters and numbers are the same but the capitalisation is different -
which I guess is the proble, but I certainly don't understand the
cause!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---