---
title: "Comment by islam kamel on \"Django Models Part 2 (Models Relationship)\" | Hashnode"
description: "Let&#39;s implement (1-M) relation on Django (ForeignKey) from django.db import models class Address ( models.Model ): ..... ..... ..... class User ( models.Mod"
url: "https://hashnode.com/posts/django-models-relationship/623b46bbe99839749d24812c/comment/628cf9bebc26026fa45c45b6"
---

[Discussion](https://hashnode.com/posts/django-models-relationship/623b46bbe99839749d24812c)

Comment [Django Models Part 2 (Models Relationship)](https://hashnode.com/posts/django-models-relationship/623b46bbe99839749d24812c)

[islam kamel](https://hashnode.com/@islamkamel)

[May 24, 2022](https://hashnode.com/posts/django-models-relationship/623b46bbe99839749d24812c/comment/628cf9bebc26026fa45c45b6)

> Let's implement (1-M) relation on Django (ForeignKey)

```
from django.db import models

class Address(models.Model):
    .....
    .....
    ..... 

class User(models.Model):
    .....
    .....
    ..... 
    address = models.OneToOneField(Address, on_delete=models.CASCADE)
```

I think you need to change that line `address` To be ForeignKey instead of OneToOne

[Django The Right Way](https://hashnode.com/@pydj)

[May 26, 2022](https://hashnode.com/posts/django-models-relationship/623b46bbe99839749d24812c/comment/628cf9bebc26026fa45c45b6#reply-628f8c799a7f929c55a4283a)

Thank You for the feedback. I have updated the post.
