In  *myproject/urls.py *you have defined a path *hello/* for *myapp *and 
then again you define *hello/ *for the hello_delhi_capitals method. 
Now, You have two solution
1. You call *http://127.0.0.1:8000/home/home *
2.  You can remove */home* in *myproject/urls.py *
like this *path(**'', include('myapp.urls'))*

On Saturday, April 15, 2023 at 2:01:53 PM UTC+5:30 Karthik V A wrote:

> Remove admin/ url pattern at urls.py in myapp 
>
> On Sat, 15 Apr, 2023, 1:58 pm lalit upadhyay, <[email protected]> 
> wrote:
>
>>
>> *I have replaced URL ‘home/’ to ‘hello/’ but still i got same error*
>> On Saturday, April 15, 2023 at 7:29:15 AM UTC+5:30 Muhammad Juwaini Abdul 
>> Rahman wrote:
>>
>>> In your urls.py you use '/hello' but in your browser you type '/home'.
>>>
>>> On Sat, 15 Apr 2023 at 06:07, lalit upadhyay <[email protected]> 
>>> wrote:
>>>
>>>> *I have copied my code here. Plz fix this error:*
>>>>
>>>>
>>>> view.py
>>>> from django.http import HttpResponse
>>>>
>>>>
>>>> def hello_delhi_capitals(request):
>>>> return HttpResponse('Hello Delhi Capitals!')
>>>>
>>>>
>>>>
>>>> myproject/urls.py
>>>>
>>>> from django.contrib import admin
>>>> from django.urls import path, include
>>>>
>>>> urlpatterns = [
>>>> path('admin/', admin.site.urls),
>>>> path('hello/', include('myapp.urls')),
>>>> ]
>>>>
>>>>
>>>>
>>>> myapp/urls.py
>>>>
>>>>
>>>>
>>>> from django.urls import path
>>>> from .views import hello_delhi_capitals
>>>>
>>>> urlpatterns = [
>>>> path('hello/', hello_delhi_capitals, name='hello_delhi_capitals'),
>>>> ]
>>>>
>>>> -- 
>>>> 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 [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/b157258f-6697-4bd7-81c7-48e425b4a1edn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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 [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/e42af2a7-abc4-41dd-a7f6-5f7c8af1630an%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/21e4cd13-aa48-471f-8d1f-566550a37ddbn%40googlegroups.com.

Reply via email to