Mercurial > genshi > genshi-test
annotate UPGRADE.txt @ 592:7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
author | cmlenz |
---|---|
date | Mon, 13 Aug 2007 12:40:56 +0000 |
parents | 0ed55216e8f2 |
children |
rev | line source |
---|---|
233
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
1 Upgrading Genshi |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
2 ================ |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
3 |
592
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
4 Upgrading from Genshi 0.4.x to 0.5.x |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
5 ------------------------------------ |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
6 |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
7 Genshi 0.5 introduces a new, alternative syntax for text templates, which is |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
8 more flexible and powerful compared to the old syntax. For backwards |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
9 compatibility, this new syntax is not used by default, though it will be in |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
10 a future version. It is recommended that you migrate to using this new syntax. |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
11 To do so, simply rename any references in your code to `TextTemplate` to |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
12 `NewTextTemplate`. To explicitly use the old syntax, use `OldTextTemplate` |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
13 instead, so that you can be sure you'll be using the same language when the |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
14 default in Genshi is changed (at least until the old implementation is |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
15 completely removed). |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
16 |
7145e4eba2ec
Add a new syntax for text templates, which is available alongside the old syntax for now. The new syntax is more poweful and flexible, using Django-style directive notation.
cmlenz
parents:
452
diff
changeset
|
17 |
336
5f2c7782cd8a
Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents:
233
diff
changeset
|
18 Upgrading from Genshi 0.3.x to 0.4.x |
5f2c7782cd8a
Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents:
233
diff
changeset
|
19 ------------------------------------ |
5f2c7782cd8a
Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents:
233
diff
changeset
|
20 |
452 | 21 The modules ``genshi.filters`` and ``genshi.template`` have been |
22 refactored into packages containing multiple modules. While code using | |
23 the regular APIs should continue to work without problems, you should | |
24 make sure to remove any leftover traces of the ``template.py`` file on | |
25 the installation path. This is not necessary when Genshi was installed | |
26 as a Python egg. | |
336
5f2c7782cd8a
Refactoring: `genshi.template` is now a package, it was getting way to crowded in that file.
cmlenz
parents:
233
diff
changeset
|
27 |
343
4ff2338e89cd
Remove automatic calling of expression evaluation results if they are callable. See [http://groups.google.com/group/genshi/browse_thread/thread/f515986760918d41 this mailing list thread].
cmlenz
parents:
336
diff
changeset
|
28 Results of evaluating template expressions are no longer implicitly |
4ff2338e89cd
Remove automatic calling of expression evaluation results if they are callable. See [http://groups.google.com/group/genshi/browse_thread/thread/f515986760918d41 this mailing list thread].
cmlenz
parents:
336
diff
changeset
|
29 called if they are callable. If you have been using that feature, you |
4ff2338e89cd
Remove automatic calling of expression evaluation results if they are callable. See [http://groups.google.com/group/genshi/browse_thread/thread/f515986760918d41 this mailing list thread].
cmlenz
parents:
336
diff
changeset
|
30 will need to add the parenthesis to actually call the function. |
4ff2338e89cd
Remove automatic calling of expression evaluation results if they are callable. See [http://groups.google.com/group/genshi/browse_thread/thread/f515986760918d41 this mailing list thread].
cmlenz
parents:
336
diff
changeset
|
31 |
345 | 32 Instances of `genshi.core.Attrs` are now immutable. Filters |
411 | 33 manipulating the attributes in a stream may need to be updated. Also, |
34 the `Attrs` class no longer automatically wraps all attribute names | |
35 in `QName` objects, so users of the `Attrs` class need to do this | |
36 themselves. See the documentation of the `Attrs` class for more | |
37 information. | |
38 | |
345 | 39 |
233
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
40 Upgrading from Markup |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
41 --------------------- |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
42 |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
43 Prior to version 0.3, the name of the Genshi project was "Markup". The |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
44 name change means that you will have to adjust your import statements |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
45 and the namespace URI of XML templates, among other things: |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
46 |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
47 * The package name was changed from "markup" to "genshi". Please |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
48 adjust any import statements referring to the old package name. |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
49 * The namespace URI for directives in Genshi XML templates has changed |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
50 from http://markup.edgewall.org/ to http://genshi.edgewall.org/. |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
51 Please update the xmlns:py declaration in your template files |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
52 accordingly. |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
53 |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
54 Furthermore, due to the inclusion of a text-based template language, |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
55 the class: |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
56 |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
57 `markup.template.Template` |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
58 |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
59 has been renamed to: |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
60 |
414 | 61 `genshi.template.MarkupTemplate` |
233
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
62 |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
63 If you've been using the Template class directly, you'll need to |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
64 update your code (a simple find/replace should do--the API itself |
7a426ab6407a
* Added implementation of a simple text-based template engine. Closes #47.
cmlenz
parents:
diff
changeset
|
65 did not change). |