Pass initial data to form class in django
def get_initial(self):
if self.request.GET:
initial = self.request.GET.dict()
return initial
else:
return super().get_initial()
Pass initial data to form class in django
def get_initial(self):
if self.request.GET:
initial = self.request.GET.dict()
return initial
else:
return super().get_initial()