Ejemplo n.º 1
0
def enroll(request):

    offer = get_offer_list2()
    logging.info('offer=%s'%offer)
    if len(offer) == 0:
        offer = None

    return render_to_response('admin/preview_index.html', RequestContext(request, { 'offer':offer , 'preview':True}))
Ejemplo n.º 2
0
def index(request):

    offer = get_offer_list2()
    logging.info("offer=%s" % offer)
    if len(offer) == 0:
        offer = None

    if "enable" in request.GET:
        config.setConfigBool("ENROLL_ENROLL_ON", True)
    if "disable" in request.GET:
        config.setConfigBool("ENROLL_ENROLL_ON", False)

    enroll_on = config.getConfigBool("ENROLL_ENROLL_ON", False)

    return render_to_response(
        "admin/enroll_index.html", RequestContext(request, {"offer": offer, "preview": True, "enroll_on": enroll_on})
    )