Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 646 Bytes
import os
import string
from flask_frozen import Freezer
from examples import app
freezer = Freezer(app)
def example_url_generator():
out = []
for dirname, dirnames, filenames in os.walk(os.path.join('examples', 'templates')):
if dirnames == []:
parts = string.split(dirname, os.sep)
for f in filenames:
out.append(('example', {'chapter': parts[2], 'name': parts[3], 'file': f}))
except IndexError:
# Ignore
return out
if __name__ == '__main__':
Something went wrong with that request. Please try again.