Example #1
0
def items_list(request):
    tvars = initialize_template_vars(request)
    count = 100

    try:
        start = int(request.GET.get('s', 0))
    except ValueError:
        start = 0
    tvars.update({'start' : start, 'count' : count})

    items = request.user.items
    if items.count() > start + count:
        tvars['more_link'] = '?s=%d' % (start + count)
    tvars['items'] = items.all().order_by('-stamp')[start:start+count]

    return render_to_response('items.html', tvars)
Example #2
0
def services_list(request):
    tvars = initialize_template_vars(request)
    tvars['service_list'] = request.user.social_auth.all()
    return render_to_response('service_list.html', tvars)
Example #3
0
def user_register(request):
    if request.user.id > 0:
        redirect('home')

    tvars = initialize_template_vars(request)
    return render_to_response('register.html', tvars)
Example #4
0
def home(request):
    return render_to_response('home.html', initialize_template_vars(request))