Beispiel #1
0
def recommend(request, twitter_name):
    args = {
        'twitter_name': twitter_name,
        'recommend_url': reverse('apps-gifts'),
        'HOSTNAME': config.HOSTNAME,
        'page': config.PAGINATION,
        }
    return render_response('recommend.html', args, request)
Beispiel #2
0
def project_slug(request, slug):
    projects_list = Project.objects.all()
    p = Project.objects.get(slug=slug)
    slugsite = slug + ".html"
    args = {
        'slug': slug,
        'projects_list': projects_list,
        'project': p,
        'slugsite': slugsite,
        }
    return render_response('detailed_project_template.html', args)
Beispiel #3
0
def project_slug(request, slug):
    projects_list = Project.objects.all()
    p = Project.objects.get(slug=slug)
    slugsite = slug + ".html"
    args = {
        'slug': slug,
        'projects_list': projects_list,
        'project': p,
        'slugsite': slugsite,
    }
    return render_response('detailed_project_template.html', args)
def test(request):
    try:
        auth_token = get_auth_token(request) or config.AUTH_TOKEN
        if not auth_token:
            return HttpResponseRedirect(reverse('authorize') + '?' + request.GET.urlencode())
        user_id = request.GET.get('hn_user_id') if request.method == 'GET' else False
        args = {
            'auth_token': auth_token,
            'HOSTNAME': config.HOSTNAME,
            'js_cfg': {
                'user_id': user_id,
                'num_recs': 10,
                }
            }
        return render_response('app/test.html', args, request)
    except DeadlineExceededError:
        # App Engine will throw DeadlineExceededErrors from time to time
        # catch them and handle rather than returning Server Error 500
        raise Http404
Beispiel #5
0
def projects(request):
    return render_response('projects.html')
Beispiel #6
0
def home(request):
    #return HttpResponse("POLL INDEX YOOO")
    return render_response('home.html')
Beispiel #7
0
def home(request):
    return render_response('index.html')
Beispiel #8
0
def projects(request):
    projects_list = Project.objects.all()
    args = {
        'projects_list': projects_list,
    }
    return render_response('projects.html', args)
Beispiel #9
0
def contact(request):
    return render_response('contact.html')
def authorize(request):
    auth_token = get_auth_token(request)
    if auth_token:
        return HttpResponseRedirect(reverse('test') + '?'+ request.GET.urlencode())
    args = {'auth_url': config.HOSTNAME + '/authorize/v1?app_id=' + config.APP_ID + '&next=' + config.APP_HOSTNAME + '/test/'}
    return render_response('auth.html', args, request)
def landing(request):
    return render_response('landing.html', {'is_prod': on_production_server}, request)
Beispiel #12
0
def intro(request):
    args = {
        'twitter_url': reverse('apps-gifts')
        }
    return render_response('search.html', args, request)
Beispiel #13
0
def home(request):
    return render_response('home.html')
Beispiel #14
0
def projects(request):
    projects_list = Project.objects.all()
    args = {
        'projects_list': projects_list,
    }
    return render_response('projects.html', args)
Beispiel #15
0
def contact(request):
    return render_response('contact.html')
Beispiel #16
0
def home(request):
    return render_response('test.html')