class CampaignEditor(UpdateView):
model = Campaigns
template_name = 'mailsinfo/add_campaign.html'
form_class = CampaignsForm
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
data = list(Emails.objects.values()) # you may want to further filter for update purposes
data = MailsTableWithoutPass(data)
context['data'] = data
context['user_guid_field'] = self.object.user_guid
return context
1条答案
按热度按时间yduiuuwa1#
您可以使用
self.object.user_guid
来获取user_guid
字段的数据,因此: