예제 #1
0
파일: context.py 프로젝트: heynemann/ion
    def list_all_media(self):
        """docstring for list_all_media"""
        app_media = {}

        for app_path in self.app_paths.values():
            media_path = join(app_path, 'media')
            for file_name in locate("*.txt", "*.py", "*.css", "*.js", "*.rst", "*.html", "*.ini", root=media_path):
                if not is_file(file_name):
                    continue
                key = file_name.replace(media_path, '')
                app_media[key] = file_name
        return app_media
예제 #2
0
 def load_news_files(self, news_dir):
     self.news_files = locate("*.md", root=news_dir)
예제 #3
0
 def load_sidebar_files(self, sidebar_dir):
     self.sidebar_files = locate("*.md", root=sidebar_dir)
예제 #4
0
 def load_article_files(self, article_dir):
     self.article_files = locate("*.md", root=article_dir)