Skip to content

Commit cfcf6fc

Browse files
committed
API break, bumping version to 1.15.0, renamed TemplatesBase to
LoaderBase to correctly reflect semantics and avoid confusion.
1 parent 7740922 commit cfcf6fc

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

CHANGES.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ Entries are given with the most recent entry first.
33
Each entry has the developer who committed the change in brackets.
44
Entries without name were done by Richard Jones.
55

6-
2013-??-??: 1.4.22
6+
2013-??-??: 1.5.0
77

88
Features:
99

10-
- ...
10+
- API changes. Renamed templating members to correctly reflect
11+
the purpose of classes and avoid confusion (anatoly techtonik)
12+
templating.TemplatesBase -> templating.LoaderBase
1113

1214
Fixed:
1315

roundup/cgi/engine_chameleon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
import os.path
66
from chameleon import PageTemplateLoader
77

8-
from roundup.cgi.templating import StringIO, context, find_template, TemplatesBase
8+
from roundup.cgi.templating import StringIO, context, find_template, LoaderBase
99

10-
class Templates(TemplatesBase):
10+
class Templates(LoaderBase):
1111
def __init__(self, dir):
1212
self.dir = dir
1313
self.loader = PageTemplateLoader(dir)

roundup/cgi/engine_zopetal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
import os
99
import os.path
1010

11-
from roundup.cgi.templating import StringIO, context, translationService, find_template, TemplatesBase
11+
from roundup.cgi.templating import StringIO, context, translationService, find_template, LoaderBase
1212
from roundup.cgi.PageTemplates import PageTemplate, GlobalTranslationService
1313
from roundup.cgi.PageTemplates.Expressions import getEngine
1414
from roundup.cgi.TAL import TALInterpreter
1515

1616
GlobalTranslationService.setGlobalTranslationService(translationService)
1717

18-
class Templates(TemplatesBase):
18+
class Templates(LoaderBase):
1919
templates = {}
2020

2121
def __init__(self, dir):

roundup/cgi/templating.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ def find_template(dir, name, view):
117117
'with template "%s" (neither "%s" nor "%s")'%(name, view,
118118
filename, generic))
119119

120-
class TemplatesBase:
121-
"""Base for engine-specific Templates class."""
120+
class LoaderBase:
121+
"""Base for engine-specific template Loader class."""
122122
def precompileTemplates(self):
123123
""" Go through a directory and precompile all the templates therein
124124
"""
@@ -149,10 +149,12 @@ def __getitem__(self, name):
149149
if extension:
150150
extension = extension[1:]
151151
try:
152+
# [ ] dispell - add get() definition to this base class
152153
return self.get(name, extension)
153154
except NoTemplate, message:
154155
raise KeyError, message
155156

157+
# [ ] rename to get_loader
156158
def get_templates(dir, engine_name):
157159
if engine_name == 'chameleon':
158160
import engine_chameleon as engine

0 commit comments

Comments
 (0)