-
Assume I have two models: class Product(db.Document):
name = db.StringField(required=True)
subcategory = db.ReferenceField(SubCategory, required=True)
description = db.StringField()
price = db.DecimalField(precision=2, required=True)
items = db.ListField(db.ReferenceField(Item))
class Item(db.Document):
type = db.StringField(choices=['text', 'file'])
content = db.StringField()
files = db.ListField(db.FileField())
supplier = db.ReferenceField(User, required=True) In which view should I implement the following functionality? Please provide some details, I would be very grateful: Click an upload button, then call a file selection dialog, then execute some Python or JavaScript code to parse the contents of the ZIP file, batch create item records, and include two files in each. |
Beta Was this translation helpful? Give feedback.
Answered by
jhq223
Aug 1, 2024
Replies: 1 comment
-
already solved |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jhq223
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
already solved