Skip to content

Commit f12ff7d

Browse files
committed
rewrite flask/django
1 parent c6b4cb8 commit f12ff7d

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

docs/scenarios/web.rst

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ Django
4949
------
5050

5151
`Django <http://www.djangoproject.com>`_ is a "batteries included" web
52-
application framework. By providing many utilities and patterns out of the
53-
box, Django aims to make it possible to build complex, database-backed web
54-
applications quickly, while encouraging best practices in code written using
55-
it.
52+
application framework, and is an excellent choice for creating content-oriented
53+
websites. By providing many utilities and patterns out of the box, Django aims
54+
to make it possible to build complex, database-backed web applications quickly,
55+
while encouraging best practices in code written using it.
5656

5757
Django has a large and active community, and many pre-built `re-usable
5858
modules <http://djangopackages.com/>`_ that can be incorporated into a new
@@ -65,32 +65,39 @@ There are annual Django conferences `in the United States
6565
Flask
6666
-----
6767

68-
`Flask <http://flask.pocoo.org/>`_ is a "microframework" for Python. Rather
69-
than aiming to provide everything you could possibly need, Flask implements
70-
the most commonly-used core components of a web application framework, like
71-
URL routing, request and response objects, and templates. As a user of
72-
Flask, it is therefore up to you to choose and integrate other components
73-
you may need, such as database access or form generation and validation. For
74-
many popular modules, `Extensions <http://flask.pocoo.org/extensions/>`_ may
75-
already exist to suit your needs.
68+
`Flask <http://flask.pocoo.org/>`_ is a "microframework" for Python, and is
69+
an excellent choice for building smaller applications, APIs, and web services.
7670

77-
**Support** for flask can best be found in its mailing list. Just shoot an
78-
email to flask@librelist.com and reply to the confirmation email.
71+
Building an app with Flask is a lot like writing standard Python modules,
72+
except some functions have routes attached to them. It's really beautiful.
73+
74+
Rather than aiming to provide everything you could possibly need, Flask
75+
implements the most commonly-used core components of a web application
76+
framework, like URL routing, request and response objects, and templates.
77+
78+
If you use Flask, it is up to you to choose other components for your
79+
application, if any. For example, database access or form generation and
80+
validation are not built-in functions of Flask.
81+
82+
This is great, because many web applications don't need those features.
83+
For those that do, there are many
84+
`Extensions <http://flask.pocoo.org/extensions/>`_ available that may
85+
suit your needs. Or, you can easily use any library you want yourself!
7986

8087

8188
Web.py
8289
------
83-
`Web.py <http://webpy.org/>`_ is a web framework for Python that is as
84-
simple as it is powerful. You won't find wizards or boilerplate websites
85-
in Web.py and will have to build from scratch. Web.py provides no administration
90+
`Web.py <http://webpy.org/>`_ is a web framework for Python that is as
91+
simple as it is powerful. You won't find wizards or boilerplate websites
92+
in Web.py and will have to build from scratch. Web.py provides no administration
8693
utility. Web.py is the brainchild of Aaron Swartz, who developed it while working
8794
on Reddit.com.
8895

8996

9097
Web2py
9198
------
9299
A full stack web framework and platform focused in the ease of use. It focuses on
93-
rapid development, favors convention over configuration approach and follows a
100+
rapid development, favors convention over configuration approach and follows a
94101
model–view–controller (MVC) architectural pattern.
95102

96103

@@ -463,7 +470,7 @@ The basic TAL language is simple enough to grasp from an example:
463470
</table>
464471
</body>
465472
</html>
466-
473+
467474

468475
The `<span tal:replace="expression" />` pattern for text insertion is common
469476
enough that if you do not require strict validity in your unrendered templates,
@@ -484,9 +491,9 @@ you can replace it with a more terse and readable syntax that uses the pattern
484491
</table>
485492
</body>
486493
</html>
487-
488494

489-
But keep in mind that the full `<span tal:replace="expression">Default Text</span>`
495+
496+
But keep in mind that the full `<span tal:replace="expression">Default Text</span>`
490497
syntax also allows for default content in the unrendered template.
491498

492499
Mako

0 commit comments

Comments
 (0)