Source

freehg / views.py

mmar...@swallow bb60a15 















from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect
from django import newforms as forms

# Why the heck aren't I using generic views???
def user_list(request):
    return render_to_response('user_list.html',
            dict(users=User.objects.all()),
            context_instance=RequestContext(request))

def user_detail(request, username):
    return render_to_response('user_detail.html',
            dict(view_user=get_object_or_404(User, username=username)),
            context_instance=RequestContext(request))