[Answer]-Getting a 404 when trying to access a url python/django

1đź‘Ť

âś…

You don’t have a match for the url “/contato”. In your base urls.py, you point the prefix “/contato” to include contato.urls, and then in that file you have a single URL which is again “/contato”: so the combined URL for that view is “/contato/contato”.

If you just want the URL to match “contato”, you should either get the included url to match just “^$”, or (probably better) don’t bother including the separate urls.py and match the view directly from the base file.

Leave a comment