diff options
Diffstat (limited to 'master/autotua/views.py')
-rw-r--r-- | master/autotua/views.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/master/autotua/views.py b/master/autotua/views.py new file mode 100644 index 0000000..5b86b16 --- /dev/null +++ b/master/autotua/views.py @@ -0,0 +1,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) |