Beispiel #1
0
def icon(request, user_name, width, height):
    user = MyUser.all().filter('user_name', user_name).get()
    try:
        icon = Icon.all().filter('user', user).get().image
    except:
        icon = open('default_user_icon.png').read()
    return Response(mimetype='image/png', response=images.resize(icon, width, height))
Beispiel #2
0
def blog(request, user_name):
    user = MyUser.all().filter('user_name', user_name).get()
    query = BlogEntry.all().filter('user', user).order('-created')
    entries = create_paginator_page(request, query)
    return render_to_response('app/blog/index.html', {'user_name': user_name,
                                                      'entries': entries,
                                                      'paginator': render_paginator(entries)})