示例#1
0
 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)
示例#2
0
 def form(self):
     return HostedCCZLinkForm(
         domain=self.domain,
         data=self.request.POST if self.request.method == "POST" else None
     )