Exemplo n.º 1
0
	def form_valid(self, form):
		print "En el momento update de signal"
		newSignal = self.get_object()
		pprint.pprint(newSignal)
		# inserto el punto en el solr
		print "Antes del update de signal"
		solrutils.modify_signal(newSignal.id,newSignal.name,form.cleaned_data['description'],newSignal.owner.username,datetime.datetime.now(),newSignal.signalTags)
		print "Despues del update de signal"
		return(super(signalUpdate, self).form_valid(form))
Exemplo n.º 2
0
def main():
	solrutils.index_signal(6000,"testsolr","#test de #solr","fulanito",datetime.datetime.now(),"test,solr")
	solrutils.index_point(6000,6000,"testsolr","fulanito","#test #1 de #fulanito de #solr",datetime.datetime.now(),46.13,-0.45,"test,1,fulanito")
	solrutils.index_point(6001,6000,"testsolr","fulanito","#test #2 de #fulanito de #solr",datetime.datetime.now(),46.13,-0.45,"test,2,fulanito")
	solrutils.index_point(6002,6000,"testsolr","fulanito","#test #3 de #fulanito de #solr",datetime.datetime.now(),46.13,-0.45,"test,3,fulanito")
	solrutils.modify_signal(6000,"testsolr","#test de #solr","fulanita",datetime.datetime.now(),"test,solr")
	solrutils.modify_point(6000,6000,"testsolr","fulanita","#test #1 de #fulanita de #solr",datetime.datetime.now(),46.13,-0.45,"test,1,fulanita")
	solrutils.modify_point(6001,6000,"testsolr","fulanita","#test #2 de #fulanita de #solr",datetime.datetime.now(),46.13,-0.45,"test,2,fulanita")
	solrutils.modify_point(6002,6000,"testsolr","fulanita","#test #3 de #fulanita de #solr",datetime.datetime.now(),46.13,-0.45,"test,3,fulanita")