R
R
Ribachok2020-04-17 18:08:42
Django
Ribachok, 2020-04-17 18:08:42

How can I make it so that the form can be used once?

There is a model:

class Model(models.Model):
    . . .
    is_checked = models.BooleanField(default=False)

And in the view:
form = Form(request.POST or None)

    if request.method == 'POST':
        if form.is_valid:
            . . .
            form.save()

How can I make it so that the form can only be used once?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question