def import_geolevels(self, force):
        """
        Create geolevel models out of the configuration.

        @param force: Should the GeoLevels settings be written if the model already exist?
        @returns: A flag indicating if the import was successful.
        """

        # Note that geolevels may be added in any order, but the geounits
        # themselves need to be imported top-down (smallest area to biggest)
        geolevels = self.store.filter_geolevels()
        for geolevel in geolevels:
            attributes = {
                'name': geolevel.get('id').lower()[:50],
                'min_zoom': geolevel.get('min_zoom'),
                'sort_key': geolevel.get('sort_key'),
                'tolerance': geolevel.get('tolerance')
            }
            
            glvl, created, changed, message = check_and_update(Geolevel, overwrite=force, **attributes)
    
            for locale in [l[0] for l in settings.LANGUAGES]:
                po = self.poutils[locale]
                po.add_or_update(
                    msgid=u'%s short label' % attributes['name'],
                    msgstr=geolevel.get('name') or '',
                    occurs=[(os.path.abspath(self.store.datafile), geolevel.sourceline,)]
                )
                po.add_or_update(
                    msgid=u'%s label' % attributes['name'],
                    msgstr=geolevel.get('label') or '',
                    occurs=[(os.path.abspath(self.store.datafile), geolevel.sourceline,)]
                )
                po.add_or_update(
                    msgid=u'%s long description' % attributes['name'],
                    msgstr='',
                    occurs=[(os.path.abspath(self.store.datafile), geolevel.sourceline,)]
                )

            if changed and not force:
                logger.info(message)
            else:
                logger.debug(message)

        return True
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/config.py/ConfigImporter.import_geolevels/original