Answer the question
In order to leave comments, you need to log in
Is the directory in a Django project containing the __init__.py file a module?
If, for example, __init__.py is located in the blog folder, then in the main urls.py I can include this directory as follows
from django.contrib import admin
from django.urls import path, include
from . import blog
urlpatterns = [
path('admin/', admin.site.urls),
path('blog/', include('blog.urls')),
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question