From 3fb4b817a484f437b2e13c011c801ddd936a3c84 Mon Sep 17 00:00:00 2001 From: Benbb96 Date: Fri, 31 Jan 2020 17:08:32 +0100 Subject: [PATCH] Update README.md Fix "TypeError: __init__() missing 1 required positional argument: 'on_delete'" --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 30d7e48..8a38130 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Values can be set either by assigning an Address object: Or by supplying a dictionary of address components: ```python - obj.address = {'street_number': '1', route='Somewhere Ave', ...} + obj.address = {'street_number': '1', 'route': 'Somewhere Ave', ...} ``` The structure of the address components is as follows: @@ -145,7 +145,7 @@ The model: from address.models import AddressField class Person(models.Model): - address = AddressField() + address = AddressField(on_delete=models.CASCADE) ``` The form: