noc.lib.app.site

Module Contents

noc.lib.app.site.logger
class noc.lib.app.site.ProxyNode

Bases: object

noc.lib.app.site.HTTP_METHODS
class noc.lib.app.site.URL(url, name=None, method=None)

Bases: object

URL Data wrapper

__repr__(self)
__str__(self)
class noc.lib.app.site.Site

Bases: object

Application site. Registers applications, builds menu and handling views

folder_glyps
JSON_CONTENT_TYPES
rx_namespace
property urls(self)

Returns URLConf

register_named_view(self, mod_ns, app_ns, name, view)

Register named application view

site_access(self, app, view)

Curry application with access

site_view(self, app, view_map)

Decorator for application view

register_app_menu(self, app, view=None)
setup_router(self)

Set up all applications urls :return:

register(self, app_class)

Schedule application class to be installed to the router. Scheduling is necessary to allow the class decorators to add custom views

Parameters

app_class

Returns

do_register(self, app_class)

Actually register class

Parameters

app_class

Returns

add_module_menu(self, m)
autodiscover(self)

Auto-load and initialize all application classes

reverse(self, url, *args, **kwargs)

Reverse URL. Use common django url reversing scheme kwargs QUERY handled as query part

sort_menu(self)

Sort application menu

get_menu_id(self, path)
add_contributor(self, cls, contributor)
iter_predefined_reports(self)
classmethod is_json(cls, content_type: str)

Check if content-type is JSON :param content_type: :return:

noc.lib.app.site.site