Skip to content

Commit 0f22c27

Browse files
committed
working on stubbing out more template engine implementation pages
1 parent 053c9ce commit 0f22c27

File tree

10 files changed

+138
-8
lines changed

10 files changed

+138
-8
lines changed

all.html

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,7 +3027,7 @@ <h1>Django</h1>
30273027
<p>For example,
30283028
<a href="https://docs.djangoproject.com/en/dev/topics/auth/">authentication</a>,
30293029
<a href="https://docs.djangoproject.com/en/dev/topics/http/urls/">URL routing</a>, a
3030-
<a href="https://docs.djangoproject.com/en/dev/topics/templates/">templating system</a>,
3030+
<a href="/django-templates.html">template engine</a>,
30313031
an <a href="/object-relational-mappers-orms.html">object-relational mapper</a> (ORM),
30323032
and <a href="https://docs.djangoproject.com/en/dev/topics/migrations/">database schema migrations</a>
30333033
(as of version 1.7) are all included with the <a href="https://pypi.python.org/pypi/Django/">Django framework</a>.
@@ -3063,7 +3063,7 @@ <h2>Django books and tutorials</h2>
30633063
Django was released over 10 years ago and has had a huge number of updates
30643064
since then, when you're looking for an up-to-date Django book check out the
30653065
list below or read this post showing <a href="http://twoscoopspress.org/pages/current-django-books">current Django books</a>
3066-
as of Django 1.8, 1.9.</p>
3066+
as of Django 1.9.</p>
30673067
<ul>
30683068
<li>
30693069
<p><a href="http://www.obeythetestinggoat.com/">Test-Driven Development with Python</a>
@@ -3343,6 +3343,10 @@ <h2>Open source Django example projects</h2>
33433343
</li>
33443344
</ul>
33453345
<h2>Django project templates</h2>
3346+
<p>Project templates, not to be confused with a
3347+
<a href="/template-engines.html">template engine</a>, generate boilerplate code for
3348+
a base Django project plus optional libraries that are often used when
3349+
developing web applications.</p>
33463350
<ul>
33473351
<li>
33483352
<p><a href="https://github.com/caktus/django-project-template">Caktus Group's Django project template</a>
@@ -4193,8 +4197,46 @@ <h3>Jinja2 resources</h3>
41934197
<h1>Mako</h1>
41944198
<p>Mako is a <a href="/template-engines.html">template engine built in Python</a> that is
41954199
used to generate output HTML, XML and similar formats.</p>
4200+
<p><a href="http://www.makotemplates.org/" style="border: none;"><img src="/source/static/img/logos/mako.jpg" width="100%" alt="Mako template engine logo." style="border-radius: 5px;" width="100%" class="technical-diagram"></a></p>
41964201
<div class="well see-also">Mako is an implementation of the <a href="/template-engines.html">template engines</a> concept. Learn more in the <a href="/web-development.html">web development</a> chapter or view the <a href="/table-of-contents.html">table of contents</a> for all topics.</div>
4202+
4203+
<h2>Mako resources</h2>
4204+
<ul>
4205+
<li>
4206+
<p><a href="https://beachcoder.wordpress.com/2007/05/11/exploring-mako/">Exploring Mako</a>
4207+
explains a bit about the template engines Myghty and Mason, which influenced
4208+
Mako's design. The post then shows a few basic examples for how to use Mako.</p>
4209+
</li>
4210+
<li>
4211+
<p><a href="https://codingnetworker.com/2016/01/configuration-templates-python-mako/">Configuration Templates with Python and Mako</a>
4212+
shows some basic situations for how to use Mako in an example project.</p>
4213+
</li>
4214+
<li>
4215+
<p>The
4216+
<a href="http://pylonsbook.com/en/1.1/using-view-templates.html">Pylons' project documentation on templates</a>
4217+
provides many examples for using Mako, which is the default template
4218+
language for the Pylons <a href="web-frameworks.html">web framework</a>.</p>
4219+
</li>
4220+
<li>
4221+
<p><a href="https://pythonhosted.org/Flask-Mako/">Flask-Mako</a> is a <a href="/flask.html">Flask</a>
4222+
extension that makes it easier to use Mako as the template engine in your
4223+
Flask web app projects.</p>
4224+
</li>
4225+
</ul>
41974226
<h1>Django Templates</h1>
4227+
<p>The <a href="/django.html">Django web framework</a> contains its own
4228+
<a href="/template-engines.html">template engine</a> for generating HTML, XML and other
4229+
output formats.</p>
4230+
<p><a href="https://docs.djangoproject.com/en/dev/topics/templates/" style="border: none;"><img src="/source/static/img/logos/django.png" width="100%" alt="Django web framework logo. Trademark Django Software Foundation." style="border-radius: 5px;" width="100%" class="technical-diagram"></a></p>
4231+
<h2>What's the difference between a "project template" and Django templates?</h2>
4232+
<p>A project template contains the files and code to start a new web application.
4233+
For example, when you run <code>django-admin.py startproject abc</code>, the Django
4234+
admin script creates a new <code>abc</code> directory along with several Python
4235+
configuration so the web app can be run by a <a href="/wsgi-servers.html">WSGI server</a>.</p>
4236+
<p>Django templates are different from a project template because they live
4237+
within a project and are written by the developer to generate output, most
4238+
commonly HTML.</p>
4239+
<div class="well see-also">Django templates are an implementation of the <a href="/template-engines.html">template engines</a> concept. Learn more in the <a href="/web-development.html">web development</a> chapter or view the <a href="/table-of-contents.html">table of contents</a> for all topics.</div>
41984240
<h1>Web Design</h1>
41994241
<p>Web design is the creation of a web application's style and user interaction
42004242
using CSS and JavaScript.</p>

django-templates.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<meta name="author" content="Matt Makai">
9-
<meta name="description" content="Django has its own template engine similar to Jinja but with minor differences and is referred to as Django templates.">
9+
<meta name="description" content="Django has its own template engine referred to as Django templates and is similar to Jinja with some minor differences.">
1010
<title>Django Templates - Full Stack Python</title>
1111
<link href="/f.css" rel="stylesheet">
1212
<link rel="shortcut icon" href="/img/fsp-fav.png">
@@ -37,6 +37,19 @@
3737
</div><div class="row">
3838
<div class="col-md-8">
3939
<h1>Django Templates</h1>
40+
<p>The <a href="/django.html">Django web framework</a> contains its own
41+
<a href="/template-engines.html">template engine</a> for generating HTML, XML and other
42+
output formats.</p>
43+
<p><a href="https://docs.djangoproject.com/en/dev/topics/templates/" style="border: none;"><img src="/source/static/img/logos/django.png" width="100%" alt="Django web framework logo. Trademark Django Software Foundation." style="border-radius: 5px;" width="100%" class="technical-diagram"></a></p>
44+
<h2>What's the difference between a "project template" and Django templates?</h2>
45+
<p>A project template contains the files and code to start a new web application.
46+
For example, when you run <code>django-admin.py startproject abc</code>, the Django
47+
admin script creates a new <code>abc</code> directory along with several Python
48+
configuration so the web app can be run by a <a href="/wsgi-servers.html">WSGI server</a>.</p>
49+
<p>Django templates are different from a project template because they live
50+
within a project and are written by the developer to generate output, most
51+
commonly HTML.</p>
52+
<div class="well see-also">Django templates are an implementation of the <a href="/template-engines.html">template engines</a> concept. Learn more in the <a href="/web-development.html">web development</a> chapter or view the <a href="/table-of-contents.html">table of contents</a> for all topics.</div>
4053
<h3>Learn more about template engines or another topic?</h3>
4154
<div class="row">
4255
<div class="col-md-4">

django.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ <h1>Django</h1>
4646
<p>For example,
4747
<a href="https://docs.djangoproject.com/en/dev/topics/auth/">authentication</a>,
4848
<a href="https://docs.djangoproject.com/en/dev/topics/http/urls/">URL routing</a>, a
49-
<a href="https://docs.djangoproject.com/en/dev/topics/templates/">templating system</a>,
49+
<a href="/django-templates.html">template engine</a>,
5050
an <a href="/object-relational-mappers-orms.html">object-relational mapper</a> (ORM),
5151
and <a href="https://docs.djangoproject.com/en/dev/topics/migrations/">database schema migrations</a>
5252
(as of version 1.7) are all included with the <a href="https://pypi.python.org/pypi/Django/">Django framework</a>.
@@ -82,7 +82,7 @@ <h2>Django books and tutorials</h2>
8282
Django was released over 10 years ago and has had a huge number of updates
8383
since then, when you're looking for an up-to-date Django book check out the
8484
list below or read this post showing <a href="http://twoscoopspress.org/pages/current-django-books">current Django books</a>
85-
as of Django 1.8, 1.9.</p>
85+
as of Django 1.9.</p>
8686
<ul>
8787
<li>
8888
<p><a href="http://www.obeythetestinggoat.com/">Test-Driven Development with Python</a>
@@ -362,6 +362,10 @@ <h2>Open source Django example projects</h2>
362362
</li>
363363
</ul>
364364
<h2>Django project templates</h2>
365+
<p>Project templates, not to be confused with a
366+
<a href="/template-engines.html">template engine</a>, generate boilerplate code for
367+
a base Django project plus optional libraries that are often used when
368+
developing web applications.</p>
365369
<ul>
366370
<li>
367371
<p><a href="https://github.com/caktus/django-project-template">Caktus Group's Django project template</a>

mako.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,32 @@
3939
<h1>Mako</h1>
4040
<p>Mako is a <a href="/template-engines.html">template engine built in Python</a> that is
4141
used to generate output HTML, XML and similar formats.</p>
42+
<p><a href="http://www.makotemplates.org/" style="border: none;"><img src="/source/static/img/logos/mako.jpg" width="100%" alt="Mako template engine logo." style="border-radius: 5px;" width="100%" class="technical-diagram"></a></p>
4243
<div class="well see-also">Mako is an implementation of the <a href="/template-engines.html">template engines</a> concept. Learn more in the <a href="/web-development.html">web development</a> chapter or view the <a href="/table-of-contents.html">table of contents</a> for all topics.</div>
44+
45+
<h2>Mako resources</h2>
46+
<ul>
47+
<li>
48+
<p><a href="https://beachcoder.wordpress.com/2007/05/11/exploring-mako/">Exploring Mako</a>
49+
explains a bit about the template engines Myghty and Mason, which influenced
50+
Mako's design. The post then shows a few basic examples for how to use Mako.</p>
51+
</li>
52+
<li>
53+
<p><a href="https://codingnetworker.com/2016/01/configuration-templates-python-mako/">Configuration Templates with Python and Mako</a>
54+
shows some basic situations for how to use Mako in an example project.</p>
55+
</li>
56+
<li>
57+
<p>The
58+
<a href="http://pylonsbook.com/en/1.1/using-view-templates.html">Pylons' project documentation on templates</a>
59+
provides many examples for using Mako, which is the default template
60+
language for the Pylons <a href="web-frameworks.html">web framework</a>.</p>
61+
</li>
62+
<li>
63+
<p><a href="https://pythonhosted.org/Flask-Mako/">Flask-Mako</a> is a <a href="/flask.html">Flask</a>
64+
extension that makes it easier to use Mako as the template engine in your
65+
Flask web app projects.</p>
66+
</li>
67+
</ul>
4368
<h3>Learn more about template engines or another topic?</h3>
4469
<div class="row">
4570
<div class="col-md-4">

source/content/pages/07-web-development/03-django.markdown

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ libraries.
2121
For example,
2222
[authentication](https://docs.djangoproject.com/en/dev/topics/auth/),
2323
[URL routing](https://docs.djangoproject.com/en/dev/topics/http/urls/), a
24-
[templating system](https://docs.djangoproject.com/en/dev/topics/templates/),
24+
[template engine](/django-templates.html),
2525
an [object-relational mapper](/object-relational-mappers-orms.html) (ORM),
2626
and [database schema migrations](https://docs.djangoproject.com/en/dev/topics/migrations/)
2727
(as of version 1.7) are all included with the [Django framework](https://pypi.python.org/pypi/Django/).
@@ -64,7 +64,7 @@ There are a slew of free or low cost resources out there for Django. Since
6464
Django was released over 10 years ago and has had a huge number of updates
6565
since then, when you're looking for an up-to-date Django book check out the
6666
list below or read this post showing [current Django books](http://twoscoopspress.org/pages/current-django-books)
67-
as of Django 1.8, 1.9.
67+
as of Django 1.9.
6868

6969
* [Test-Driven Development with Python](http://www.obeythetestinggoat.com/)
7070
focuses on web development using Django and JavaScript. This book uses
@@ -300,6 +300,11 @@ to handle these files properly.
300300

301301

302302
## Django project templates
303+
Project templates, not to be confused with a
304+
[template engine](/template-engines.html), generate boilerplate code for
305+
a base Django project plus optional libraries that are often used when
306+
developing web applications.
307+
303308
* [Caktus Group's Django project template](https://github.com/caktus/django-project-template)
304309
is Django 1.6+ ready.
305310

source/content/pages/07-web-development/11-mako.markdown

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ meta: Mako is a Python template engine used to generate HTML, XML or other outpu
1111
Mako is a [template engine built in Python](/template-engines.html) that is
1212
used to generate output HTML, XML and similar formats.
1313

14+
<a href="http://www.makotemplates.org/" style="border: none;"><img src="/source/static/img/logos/mako.jpg" width="100%" alt="Mako template engine logo." style="border-radius: 5px;" width="100%" class="technical-diagram"></a>
15+
1416
<div class="well see-also">Mako is an implementation of the <a href="/template-engines.html">template engines</a> concept. Learn more in the <a href="/web-development.html">web development</a> chapter or view the <a href="/table-of-contents.html">table of contents</a> for all topics.</div>
1517

1618

19+
## Mako resources
20+
* [Exploring Mako](https://beachcoder.wordpress.com/2007/05/11/exploring-mako/)
21+
explains a bit about the template engines Myghty and Mason, which influenced
22+
Mako's design. The post then shows a few basic examples for how to use Mako.
23+
24+
* [Configuration Templates with Python and Mako](https://codingnetworker.com/2016/01/configuration-templates-python-mako/)
25+
shows some basic situations for how to use Mako in an example project.
26+
27+
* The
28+
[Pylons' project documentation on templates](http://pylonsbook.com/en/1.1/using-view-templates.html)
29+
provides many examples for using Mako, which is the default template
30+
language for the Pylons [web framework](web-frameworks.html).
31+
32+
* [Flask-Mako](https://pythonhosted.org/Flask-Mako/) is a [Flask](/flask.html)
33+
extension that makes it easier to use Mako as the template engine in your
34+
Flask web app projects.
35+
36+

source/content/pages/07-web-development/12-django-templates.markdown

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,28 @@ slug: django-templates
44
sortorder: 0712
55
toc: False
66
sidebartitle: Django Templates
7-
meta: Django has its own template engine similar to Jinja but with minor differences and is referred to as Django templates.
7+
meta: Django has its own template engine referred to as Django templates and is similar to Jinja with some minor differences.
88

99

1010
# Django Templates
11+
The [Django web framework](/django.html) contains its own
12+
[template engine](/template-engines.html) for generating HTML, XML and other
13+
output formats.
14+
15+
<a href="https://docs.djangoproject.com/en/dev/topics/templates/" style="border: none;"><img src="/source/static/img/logos/django.png" width="100%" alt="Django web framework logo. Trademark Django Software Foundation." style="border-radius: 5px;" width="100%" class="technical-diagram"></a>
16+
17+
18+
## What's the difference between a "project template" and Django templates?
19+
A project template contains the files and code to start a new web application.
20+
For example, when you run `django-admin.py startproject abc`, the Django
21+
admin script creates a new `abc` directory along with several Python
22+
configuration so the web app can be run by a [WSGI server](/wsgi-servers.html).
23+
24+
Django templates are different from a project template because they live
25+
within a project and are written by the developer to generate output, most
26+
commonly HTML.
27+
28+
<div class="well see-also">Django templates are an implementation of the <a href="/template-engines.html">template engines</a> concept. Learn more in the <a href="/web-development.html">web development</a> chapter or view the <a href="/table-of-contents.html">table of contents</a> for all topics.</div>
29+
30+
31+

source/static/img/logos/django.png

16.3 KB
Loading

source/static/img/logos/mako.jpg

16 KB
Loading

source/static/img/logos/mako.png

11.4 KB
Loading

0 commit comments

Comments
 (0)