(self)
return app_forms
This is the data used for creating the drilldown_map. This returns the following type of structure:
            {
                'app_id': {
                    'app': {
                        'names': [<foo>] or '<foo>',
                        'id': '<foo>',
                        'langs': [<foo>]
                    },
                    'is_user_registration': (True or False),
                    'is_deleted': (True or False),
                    'modules' : [
                        {
                            'module': {
                                'names': [<foo>] or '<foo>',
                                'id': index,
                                'forms': [
                                    {
                                        'form': {
                                            'names': [<foo>] or '<foo>',
                                            'xmlns': <xmlns>
                                        }
                                ]
                            }
                        },
                        {...}
                    ]
                },
                'next_app_id': {...},
            }
This is the data used for creating the drilldown_map. This returns the following type of structure:
            {
                'app_id': {
                    'app': {
                        'names': [<foo>] or '<foo>',
                        'id': '<foo>',
                        'langs': [<foo>]
                    },
                    'is_user_registration': (True or False),
                    'is_deleted': (True or False),
                    'modules' : [
                        {
                            'module': {
                                'names': [<foo>] or '<foo>',
                                'id': index,
                                'forms': [
                                    {
                                        'form': {
                                            'names': [<foo>] or '<foo>',
                                            'xmlns': <xmlns>
                                        }
                                ]
                            }
                        },
                        {...}
                    ]
                },
                'next_app_id': {...},
            }
This is the data used for creating the drilldown_map . This returns the following type of structure : { app_id : { app : { names : [ <foo > ] or <foo > id : <foo > langs : [ <foo > ] } is_user_registration : ( True or False ) is_deleted : ( True or False ) modules : [ { module : { names : [ <foo > ] or <foo > id : index forms : [ { form : { names : [ <foo > ] or <foo > xmlns : <xmlns > } ] } } { ... } ] } next_app_id : { ... } }
def _application_forms_info(self):
        """
            This is the data used for creating the drilldown_map. This returns the following type of structure:
            {
                'app_id': {
                    'app': {
                        'names': [<foo>] or '<foo>',
                        'id': '<foo>',
                        'langs': [<foo>]
                    },
                    'is_user_registration': (True or False),
                    'is_deleted': (True or False),
                    'modules' : [
                        {
                            'module': {
                                'names': [<foo>] or '<foo>',
                                'id': index,
                                'forms': [
                                    {
                                        'form': {
                                            'names': [<foo>] or '<foo>',
                                            'xmlns': <xmlns>
                                        }
                                ]
                            }
                        },
                        {...}
                    ]
                },
                'next_app_id': {...},
            }
        """
        data = get_all_form_details(self.domain)
        default_module = lambda num: {'module': None, 'forms': []}
        app_forms = {}
        for app_structure in data:
            index_offset = 1 if app_structure.is_user_registration else 0
            app_id = app_structure.app.id
            if not app_id in app_forms:
                app_forms[app_id] = {
                    'app': app_structure.app,
                    'is_user_registration': app_structure.is_user_registration,
                    'is_deleted': app_structure.is_deleted,
                    'modules': []
                }

            module_id = app_structure.module.id + index_offset

            new_modules = module_id - len(app_forms[app_id]['modules']) + 1
            if new_modules > 0:
                # takes care of filler modules (modules in the app with no form submissions.
                # these 'filler modules' are eventually ignored when rendering the drilldown map.
                app_forms[app_id]['modules'].extend([default_module(module_id - m) for m in range(0, new_modules)])

            if not app_structure.is_user_registration:
                app_forms[app_id]['modules'][module_id]['module'] = app_structure.module
                app_forms[app_id]['modules'][module_id]['forms'].append({
                    'form': app_structure.form,
                    'xmlns': app_structure.xmlns,
                })
        return app_forms
def _application_forms_info ( self ) : data = get_all_form_details ( self . domain ) default_module = lambda num : { 'module' : None , 'forms' : [ ] } app_forms = { } for app_structure in data : index_offset = 1 if app_structure . is_user_registration else 0 app_id = app_structure . app . id if not app_id in app_forms : app_forms [ app_id ] = { 'app' : app_structure . app , 'is_user_registration' : app_structure . is_user_registration , 'is_deleted' : app_structure . is_deleted , 'modules' : [ ] } module_id = app_structure . module . id + index_offset new_modules = module_id - len ( app_forms [ app_id ] [ 'modules' ] ) + 1 if new_modules > 0 : # takes care of filler modules (modules in the app with no form submissions. # these 'filler modules' are eventually ignored when rendering the drilldown map. app_forms [ app_id ] [ 'modules' ] . extend ( [ default_module ( module_id - m ) for m in range ( 0 , new_modules ) ] ) if not app_structure . is_user_registration : app_forms [ app_id ] [ 'modules' ] [ module_id ] [ 'module' ] = app_structure . module app_forms [ app_id ] [ 'modules' ] [ module_id ] [ 'forms' ] . append ( { 'form' : app_structure . form , 'xmlns' : app_structure . xmlns , } ) return app_forms