Skip to content

Commit 2157dde

Browse files
committed
new code examples for django
1 parent 2d8f665 commit 2157dde

21 files changed

+2637
-64
lines changed

content/pages/examples/django/django-template-base-filterexpression.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base FilterExpression Example Code
22
category: page
33
slug: django-template-base-filterexpression-examples
4-
sortorder: 500011364
4+
sortorder: 500011370
55
toc: False
66
sidebartitle: django.template.base FilterExpression
7-
meta: Python example code for the FilterExpression class from the django.template.base module of the Django project.
8-
9-
10-
FilterExpression is a class within the django.template.base module of the Django project.
11-
7+
meta: Example code for understanding how to use the FilterExpression class from the django.template.base module of the Django project.
8+
9+
10+
`FilterExpression` is a class within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-node-examples.html">Node</a>,
14+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
15+
<a href="/django-template-base-parser-examples.html">Parser</a>,
16+
<a href="/django-template-base-template-examples.html">Template</a>,
17+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
18+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-sitetree
1427
[django-sitetree](https://github.com/idlesign/django-sitetree)

content/pages/examples/django/django-template-base-node.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base Node Example Code
22
category: page
33
slug: django-template-base-node-examples
4-
sortorder: 500011365
4+
sortorder: 500011371
55
toc: False
66
sidebartitle: django.template.base Node
7-
meta: Python example code for the Node class from the django.template.base module of the Django project.
8-
9-
10-
Node is a class within the django.template.base module of the Django project.
11-
7+
meta: Example code for understanding how to use the Node class from the django.template.base module of the Django project.
8+
9+
10+
`Node` is a class within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
15+
<a href="/django-template-base-parser-examples.html">Parser</a>,
16+
<a href="/django-template-base-template-examples.html">Template</a>,
17+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
18+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-angular
1427
[django-angular](https://github.com/jrief/django-angular)

content/pages/examples/django/django-template-base-nodelist.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base NodeList Example Code
22
category: page
33
slug: django-template-base-nodelist-examples
4-
sortorder: 500011366
4+
sortorder: 500011372
55
toc: False
66
sidebartitle: django.template.base NodeList
7-
meta: Python example code for the NodeList class from the django.template.base module of the Django project.
8-
9-
10-
NodeList is a class within the django.template.base module of the Django project.
11-
7+
meta: Example code for understanding how to use the NodeList class from the django.template.base module of the Django project.
8+
9+
10+
`NodeList` is a class within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-parser-examples.html">Parser</a>,
16+
<a href="/django-template-base-template-examples.html">Template</a>,
17+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
18+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-angular
1427
[django-angular](https://github.com/jrief/django-angular)

content/pages/examples/django/django-template-base-parser.markdown

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base Parser Example Code
22
category: page
33
slug: django-template-base-parser-examples
4-
sortorder: 500011367
4+
sortorder: 500011373
55
toc: False
66
sidebartitle: django.template.base Parser
7-
meta: Python example code for the Parser class from the django.template.base module of the Django project.
7+
meta: Example code for understanding how to use the Parser class from the django.template.base module of the Django project.
88

99

10-
Parser is a class within the django.template.base module of the Django project.
10+
`Parser` is a class within the `django.template.base` module of the Django project.
1111

12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-template-examples.html">Template</a>,
17+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
18+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-sitetree
1427
[django-sitetree](https://github.com/idlesign/django-sitetree)
@@ -84,7 +97,7 @@ class TreeItemChoiceField(ChoiceField):
8497
context.update({'request': object()})
8598

8699
choices_str = sitetree_tree(
87-
~~ Parser(None), Token(token_type=TOKEN_BLOCK, contents=tree_token)
100+
~~ Parser([]), Token(token_type=TOKEN_BLOCK, contents=tree_token)
88101
).render(context)
89102

90103
tree_choices = [(ITEMS_FIELD_ROOT_ID, self.root_title)]

content/pages/examples/django/django-template-base-template.markdown

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base Template Example Code
22
category: page
33
slug: django-template-base-template-examples
4-
sortorder: 500011368
4+
sortorder: 500011374
55
toc: False
66
sidebartitle: django.template.base Template
7-
meta: Python example code for the Template class from the django.template.base module of the Django project.
7+
meta: Example code for understanding how to use the Template class from the django.template.base module of the Django project.
88

99

10-
Template is a class within the django.template.base module of the Django project.
10+
`Template` is a class within the `django.template.base` module of the Django project.
1111

12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-parser-examples.html">Parser</a>,
17+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
18+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-cms
1427
[django-cms](https://github.com/divio/django-cms)
@@ -27,8 +40,6 @@ from django.contrib.admin.sites import site
2740
from django.template import Context
2841
~~from django.template.base import Template
2942

30-
from six import text_type
31-
3243
from cms.api import add_plugin
3344
from cms.models import StaticPlaceholder, Placeholder, UserSettings
3445
from cms.tests.test_plugins import PluginsTestBaseCase

content/pages/examples/django/django-template-base-templatesyntaxerror.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base TemplateSyntaxError Example Code
22
category: page
33
slug: django-template-base-templatesyntaxerror-examples
4-
sortorder: 500011369
4+
sortorder: 500011375
55
toc: False
66
sidebartitle: django.template.base TemplateSyntaxError
7-
meta: Python example code for the TemplateSyntaxError class from the django.template.base module of the Django project.
8-
9-
10-
TemplateSyntaxError is a class within the django.template.base module of the Django project.
11-
7+
meta: Example code for understanding how to use the TemplateSyntaxError class from the django.template.base module of the Django project.
8+
9+
10+
`TemplateSyntaxError` is a class within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-parser-examples.html">Parser</a>,
17+
<a href="/django-template-base-template-examples.html">Template</a>,
18+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-sitetree
1427
[django-sitetree](https://github.com/idlesign/django-sitetree)

content/pages/examples/django/django-template-base-textnode.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base TextNode Example Code
22
category: page
33
slug: django-template-base-textnode-examples
4-
sortorder: 500011370
4+
sortorder: 500011376
55
toc: False
66
sidebartitle: django.template.base TextNode
7-
meta: Python example code for the TextNode class from the django.template.base module of the Django project.
8-
9-
10-
TextNode is a class within the django.template.base module of the Django project.
11-
7+
meta: Example code for understanding how to use the TextNode class from the django.template.base module of the Django project.
8+
9+
10+
`TextNode` is a class within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-parser-examples.html">Parser</a>,
17+
<a href="/django-template-base-template-examples.html">Template</a>,
18+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
19+
<a href="/django-template-base-token-examples.html">Token</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-angular
1427
[django-angular](https://github.com/jrief/django-angular)

content/pages/examples/django/django-template-base-token-kwargs.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base token_kwargs Example Code
22
category: page
33
slug: django-template-base-token-kwargs-examples
4-
sortorder: 500011375
4+
sortorder: 500011381
55
toc: False
66
sidebartitle: django.template.base token_kwargs
7-
meta: Python example code for the token_kwargs callable from the django.template.base module of the Django project.
8-
9-
10-
token_kwargs is a callable within the django.template.base module of the Django project.
11-
7+
meta: Python example code that shows how to use the token_kwargs callable from the django.template.base module of the Django project.
8+
9+
10+
`token_kwargs` is a callable within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-parser-examples.html">Parser</a>,
17+
<a href="/django-template-base-template-examples.html">Template</a>,
18+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
19+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
20+
<a href="/django-template-base-token-examples.html">Token</a>,
21+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
22+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
23+
and <a href="/django-template-base-variablenode-examples.html">VariableNode</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-floppyforms
1427
[django-floppyforms](https://github.com/jazzband/django-floppyforms)

content/pages/examples/django/django-template-base-token.markdown

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base Token Example Code
22
category: page
33
slug: django-template-base-token-examples
4-
sortorder: 500011371
4+
sortorder: 500011377
55
toc: False
66
sidebartitle: django.template.base Token
7-
meta: Python example code for the Token class from the django.template.base module of the Django project.
7+
meta: Example code for understanding how to use the Token class from the django.template.base module of the Django project.
88

99

10-
Token is a class within the django.template.base module of the Django project.
10+
`Token` is a class within the `django.template.base` module of the Django project.
1111

12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-parser-examples.html">Parser</a>,
17+
<a href="/django-template-base-template-examples.html">Template</a>,
18+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
19+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
20+
<a href="/django-template-base-tokentype-examples.html">TokenType</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-sitetree
1427
[django-sitetree](https://github.com/idlesign/django-sitetree)
@@ -84,7 +97,7 @@ class TreeItemChoiceField(ChoiceField):
8497
context.update({'request': object()})
8598

8699
choices_str = sitetree_tree(
87-
~~ Parser(None), Token(token_type=TOKEN_BLOCK, contents=tree_token)
100+
~~ Parser([]), Token(token_type=TOKEN_BLOCK, contents=tree_token)
88101
).render(context)
89102

90103
tree_choices = [(ITEMS_FIELD_ROOT_ID, self.root_title)]

content/pages/examples/django/django-template-base-tokentype.markdown

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
title: django.template.base TokenType Example Code
22
category: page
33
slug: django-template-base-tokentype-examples
4-
sortorder: 500011372
4+
sortorder: 500011378
55
toc: False
66
sidebartitle: django.template.base TokenType
7-
meta: Python example code for the TokenType class from the django.template.base module of the Django project.
8-
9-
10-
TokenType is a class within the django.template.base module of the Django project.
11-
7+
meta: Example code for understanding how to use the TokenType class from the django.template.base module of the Django project.
8+
9+
10+
`TokenType` is a class within the `django.template.base` module of the Django project.
11+
12+
<a href="/django-template-base-context-examples.html">Context</a>,
13+
<a href="/django-template-base-filterexpression-examples.html">FilterExpression</a>,
14+
<a href="/django-template-base-node-examples.html">Node</a>,
15+
<a href="/django-template-base-nodelist-examples.html">NodeList</a>,
16+
<a href="/django-template-base-parser-examples.html">Parser</a>,
17+
<a href="/django-template-base-template-examples.html">Template</a>,
18+
<a href="/django-template-base-templatesyntaxerror-examples.html">TemplateSyntaxError</a>,
19+
<a href="/django-template-base-textnode-examples.html">TextNode</a>,
20+
<a href="/django-template-base-token-examples.html">Token</a>,
21+
<a href="/django-template-base-variabledoesnotexist-examples.html">VariableDoesNotExist</a>,
22+
<a href="/django-template-base-variablenode-examples.html">VariableNode</a>,
23+
and <a href="/django-template-base-token-kwargs-examples.html">token_kwargs</a>
24+
are several other callables with code examples from the same `django.template.base` package.
1225

1326
## Example 1 from django-sitetree
1427
[django-sitetree](https://github.com/idlesign/django-sitetree)

0 commit comments

Comments
 (0)