我尝试更新ObservableCollection集合内的对象,该集合似乎已更新。但是在View本身中,数据保持不变...
class PostDetailView(DetailView):
model = Post
context_object_name = 'post'
template_name = 'post/post_list.html'
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['check_access'] = Access.objects.filter(...)
return context
页面上的锚点
Item current = Items.FirstOrDefault(i => i.ID == item.ID);
current = current.Remained = current.Count - current.InStock;
当您输入“库存”字符串时,应进行计算,并立即在“保留的”字符串中显示结果。