def __init__(self, *args, **kwargs): super(SciriusRouter, self).__init__(self, *args, **kwargs) self.register('scirius/user', UserViewSet) self.registry.extend(rules_router.registry) try: self.registry.extend( get_middleware_module('rest_api').router.registry) except AttributeError: pass
def __init__(self, *args, **kwargs): super(SciriusRouter, self).__init__(self, *args, **kwargs) self.register('scirius/user', UserViewSet) self.registry.extend(rules_router.registry) self.registry.extend(accounts_router.registry) try: self.registry.extend(get_middleware_module('rest_api').router.registry) except AttributeError: pass
def get_urls(self): urls = super(SciriusRouter, self).get_urls() urls += get_custom_urls() try: urls += get_middleware_module('rest_api').get_custom_urls() except AttributeError: pass return urls
def get_urls(self): urls = super(SciriusRouter, self).get_urls() urls += get_custom_urls() urls += suricata_custom_urls() try: urls += get_middleware_module('rest_api').get_custom_urls() except AttributeError: pass return urls
def homepage(request): context = get_middleware_module('common').get_homepage_context() return scirius_render(request, 'rules/home.html', context)