Thursday, October 31, 2019

Re: html home file is not opening while running under django env......

Hi হজমুলা খান,

On 31/10/2019 11.22, হজমুলা খান wrote:
> i am novice and following django for beginners ebook. while i am running
> the program  base.html and about.html are working properly but when i
> click on the home link, it shows:
>
>
> Page not found (404)
>
> Request Method: GET
> Request URL: http://localhost:8000/home
>
> Using the URLconf defined in |pages_project.urls|, Django tried these
> URL patterns, in this order:
>
> 1. admin/
> 2. [name='home']
> 3. about/ [name='about']
>
> The current path, |home|, didn't match any of these.
>
>
> i have installed Jinja2 and if i open base.html without running django
> server, it works well but under django server it's not working. what
> should i do?
>

You need to add 'home' to your urls.py inside your pages_project
directory. Read more here:

https://docs.djangoproject.com/en/2.2/topics/http/urls/

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/713d3027-94bf-8752-e3b3-ac14822e89f1%40stacktrace.dk.

No comments:

Post a Comment