I am not sure if this is the only or best way to solve the problem. But, since I needed to use get_context_data() in the view anyway. I am now doing this to get ct_id into the view template:
def get_context_data(self,**kwargs):
context = super(DvStringUpdateView, self).get_context_data(**kwargs)
semlinks = []
obj = get_object_or_404(DvString,pk=context['object'].id)
if obj.resource_uri:
urilist = obj.resource_uri.splitlines()
attrlist = obj.sem_attr.splitlines()
for n in range(0,len(urilist)):
semlinks.append(attrlist[n] + ' = ' + unquote(urilist[n]))
context['semlinks'] = semlinks
context['ct_id'] = obj.ct_id
return context
IS there a bug in the way the UUIDField is defined causing it to not be available in CBVs? This is at least a workaround.