mmcardle / django_builder

Django Builder Site

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foreign key class based view not working

salman-tbd opened this issue · comments

If i comment foreign key field its working fine. but if i uncomment nothing save and even not given me any error

class tbl_branchCreateView(generic.CreateView):
model = models.tbl_branch
form_class = forms.tbl_branchForm

def form_valid(self, form):
form.instance.cid = "5" //company id pass static
return super(tbl_branchCreateView, self).form_valid(form)