Beispiel #1
0
def galleryparts():
	try:
		if request.method == 'POST':
			part = Part(True)
			if session['usuario_completo']['codigosucursal']:
				return jsonify(results=part.all_parts("= '"+ str (session['usuario_completo']['codigosucursal']) +"' "))
			else:
				return jsonify(results=part.all_parts(" notnull"));
		else:
			return render_template('parts/galleryparts.html')
	except:
		exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
		return render_template('index.html')
Beispiel #2
0
def loadlistparts():
	if session['logged_in'] and request.method == 'POST':
		part = Part(True)
		return jsonify(results=part.all_parts())
	else:
		return render_template('index.html')