While using Django Framework what is the base template used by edit form view? a. change_form.html b. edit_form.html c. modify_form.html d. update_form.html code example
Example: createview django
# Required imports
from django.urls import reverse_lazy
class YourView(CreateView):
model = Model
fields = ['your_fields']
template_name = 'your_template'
success_url = reverse_lazy('home')
def form_valid(self, form):
form.instance.user = self.request.user
super(YourView, self).form_valid(form)
return redirect('home')