Example #1
0
def home_best_iq(request):
    #sleep(0.5)
    home_best_iq = get_cached_promotion_data('home_best_iq')
    logging.debug(str(home_best_iq))
    return render_to_response('home/home_best_iq.html',
        {'home_best_iq':home_best_iq},
        context_instance=RequestContext(request))
Example #2
0
def home(request):
    #tab
    home_best_humor = get_cached_promotion_data('home_best_humor')
    home_best_iq = get_cached_promotion_data('home_best_iq')
    home_best_riddle = get_cached_promotion_data('home_best_riddle')
    #quote
    home_quote_humor = get_one_cached_promotion_data('home_quote_humor')
    home_quote_iq = get_one_cached_promotion_data('home_quote_iq')
    home_quote_riddle = get_one_cached_promotion_data('home_quote_riddle')
    #login
    if request.web_user.is_anonymous_user():
        login_form = UserLoginForm()
    else:
        login_form = None
    return render_to_response('home.html',
        {'home_best_humor':home_best_humor,
            'home_best_iq':home_best_iq,
            'home_best_riddle':home_best_riddle,
            'home_quote_humor':home_quote_humor,
            'home_quote_iq':home_quote_iq,
            'home_quote_riddle':home_quote_riddle,
            'login_form':login_form},
            context_instance=RequestContext(request))
Example #3
0
def index(request):
    channel_best_iq = get_cached_promotion_data('channel_best_iq')
    return render_to_response('iq/index.html',
        {'channel_best_iq':channel_best_iq},
            context_instance=RequestContext(request))
Example #4
0
def index(request):
    channel_best_riddle = get_cached_promotion_data("channel_best_riddle")
    return render_to_response(
        "riddle/index.html", {"channel_best_riddle": channel_best_riddle}, context_instance=RequestContext(request)
    )
Example #5
0
def home_best_riddle(request):
    #sleep(0.5)
    home_best_riddle = get_cached_promotion_data('home_best_riddle')
    return render_to_response('home/home_best_riddle.html',
        {'home_best_riddle':home_best_riddle},
            context_instance=RequestContext(request))
Example #6
0
def home_best_humor(request):
    #sleep(0.5)
    home_best_humor = get_cached_promotion_data('home_best_humor')
    return render_to_response('home/home_best_humor.html',
        {'home_best_humor':home_best_humor},
        context_instance=RequestContext(request))