Pass initial data to form class in django

Django -- Posted on Sept. 8, 2018

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()
                  
   
            

Related Posts