As, now you have created an app, you can start the development of your project by printing Hello World on the web page.
Before printing Hello World, we would need to create a file named urls.py
in the app directory and link it with the urls.py
of the project directory.
A urls.py
file is created in the articles app. Next you can continue by adding the following code in articles\urls.py
file.
from django.urls import path
urlpatterns = [
]
And the EdkoolWorld\urls.py
should be edited as follows :
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path("articles/", include('articles.urls')),
]
After this, any routes have articles/
would be redirected to the urls.py
file present in articles
app, and the corresponding task defined would be performed.