django mathtrade implementation