Skip to content

Commit c65cdbd

Browse files
committed
Update changelog and fastapi example
1 parent 33bb44f commit c65cdbd

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
.. _changelog:
2-
:no-search:
32

43
=========
54
Changelog
65
=========
76

8-
.. rst-class:: emphasize-children
97

10-
1.0
8+
1.1
119
===
1210

1311
1.1.0
@@ -28,6 +26,10 @@ Fixed
2826
- Fix ``UnicodeEncodeError`` by using UTF-8 encoding for migration files. (#2096, #2097)
2927

3028

29+
30+
1.0
31+
===
32+
3133
1.0.0
3234
-----
3335

@@ -904,7 +906,6 @@ Removals:
904906

905907
If you still need Python 3.6 support, you can install ``tortoise-orm<0.16`` as we will still backport critical bugfixes to the 0.15 branch for a while.
906908

907-
.. rst-class:: emphasize-children
908909

909910
0.15
910911
====
@@ -1095,7 +1096,6 @@ Deprecations:
10951096
There is a known context confusion, specifically regarding nested transactions.
10961097

10971098

1098-
.. rst-class:: emphasize-children
10991099

11001100
0.14
11011101
====
@@ -1151,7 +1151,6 @@ Breaking Changes:
11511151
the new hash algorithm is much better in this regard.
11521152
- Dropped support for Python 3.5
11531153

1154-
.. rst-class:: emphasize-children
11551154

11561155
0.13
11571156
====
@@ -1284,7 +1283,6 @@ Docs/examples:
12841283
- Lots of small documentation cleanups
12851284

12861285

1287-
.. rst-class:: emphasize-children
12881286

12891287
0.12
12901288
====
@@ -1378,7 +1376,6 @@ Docs/examples:
13781376
guid = fields.UUIDField(pk=True)
13791377
13801378
1381-
.. rst-class:: emphasize-children
13821379
13831380
0.11
13841381
====
@@ -1488,7 +1485,6 @@ Docs/examples:
14881485
- Numerous bug fixes
14891486
- Removed known broken connection pooling
14901487

1491-
.. rst-class:: emphasize-children
14921488

14931489
0.10
14941490
====
@@ -1593,7 +1589,6 @@ Docs/examples:
15931589
- Added support for MySQL/MariaDB
15941590

15951591

1596-
.. rst-class:: emphasize-children
15971592

15981593
0.9 & older
15991594
===========

examples/fastapi/README.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,30 @@ Tortoise-ORM FastAPI example
33

44
We have a lightweight integration util ``tortoise.contrib.fastapi`` which has a class ``RegisterTortoise`` that can be used to set/clean up Tortoise-ORM in lifespan context.
55

6-
Usage
6+
Setup
77
-----
88

9+
Initialize the migrations directory (one-time, already done in this example):
10+
11+
.. code-block:: sh
12+
13+
python -m tortoise -c config.TORTOISE_ORM init
14+
15+
Create migrations when models change:
16+
17+
.. code-block:: sh
18+
19+
python -m tortoise -c config.TORTOISE_ORM makemigrations
20+
21+
Apply migrations to the database:
22+
23+
.. code-block:: sh
24+
25+
python -m tortoise -c config.TORTOISE_ORM migrate
26+
27+
Run
28+
---
29+
930
.. code-block:: sh
1031
1132
uvicorn main:app --reload

examples/fastapi/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
register_orm = partial(
2020
RegisterTortoise,
2121
config=TORTOISE_ORM,
22-
generate_schemas=True,
2322
)

0 commit comments

Comments
 (0)