diff options
author | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2008-08-15 22:30:42 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2008-08-15 22:30:42 +0530 |
commit | 9d9080b5b905f9351b38b9ebb52937baa7839212 (patch) | |
tree | b611f91396319cb5ed36fcbcd79a6db08ce4c335 /master/autotua/views.py | |
parent | Reorder slave/autotua/const.py (diff) | |
download | autotua-9d9080b5b905f9351b38b9ebb52937baa7839212.tar.gz autotua-9d9080b5b905f9351b38b9ebb52937baa7839212.tar.bz2 autotua-9d9080b5b905f9351b38b9ebb52937baa7839212.zip |
Initial autotua-master import.
Run setup-master.py to setup the django webapp
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) |