fromdjango.core.management.baseimportNoArgsCommand,CommandErrorfromorm.modelsimportLayerSourceimportosclassCommand(NoArgsCommand):args=""help="Updates locally cached information from all LayerSources"defhandle_noargs(self,**options):forlsinLayerSource.objects.all():ls.update()