Skip to content

Commit 855a77f

Browse files
committed
adding better flask descriptions
1 parent 804ff0c commit 855a77f

File tree

8 files changed

+49
-24
lines changed

8 files changed

+49
-24
lines changed

content/pages/03-data/06-sqlalchemy.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,9 @@ implementations.
221221
[which is better and why: Django ORM or SQLALchemy](https://www.quora.com/Which-is-better-and-why-Djangos-ORM-or-SQLAlchemy)
222222
based on various developers' experiences.
223223

224+
225+
### Open source code for using SQLAlchemy
226+
Many open source projects rely on SQLAlchemy. A great way to learn
227+
how to properly work with this tool is to read the code that shows
228+
how those projects use SQLAlchemy. This section alphabetically lists
229+
these code examples by class and function in the SQLAlchemy code base.

content/pages/04-web-development/03-flask.markdown

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,8 @@ ways to structure your code.
337337
in the JavaScript world.
338338

339339

340-
### Flask framework learning checklist
341-
1. [Install Flask](http://flask.pocoo.org/docs/installation/) on
342-
your local development machine.
343-
344-
1. Work through the 18-part Flask tutorial listed first under "Flask
345-
resources" above.
346-
347-
1. Read through
348-
[Flask Extensions Registry](http://flask.pocoo.org/extensions/) to find
349-
out what extensions you'll need to build your project.
350-
351-
1. Start coding your Flask app based on what you learned from the 18 part
352-
Flask tutorial plus open source example applications found below.
353-
354-
1. Move on to the [deployment section](/deployment.html) to get your initial
355-
Flask project on the web.
356-
340+
### Open source code for using Flask
341+
There are many open source projects that rely on Flask to operate.
342+
One of the best ways to learn how to use this framework is to read
343+
how other projects use it in real-world code. This section lists
344+
these code examples by class and method in Flask.

content/pages/examples/flask/flask-cli-dispatchingapp.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ sidebartitle: flask.cli DispatchingApp
77
meta: Example code for understanding how to use the DispatchingApp class from the flask.cli module of the Flask project.
88

99

10-
DispatchingApp is a class within the flask.cli module of the Flask project.
10+
[DispatchingApp](https://github.com/pallets/flask/blob/master/src/flask/cli.py)
11+
is a class within the flask.cli module of the [Flask](/flask.html) project.
12+
DispatchingApp is a special application that dispatches to a Flask app
13+
if it is imported by name in a background thread.
1114

1215

1316
## Example 1 from indico

content/pages/examples/flask/flask-cli-flaskgroup.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ meta: Example code for understanding how to use the FlaskGroup class from the fl
88

99

1010
[FlaskGroup](https://github.com/pallets/flask/blob/master/src/flask/cli.py)
11-
is a class within the flask.cli module of the Flask project. FlaskGroup
12-
is a subclass of [AppGroup](/flask-cli-appgroup-examples.html) that provides
13-
for loading more commands from a configured Flask app. Generally, only
14-
advanced use cases will need to use this class.
11+
is a class within the flask.cli module of the [Flask project](/flask.html).
12+
FlaskGroup is a subclass of [AppGroup](/flask-cli-appgroup-examples.html)
13+
that provides for loading more commands from a configured Flask app.
14+
Generally, only advanced use cases will need to use this class.
1515

1616

1717
## Example 1 from FlaskBB

content/pages/examples/flask/flask-cli-pass-script-info.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ sidebartitle: flask.cli pass_script_info
77
meta: Python example code that shows how to use the pass_script_info callable from the flask.cli module of the Flask project.
88

99

10-
pass_script_info is a callable within the flask.cli module of the Flask project.
10+
[pass_script_info](https://github.com/pallets/flask/blob/master/src/flask/cli.py)
11+
is simply a decorator around the [ScriptInfo](/flask-cli-scriptinfo-examples.html)
12+
class within this same flask.cli module.
1113

1214

1315
## Example 1 from indico

theme/templates/code-examples/django.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,26 @@ <h4 class="bp"><a href="/django-db-models-examples.html">django.db.models</a>
8989
<a href="/django-db-models-smallintegerfield-examples.html">SmallIntegerField</a>,
9090
<a href="/django-db-models-textfield-examples.html">TextField</a>
9191
</h4>
92+
<h4 class="bp">django.db.models.query
93+
<a href="/django-db-models-query-baseiterable-examples.html">BaseIterable</a>,
94+
<a href="/django-db-models-query-emptyqueryset-examples.html">EmptyQuerySet</a>,
95+
<a href="/django-db-models-query-modeliterable-examples.html">ModelIterable</a>,
96+
<a href="/django-db-models-query-prefetch-examples.html">Prefetch</a>,
97+
<a href="/django-db-models-query-q-examples.html">Q</a>,
98+
<a href="/django-db-models-query-queryset-examples.html">QuerySet</a>,
99+
<a href="/django-db-models-query-prefetch-related-objects-examples.html">prefetch_related_objects</a>
100+
</h4>
101+
<h4 class="bp">django.db.models.query_utils
102+
<a href="/django-db-models-query-utils-deferredattribute-examples.html">DeferredAttribute</a>,
103+
<a href="/django-db-models-query-utils-pathinfo-examples.html">PathInfo</a>,
104+
<a href="/django-db-models-query-utils-q-examples.html">Q</a>
105+
</h4>
106+
<h4 class="bp">django.db.models.signals
107+
<a href="/django-db-models-signals-post-delete-examples.html">post_delete</a>,
108+
<a href="/django-db-models-signals-post-save-examples.html">post_save</a>,
109+
<a href="/django-db-models-signals-pre-delete-examples.html">pre_delete</a>,
110+
<a href="/django-db-models-signals-pre-save-examples.html">pre_save</a>
111+
</h4>
92112
<h4 class="bp"><a href="/django-dispatch-dispatcher-signal-examples.html">django.dispatch.dispatcher Signal</a></h4>
93113
<h4 class="bp"><a href="/django-forms-examples.html">django.forms</a>
94114
<a href="/django-forms-booleanfield-examples.html">BooleanField</a>,

theme/templates/css/page-article.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

theme/templates/page.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ <h1>{{ page.title }}</h1>
6363
{% include "examples-extensions-descriptions/pandas.html" %}
6464
{% endif %}
6565
{{ page.content }}
66+
{% if page.slug == "flask" %}
67+
{% include "code-examples/flask.html" %}
68+
{% endif %}
69+
{% if page.slug == "sqlalchemy" %}
70+
{% include "code-examples/sqlalchemy.html" %}
71+
{% endif %}
6672
{% endif %}
6773
{% if page.sortorder[0:2] == "50" %}
6874
{% else %}

0 commit comments

Comments
 (0)