# Django model errors!

**URL:** https://forum.codewithmosh.com/t/django-model-errors/22608
**Category:** Django
**Created:** [September 19, 2023, 11:09am UTC](https://forum.codewithmosh.com/t/django-model-errors/22608 "2023-09-19T11:09:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Romarick](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@Romarick](https://forum.codewithmosh.com/u/Romarick)
#### Post date: [September 19, 2023, 11:09am UTC](https://forum.codewithmosh.com/t/django-model-errors/22608/1 "2023-09-19T11:09:59Z")

</div>

I have this error when ever i go to the profile page. I created the variable user\_profile = Profile.objects.get(user = request.user) in the settings view function.

# DoesNotExist at /settings/

Profile matching query does not exist.

| Request Method: | GET |
| --- | --- |
| Request URL: | [http://localhost:8000/settings/](http://localhost:8000/settings/) |
| Django Version: | 4.1.7 |
| Exception Type: | DoesNotExist |
| Exception Value: | Profile matching query does not exist. |
| Exception Location: | C:\Users\Roma\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\models\query.py, line 650, in get |
| Raised during: | base.views.settings |
| Python Executable: | C:\Users\Roma\AppData\Local\Programs\Python\Python311\python.exe |
| Python Version: | 3.11.2 |
| Python Path: | [‘E:\my\Desktop\ComTech’, ‘C:\Users\Roma\AppData\Local\Programs\Python\Python311\python311.zip’, ‘C:\Users\Roma\AppData\Local\Programs\Python\Python311\DLLs’, ‘C:\Users\Roma\AppData\Local\Programs\Python\Python311\Lib’, ‘C:\Users\Roma\AppData\Local\Programs\Python\Python311’, ‘C:\Users\Roma\AppData\Local\Programs\Python\Python311\Lib\site-packages’ |
