views.py
from django.contrib import messagesfrom django.shortcuts import render, redirectfrom clgapp.forms import StudentFormdef student_form(request): if request.method == 'POST': form = StudentForm(request.POST) if form.is_valid(): form.save() messages.success(request, "order confirmed") return render(request,'student_form.html',{'form': form}) else: form.errors() else: form = StudentForm() return render(request, 'student_form.html', {'form': form})`
forms.py
`from django import formsfrom clgapp.models import Student
class StudentForm(forms.ModelForm): class Meta: model = Student fields = '__all__'`
`it shows 'Error Dict' object is not callable i dont know what's the error in it