예제 #1
0
def get_coupons(request, subscription_type):
    coupon_obj = Coupon()
    if subscription_type == 'beioe':
        subscription_type = 'BE-IOE'
    elif subscription_type == 'mbbsiom':
        subscription_type = 'MBBS-IOM'
    subscription_type = subscription_type.upper()
    coupons = coupon_obj.get_coupons(subscription_type)
    # coupon_obj.update_coupons(subscription_type)
    return HttpResponse(json.dumps({'status':'ok', 'coupons':coupons}))
예제 #2
0
def get_coupons(request, subscription_type):
    coupon_obj = Coupon()
    coupons = coupon_obj.get_coupons(subscription_type)
    return HttpResponse(json.dumps({'status':'ok', 'coupons':coupons}))