'Returns a list of paths to all installed apps.
Useful for discovering files at conventional locations inside apps
(static files, templates, etc.)'

def get_app_paths(self):

    self._populate()
    app_paths = []
    for app in self.get_apps():
        if hasattr(app, '__path__'):
            app_paths.extend([upath(path) for path in app.__path__])
        else:
            app_paths.append(upath(app.__file__))
    return app_paths
