|
a/Allura/allura/lib/custom_middleware.py |
|
b/Allura/allura/lib/custom_middleware.py |
|
... |
|
... |
33 |
import allura.model.repo
|
33 |
import allura.model.repo
|
34 |
|
34 |
|
35 |
log = logging.getLogger(__name__)
|
35 |
log = logging.getLogger(__name__)
|
36 |
|
36 |
|
37 |
|
37 |
|
38 |
tool_entry_points = list(pkg_resources.iter_entry_points('allura'))
|
38 |
tool_entry_points = list(h.iter_entry_points('allura'))
|
39 |
|
39 |
|
40 |
class StaticFilesMiddleware(object):
|
40 |
class StaticFilesMiddleware(object):
|
41 |
'''Custom static file middleware
|
41 |
'''Custom static file middleware
|
42 |
|
42 |
|
43 |
Map everything in allura/public/nf/* to <script_name>/*
|
43 |
Map everything in allura/public/nf/* to <script_name>/*
|
|
... |
|
... |
167 |
resp = exc.HTTPFound(location='http://' + srv_path)
|
167 |
resp = exc.HTTPFound(location='http://' + srv_path)
|
168 |
|
168 |
|
169 |
if not resp:
|
169 |
if not resp:
|
170 |
resp = self.app
|
170 |
resp = self.app
|
171 |
return resp(environ, start_response)
|
171 |
return resp(environ, start_response)
|
172 |
|
172 |
|
173 |
class AlluraTimerMiddleware(TimerMiddleware):
|
173 |
class AlluraTimerMiddleware(TimerMiddleware):
|
174 |
def timers(self):
|
174 |
def timers(self):
|
175 |
import genshi
|
175 |
import genshi
|
176 |
import jinja2
|
176 |
import jinja2
|
177 |
import markdown
|
177 |
import markdown
|