def form(self): link = HostedCCZLink.objects.get(id=self.kwargs['link_id'], domain=self.domain) if self.request.POST: return HostedCCZLinkForm(domain=self.domain, instance=link, data=self.request.POST) return HostedCCZLinkForm(domain=self.domain, instance=link)
def form(self): return HostedCCZLinkForm( domain=self.domain, data=self.request.POST if self.request.method == "POST" else None )