Hi, I did replace it with: path('',welcome)
But it's still no working:

Page not found (404)
Request Method: GET
Request URL: http://127.0.0.1:8000/welcome

Using the URLconf defined in meeting_planner.urls, Django tried these URL
patterns, in this order:

   1. admin/
   2.

The current path, welcome, didn't match any of these.

You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard 404
page.

On Mon, May 4, 2020 at 2:21 PM Franz Ulenaers <ulef...@gmail.com> wrote:

> pleae change your urls.py as follow
>
> urlpatterns = [
>     path('admin/', admin.site.urls),
>     path('', welcome)
> ]
>
>
>
> Op maandag 4 mei 2020 20:09:51 UTC+2 schreef Deepti sharma:
>>
>> Hi, I have just started learning django and was trying to make a meeting
>> planner project y folllowing a course.
>> I updated the setting.py file to add website into Instaled_Apps. Then
>> have written a function named welcome in views.py
>> Finally I added it's entry into urls.py fie
>> But when I run the server, I am getting following error on webpage:
>>
>> Page not found (404)
>> Request Method: GET
>> Request URL: http://127.0.0.1:8000/
>>
>> Using the URLconf defined in meeting_planner.urls, Django tried these
>> URL patterns, in this order:
>>
>>    1. admin/
>>    2. welcome.html/
>>
>> The empty path didn't match any of these.
>>
>> You're seeing this error because you have DEBUG = True in your Django
>> settings file. Change that to False, and Django will display a standard
>> 404 page.
>>
>>
>> Can someone please help me with this? I am stuck.
>>
>>
>>
>> This is my code:  (meeting_planner/website/views.py):
>>
>> from django.shortcuts import render
>> from django.http import HttpRequest
>> # Create your views here.
>>
>> def welcome(request):
>>     return HttpRequest("Welcome to the Meeting Planner Website!")
>>
>>
>> (meeting_planner/meeting_planer/urls.py):
>>
>> from django.contrib import admin
>> from django.urls import path
>> from website import views
>> from django.conf.urls import url,include
>>
>> from website.views import welcome
>>
>> urlpatterns = [
>>     path('admin/', admin.site.urls),
>>     path('welcome.html', welcome)
>> ]
>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d02b62d5-caa4-4f5e-a128-e46bd6fa1e08%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d02b62d5-caa4-4f5e-a128-e46bd6fa1e08%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Regards
Deepti Sharma
Blog: https://deepti96.wordpress.com/
Github: https://github.com/dsdeeptisharma
Gitlab: https://gitlab.com/u/dsdeepti
"Great works are not performed by strength but by perseverance"

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJOjMFcgeruuEKnpB8VFXg1T9Kri6J7o%3Dxb%2BN8JsXGnK57D7Yg%40mail.gmail.com.

Reply via email to