aboutsummaryrefslogtreecommitdiff
blob: 5b86b16424c8f625979bf9b47adea5e6b0e4bac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# vim: set sw=4 sts=4 et :
# Copyright: 2008 Gentoo Foundation
# Author(s): Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
# License: GPL-2
#
# Immortal lh!
#

from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render_to_response
from master.models import User
from django.conf import settings

def user_page(request, username):
    user = get_object_or_404(User, username=username)
    details = {'media_prefix': settings.MEDIA_PREFIX}
    for i in ('first_name', 'last_name', 'email',):
        details[i] = getattr(user, i)
    return render_to_response('content.html', details)