/loggerhead/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerhead/trunk

« back to all changes in this revision

Viewing changes to loggerhead/controllers/revision_ui.py

  • Committer: Michael Hudson
  • Date: 2008-06-11 05:05:43 UTC
  • mfrom: (128.6.75 zpt-templating)
  • Revision ID: michael.hudson@canonical.com-20080611050543-o8vel8ydossw3wkc
merge zpt-templating.
this gets rid of all the kid templates and replaces them with zope page
templates and adds glue to render them under turbogears with the simpletal
library.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from cherrypy import InternalError
24
24
 
25
25
from loggerhead import util
 
26
from loggerhead.templatefunctions import templatefunctions
26
27
 
27
28
 
28
29
DEFAULT_LINE_COUNT_LIMIT = 3000
37
38
    
38
39
#    @util.lsprof
39
40
    @util.strip_whitespace
40
 
    @turbogears.expose(html='loggerhead.templates.revision')
 
41
    @turbogears.expose(html='zpt:loggerhead.templates.revision')
41
42
    def default(self, *args, **kw):
42
43
        z = time.time()
43
44
        h = self._branch.get_history()
99
100
                'remember': remember,
100
101
                'compare_revid': compare_revid,
101
102
                'side_by_side': side_by_side,
 
103
                'url': self._branch.context_url,
102
104
                'line_count': line_count,
103
105
                'line_count_limit': line_count_limit,
104
106
                'show_plain_diffs': line_count > line_count_limit,
105
107
            }
 
108
            vals.update(templatefunctions)
106
109
            h.flush_cache()
107
110
            self.log.info('/revision: %r seconds' % (time.time() - z,))
108
111
            return vals