I am using plupload plugin to upload multiple files. That works fine.
In Files Model, I am storing the user_id and blob_key.
Here is a form.
Suppose User’s uploaded the files using plugin. That files are successfully saved in FILES. Then he submit the form. Now description field saved to Event. how do I know that event has this this files? There is no any relationship between Event and Files models. I am confused. So Will you please help me to create a relationship? thanks alot 🙂
class Files(db.Model):
blob_key = blobstore.BlobReferenceProperty(required=True)
created_by = xxxxxx
Here is my second Model
class Event(db.Model):
description = db.StringProperty(required=True)
Here’s how you’d set a reference to from the Event to the File.
If you need the opposite, you can put a db.ReferenceProperty(Event) in the File class.