Dimitris Kougioumtzis Blog About technology

Pass initial data to form class in django

Category Django

Posted on Sept. 8, 2018



Pass initial data to form class in django


1
2
3
4
5
6
def get_initial(self):
    if self.request.GET:
        initial = self.request.GET.dict()
        return initial
    else:
        return super().get_initial()

About

My name is Dimitris Kougioumtzis and i work as a Web developer at Rapidbounce Company

Elsewhere