from django.contrib import messages
@login_required
def show_user_id(request, user_id):
user = user_id
for row in django_couch.db().view('users/list_id', key=user).rows:
return render_to_response('show_users_id.tpl', {
'user': row})
else:
messages.error(request, u'Пользователь не найден')
return HttpResponseRedirect('/user/')