Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: third_party/pystache/src/template_spec.py

Issue 2962783004: Adding pystache to third_party (Closed)
Patch Set: Merge branch 'master' into mustache Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/pystache/src/specloader.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # coding: utf-8
2
3 """
4 Provides a class to customize template information on a per-view basis.
5
6 To customize template properties for a particular view, create that view
7 from a class that subclasses TemplateSpec. The "spec" in TemplateSpec
8 stands for "special" or "specified" template information.
9
10 """
11
12 class TemplateSpec(object):
13
14 """
15 A mixin or interface for specifying custom template information.
16
17 The "spec" in TemplateSpec can be taken to mean that the template
18 information is either "specified" or "special."
19
20 A view should subclass this class only if customized template loading
21 is needed. The following attributes allow one to customize/override
22 template information on a per view basis. A None value means to use
23 default behavior for that value and perform no customization. All
24 attributes are initialized to None.
25
26 Attributes:
27
28 template: the template as a string.
29
30 template_encoding: the encoding used by the template.
31
32 template_extension: the template file extension. Defaults to "mustache".
33 Pass False for no extension (i.e. extensionless template files).
34
35 template_name: the name of the template.
36
37 template_path: absolute path to the template.
38
39 template_rel_directory: the directory containing the template file,
40 relative to the directory containing the module defining the class.
41
42 template_rel_path: the path to the template file, relative to the
43 directory containing the module defining the class.
44
45 """
46
47 template = None
48 template_encoding = None
49 template_extension = None
50 template_name = None
51 template_path = None
52 template_rel_directory = None
53 template_rel_path = None
OLDNEW
« no previous file with comments | « third_party/pystache/src/specloader.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698