def _get_targets(self, target, include_global=True):
        """
        Internal iterator to split up a complete target into the possible parts
        it may match.

        For example::

            >>> list(aliases._get_targets('my_app.MyModel.somefield'))
            ['', 'my_app', 'my_app.MyModel', 'my_app.MyModel.somefield']
        """
        target = self._coerce_target(target)
        if include_global:
            yield ''
        if not target:
            return
        target_bits = target.split('.')
        for i in range(len(target_bits)):
            yield '.'.join(target_bits[:i + 1])
Internal iterator to split up a complete target into the possible parts
        it may match.

        For example::

            >>> list(aliases._get_targets('my_app.MyModel.somefield'))
            ['', 'my_app', 'my_app.MyModel', 'my_app.MyModel.somefield']