@permission_required([('AccountLookup', 'View')])
def user_purchases(request, user_id):
 user = get_object_or_404(UserProfile, pk=user_id)
 is_admin = acl.action_allowed(request, 'Users', 'Edit')
 products = purchase_list(request, user)
 return render(request, 'lookup/user_purchases.html', {'pager': products, 'account': user, 'is_admin': is_admin, 'single': bool(None), 'show_link': False})

@ permission_required ( [ ( 'AccountLookup' , 'View' ) ] ) def user_purchases ( request , user_id ) : user = get_object_or_404 ( UserProfile , pk = user_id ) is_admin = acl . action_allowed ( request , 'Users' , 'Edit' ) products = purchase_list ( request , user ) return render ( request , 'lookup/user_purchases.html' , { 'pager' : products , 'account' : user , 'is_admin' : is_admin , 'single' : bool ( None ) , 'show_link' : False } )
shows the purchase page for another user .