(user, needed_access)
return tmpl.render(context=context)
Generates the access denied message
Generates the access denied message
Generates the access denied message
def access_denied_message(user, needed_access):
    """
    Generates the access denied message
    """
    tmpl = loader.get_template('widgets/access_denied_message.html')

    # Get the string format of the access.
    needed_access = dict(Access.ACCESS_CHOICES).get(needed_access)

    context = dict(user=user, needed_access=needed_access)
    return tmpl.render(context=context)
def access_denied_message ( user , needed_access ) : tmpl = loader . get_template ( 'widgets/access_denied_message.html' ) # Get the string format of the access. needed_access = dict ( Access . ACCESS_CHOICES ) . get ( needed_access ) context = dict ( user = user , needed_access = needed_access ) return tmpl . render ( context = context )