diff --git a/project/urls.py b/project/urls.py index 5c6a8e36..a68a157b 100644 --- a/project/urls.py +++ b/project/urls.py @@ -1,7 +1,7 @@ from django.conf import settings from django.conf.urls import include, url from django.contrib import admin - +from django.urls import path # This path is much easier to use without using regular expressions and supported in django 3.0 and higher from welcome.views import index, health urlpatterns = [ @@ -9,9 +9,14 @@ urlpatterns = [ # url(r'^$', 'project.views.home', name='home'), # url(r'^blog/', include('blog.urls')), - url(r'^$', index), - url(r'^health$', health), - url(r'^admin/', include(admin.site.urls)), + # Below commented urls will also work but the latest support for path function is much efficient to use + # url(r'^$', index), + # url(r'^health$', health), + # url(r'^admin/', include(admin.site.urls)), + + path('',index), + path('health/',health), + path('admin/',include(admin.site.urls)) ] if settings.DEBUG: