예제 #1
0
def group_members(request,
                  name,
                  template_name='datagrids/datagrid.html',
                  local_site=None):
    """Display a list of users registered for a particular group."""
    # Make sure the group exists
    group = get_object_or_404(Group, name=name, local_site=local_site)

    if not group.is_accessible_by(request.user):
        return _render_permission_denied(
            request, 'datagrids/group_permission_denied.html')

    datagrid = UsersDataGrid(request, group.users.filter(is_active=True),
                             _("Members of group %s") % name)

    return datagrid.render_to_response(template_name)
예제 #2
0
def group_members(request,
                  name,
                  template_name='datagrids/datagrid.html',
                  local_site=None):
    """Display a list of users registered for a particular group."""
    # Make sure the group exists
    group = get_object_or_404(Group,
                              name=name,
                              local_site=local_site)

    if not group.is_accessible_by(request.user):
        return _render_permission_denied(
            request, 'datagrids/group_permission_denied.html')

    datagrid = UsersDataGrid(request,
                             group.users.filter(is_active=True),
                             _("Members of group %s") % name)

    return datagrid.render_to_response(template_name)
예제 #3
0
def users_list(request,
               local_site=None,
               template_name='datagrids/datagrid.html'):
    """Display a list of all users."""
    grid = UsersDataGrid(request, local_site=local_site)
    return grid.render_to_response(template_name)
예제 #4
0
def users_list(request,
               local_site=None,
               template_name='datagrids/datagrid.html'):
    """Display a list of all users."""
    grid = UsersDataGrid(request, local_site=local_site)
    return grid.render_to_response(template_name)