<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (
	unicode_literals,
	print_function,
	absolute_import,
	division
)

from pyramid.i18n import (
	TranslationStringFactory,
	get_localizer
)
from netprofile.common.hooks import register_hook

_ = TranslationStringFactory('netprofile_geo')

@register_hook('core.dpanetabs.geo.City')
def _dpane_city_districts(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'          : loc.translate(_('Districts')),
		'xtype'          : 'grid_geo_District',
		'stateId'        : None,
		'stateful'       : False,
		'hideColumns'    : ('city',),
		'extraParamProp' : 'cityid'
	})

@register_hook('core.dpanetabs.geo.District')
def _dpane_district_streets(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'          : loc.translate(_('Streets')),
		'xtype'          : 'grid_geo_Street',
		'stateId'        : None,
		'stateful'       : False,
		'hideColumns'    : ('district',),
		'extraParamProp' : 'districtid'
	})

@register_hook('core.dpanetabs.geo.Street')
def _dpane_street_houses(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'          : loc.translate(_('Houses')),
		'xtype'          : 'grid_geo_House',
		'stateId'        : None,
		'stateful'       : False,
		'hideColumns'    : ('street',),
		'extraParamProp' : 'streetid'
	})

@register_hook('core.dpanetabs.geo.House')
def _dpane_house_places(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'          : loc.translate(_('Places')),
		'xtype'          : 'grid_geo_Place',
		'stateId'        : None,
		'stateful'       : False,
		'hideColumns'    : ('house',),
		'extraParamProp' : 'houseid'
	})
<commit_msg> * Added createControllers to dpane grids in geo module.<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import (
	unicode_literals,
	print_function,
	absolute_import,
	division
)

from pyramid.i18n import (
	TranslationStringFactory,
	get_localizer
)
from netprofile.common.hooks import register_hook

_ = TranslationStringFactory('netprofile_geo')

@register_hook('core.dpanetabs.geo.City')
def _dpane_city_districts(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'             : loc.translate(_('Districts')),
		'xtype'             : 'grid_geo_District',
		'stateId'           : None,
		'stateful'          : False,
		'hideColumns'       : ('city',),
		'extraParamProp'    : 'cityid',
		'createControllers' : 'NetProfile.core.controller.RelatedWizard'
	})

@register_hook('core.dpanetabs.geo.District')
def _dpane_district_streets(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'             : loc.translate(_('Streets')),
		'xtype'             : 'grid_geo_Street',
		'stateId'           : None,
		'stateful'          : False,
		'hideColumns'       : ('district',),
		'extraParamProp'    : 'districtid',
		'createControllers' : 'NetProfile.core.controller.RelatedWizard'
	})

@register_hook('core.dpanetabs.geo.Street')
def _dpane_street_houses(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'             : loc.translate(_('Houses')),
		'xtype'             : 'grid_geo_House',
		'stateId'           : None,
		'stateful'          : False,
		'hideColumns'       : ('street',),
		'extraParamProp'    : 'streetid',
		'createControllers' : 'NetProfile.core.controller.RelatedWizard'
	})

@register_hook('core.dpanetabs.geo.House')
def _dpane_house_places(tabs, model, req):
	loc = get_localizer(req)
	tabs.append({
		'title'             : loc.translate(_('Places')),
		'xtype'             : 'grid_geo_Place',
		'stateId'           : None,
		'stateful'          : False,
		'hideColumns'       : ('house',),
		'extraParamProp'    : 'houseid',
		'createControllers' : 'NetProfile.core.controller.RelatedWizard'
	})

{'fraction_non_alphanumeric': 0.15299973801414724, 'fraction_numerical': 0.0015719151165837044, 'mean_word_length': 3.3435722411831628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '235305', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1370, 'n_words': 218}