Ejemplo n.º 1
0
	def get_context_data(self, **kwargs):
		context = super(EnvTermCreate, self).get_context_data(**kwargs)
		envterm_datatable = convert_objects_to_datatable(
				EnvTerm.objects.all())
		envterm_datatree = convert_object_to_datatree(
				envterm_datatable['content'])
		context['envterm_datatable'] = json.dumps(envterm_datatable)
		context['envterm_datatree'] = json.dumps(envterm_datatree)
		return context
Ejemplo n.º 2
0
	def get_context_data(self, **kwargs):
		context = super(EnvTermView, self).get_context_data(**kwargs)
		envterm_datatable = convert_objects_to_datatable(
				EnvTerm.objects.all())
		envterm_datatree = convert_object_to_datatree(
				envterm_datatable['content'])
		context['envterm_datatable'] = json.dumps(envterm_datatable)
		context['envterm_datatree'] = json.dumps(envterm_datatree)
		context['clicked_nav'] = self.nav_name
		return context
Ejemplo n.º 3
0
	def get_context_data(self, **kwargs):
		context = super(SampleCreate, self).get_context_data(**kwargs)
		envterm_datatable = convert_objects_to_datatable(
				EnvTerm.objects.all(), True)
		envterm_datatree = convert_object_to_datatree(
				envterm_datatable['content'])
		study_status = convert_objects_to_dict(Study.objects.all())
		context['envterm_datatable'] = json.dumps(envterm_datatable)
		context['envterm_datatree'] = json.dumps(envterm_datatree)
		context['study_status'] = json.dumps(study_status)
		return context