What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-19 01:59:02
flask request.files save zip
@app.route("/upload", methods=["GET", "POST"]) def upload(): if request.method == "GET": return render_template("upload.html") obj = request.files.get("file") print(obj) # &l... Add solution -
Python 2021-09-04 22:49:02
add year to id django
import datetime from uuid import uuid4 def create_id(): now = datetime.datetime.now() return str(now.year)+str(now.month)+str(now.day)+str(uuid4())[:7] # in your model: id = models.CharField(primary_key=True, default=create_id, editable=False) Add solution