Skip to content

Commit 3718576

Browse files
committed
Added uuid import and clarification text
1 parent 4f3be04 commit 3718576

File tree

1 file changed

+4
-0
lines changed
  • docs/docs/05_flask_smorest/02_data_model_improvements

1 file changed

+4
-0
lines changed

docs/docs/05_flask_smorest/02_data_model_improvements/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ def create_store():
245245
<TabItem value="new" label="create_store (new)">
246246

247247
```py title="app.py"
248+
import uuid
249+
248250
@app.post("/store")
249251
def create_store():
250252
store_data = request.get_json()
@@ -255,6 +257,8 @@ def create_store():
255257
return store
256258
```
257259

260+
Here we add a new import, [the `uuid` module](https://docs.python.org/3/library/uuid.html). We will be using it to create unique IDs for our stores and items instead of relying on the uniqueness of their `names`.
261+
258262
</TabItem>
259263
</Tabs>
260264
</div>

0 commit comments

Comments
 (0)