<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_user_action(model, request):
 """Delete user from database. """

    try:
        users = model.parent.backend
        uid = model.model.name
        del users[uid]
        users()
        model.parent.invalidate()
        localizer = get_localizer(request)
        message = localizer.translate(_(
            'delete_user_from_database',
            default="Deleted user '${uid}' from database.",
            mapping={'uid': uid}
        ))
        return {
            'success': True,
            'message': message
        }
    except Exception as e:
        return {
            'success': False,
            'message': str(e)
        }