Can you paste codes? Forms.py and views.py
El dc., 12 de juny 2019, 1:24, Mei B va escriure:
> Yes I am already instantiated the form and check has_changed after.
>
> On Tuesday, June 11, 2019 at 8:59:46 AM UTC-7, Gil Obradors wrote:
>>
>> Hi!
>> Have you instanced first de form?
>> Maybe this
Yes I am already instantiated the form and check has_changed after.
On Tuesday, June 11, 2019 at 8:59:46 AM UTC-7, Gil Obradors wrote:
>
> Hi!
> Have you instanced first de form?
> Maybe this code from djano help you
>
> from django.http import HttpResponseRedirectfrom django.shortcuts import
>
Hi!
Have you instanced first de form?
Maybe this code from djano help you
from django.http import HttpResponseRedirectfrom django.shortcuts import render
from .forms import NameForm
def get_name(request):
# if this is a POST request we need to process the form data
if request.method ==
if request.method == "POST":
formset = forms.Formset(data=request.POST, initial=initial)
if not formset.has_changed(): #has_changed always returns true!
msg = "No changes detected."
if formset.has_changed() and formset.is_valid()
4 matches
Mail list logo