Reputation: 450
I just created a new app for my django project and have created a urls.py, models.py, views.py, and serializers.py. However, my project is not detecting the URLs in the urls.py file. If I go to a different app in my project and edit the urls.py file, the system detects it. However, it will not detect it in the new one. Here is the urls.py file:
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^knorket-kaitongo-integration/$', views.KnorketKaitongoIntegration.as_view(),
name='knorket_kaitongo_integration'),
]
Does anyone know why this wouldn't be detected? It's not showing up on the API screen either.
Upvotes: 0
Views: 988
Reputation: 5388
Django does not autodetect any files You need to install them using the installed_apps list and register URLs.
In the Root application, you should find a urls.py file, in that file you need to register your URLs.
You need to import application URLs in Root urls.py and add them in something like this.
urlpatterns = [
path('^', include(urls))
]
Upvotes: 1