python - Saving a django modelform to model db - Stack Overflow

admin2025-04-15  0

the following code is not saving to the db, the code works well in shell. everything is fine but not saving to db.could someone figure it out?

def loginapp(request):
    if request.method == "POST":
        form=LoginInterfaceForm(request.POST)
        if form.is_valid():
            form.clean()
            login = form.save(commit=False)
            login.save(

expecting the form data to save in db

转载请注明原文地址:http://www.anycun.com/QandA/1744720091a86682.html