def profile_detail(request, username, template_name=userena_settings.USERENA_PROFILE_DETAIL_TEMPLATE, extra_context=None, **kwargs):
 user = get_object_or_404(get_user_model(), username__iexact=username)
 profile = get_user_profile(user=user)
 if (not profile.can_view_profile(request.user)):
  raise PermissionDenied
 if (not extra_context):
  extra_context = dict()
 extra_context['profile'] = profile
 extra_context['hide_email'] = userena_settings.USERENA_HIDE_EMAIL
 return ExtraContextTemplateView.as_view(template_name=template_name, extra_context=extra_context)(request)

def profile_detail ( request , username , template_name = userena_settings . USERENA_PROFILE_DETAIL_TEMPLATE , extra_context = None , ** kwargs ) : user = get_object_or_404 ( get_user_model ( ) , username__iexact = username ) profile = get_user_profile ( user = user ) if ( not profile . can_view_profile ( request . user ) ) : raise PermissionDenied if ( not extra_context ) : extra_context = dict ( ) extra_context [ 'profile' ] = profile extra_context [ 'hide_email' ] = userena_settings . USERENA_HIDE_EMAIL return ExtraContextTemplateView . as_view ( template_name = template_name , extra_context = extra_context ) ( request )
detailed view of an user .