Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/r/o/rooibos-HEAD/rooibos/access/middleware.py   rooibos(Download)
from django.core.exceptions import MiddlewareNotUsed
from django.core.management.color import no_style
from django.db.backends.creation import BaseDatabaseCreation
from django.db import connection
from models import AccessControl, ExtendedGroup, IP_BASED_GROUP
        try:
            # Remove IP based group members
            for group in ExtendedGroup.objects.filter(type=IP_BASED_GROUP):
                logging.debug("deleting users from group %s" % group.id)
                group.user_set.clear()
        if cached_ip != current_ip:
            # find IP based user groups and cache them
            for group in ExtendedGroup.objects.filter(type=IP_BASED_GROUP):
                if group._check_subnet(current_ip):
                    group_ids.append(group.id)

src/r/o/rooibos-HEAD/rooibos/access/tests.py   rooibos(Download)
import unittest
from rooibos.data.models import Collection, Record, Field
from rooibos.storage.models import Storage
from models import update_membership_by_attributes, AccessControl, ExtendedGroup, \
    ATTRIBUTE_BASED_GROUP, AUTHENTICATED_GROUP, EVERYBODY_GROUP, IP_BASED_GROUP