| changeset | 310e19beba3e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: report filename if template file is invalid A file name like .#issue.search.html causes a crash because _find returns None not a tuple and unpacking fails. Trap the TypeError and raise ValueError with message that includes the basename of the file. |
| files |
| changeset | ac0802452818 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: typo in var name inan unused (mostly) chameleon engine. |
| files |
| changeset | b8e63e65d9a8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | chore: replace use of dir with template_dir. variable 'dir' was shadowing a Python builtin. |
| files |
| changeset | 4d20d8251bf2 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 whitespace; removed unused import os.path. |
| files |
| changeset | 55f09ca366c4 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: StringIO. This generally arranges for StringIO and cStringIO references to use io.StringIO for Python 3 but io.BytesIO for Python 2, consistent with the string representations generally used in Roundup. A special FasterStringIO in the TAL code, which referenced internals of the old Python 2 StringIO module, is cut down so it doesn't actually do anything beyond the StringIO class it inherits from (it would also be reasonable to remove FasterStringIO completely). One place in roundup_server.py clearly needing binary I/O is made to use io.BytesIO unconditionally. |
| files |
| changeset | 56c9bcdea47f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: unicode. This patch introduces roundup/anypy/strings.py, which has a comment explaining the string representations generally used and common functions to handle the required conversions. Places in the code that explicitly reference the "unicode" type / built-in function are generally changed to use the new functions (or, in a few places where those new functions don't seem to fit well, other approaches such as references to type(u'') or use of the codecs module). This patch does not generally attempt to address text conversions in any places not currently referencing the "unicode" type (although scripts/import_sf.py is made to use binary I/O in places as fixing the "unicode" reference didn't seem coherent otherwise). |
| files |
| changeset | 0421390b3094 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | templating: Move common TAL methods to TALLoaderBase class |
| files |
| changeset | fe9568a6cbd6 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Untangle template selection logic from template loading functionality. |
| files |
| changeset | 94be76e04140 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | templating: Move template selection logic from the template loaders to the client. |
| files |
| changeset | d82ce9ad8044 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Revert 2b20294b934a (r2b20294b934a) disallowing load("issue.item") syntax for getting templates. This straightens template selection logic a bit. |
| files |
| changeset | 4caa6de726a5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | templating: Rename 'extension' argument in Loader.load() to 'view' to avoid confusion with file extension, and because this is what this argument really does - specifies a different view for a class. |
| files |
| changeset | 5033c2ad80a7 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | templating: Rename LoaderBase.get() to LoaderBase.load() for clarity |
| files |
| changeset | fd72576e07ed |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | API break: rename Templates to Loader for zopetal and chameleon engines. |
| files |
| changeset | 05fe39f1d823 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | API break, bumping version to 1.15.0, renamed TemplatesBase to LoaderBase to correctly reflect semantics and avoid confusion. |
| files |
| changeset | 45ac4cd1a381 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Cheer Xiao <xiaqqaix@gmail.com> |
| description | Fixes for RoundupPageTemplate in engine_chameleon.py. * Follow Chameleon API change * Inherit from object |
| files |
| changeset | a2eb4fb3e6d8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <rsc@runtux.com> |
| description | New Chameleon templating engine, engine is now configurable. We now have two configurable templating engines, the old Zope TAL templates (called zopetal in the config) and the new Chameleon (called chameleon in the config). A new config-option "template_engine" under [main] can take these config-options, the default is zopetal. Thanks to Cheer Xiao for the idea of making this configurable *and* for the actual implementation! Cheer Xiao commit log: - The original TAL engine ported from Zope is thereafter referred to as "zopetal", in speech and in code - A new option "template_engine" under [main] introduced - Zopetal-specific code stripped from cgi/templating.py to form the new cgi/engine_zopetal.py - Interface to Chameleon in cgi/engine_chameleon.py - Engines are supposed to provide a Templates class that mimics the behavior of the old cgi.templating.Templates. The Templates class is preferably subclassed from cgi.templating.TemplatesBase. - New function cgi.templating.get_templates to get the appropriate engine's Templates instance according to the engine name |
| files |