Django urlsConf mapping issues

I am stuck with the url routing I have made a main project named “bookstore” and there is an app within it
named “useraccount”, it is not showing the login view and signup view

bookstore/ views)

from django.http import HttpResponse
from django.shortcuts import render

# index is the home page for the project
def index(request):
    return render(request, 'index.html')

def home(request):
    return HttpResponse('Hello this is home')

bookstore/ urlsConfig)

from django.contrib import admin
from django.urls import path,include
from . import views

urlpatterns = [
    path('', views.index, name='index'),
    path('login', include('useraccount.urls')),
    path('signup', include('useraccount.urls')),

useraccount/ views)

from django.shortcuts import render
from django.http import HttpResponse

# Create your views here.

def login(request):
    return HttpResponse("login is working")
   #return render(request,'login.html')

def signup(request):
    return HttpResponse('sign up is here')

useraccount/ urlConf)

from django.urls import path
from useraccount import views

urlpatterns = [
    path('login', views.login),
    path('signup', views.signup)

please help me with it!

Are you getting an error? A 404? What specifically is not working?

Note: I suggest you review the work you would have done at Writing your first Django app, part 1 | Django documentation | Django and at Writing your first Django app, part 3 | Django documentation | Django to refresh your memory on the structure of url definitions.

1 Like

The problem was that I had to map it with the default values in the main URLConf

path(' ', include('useraccount.urls'),

and problem is solved, thanks for pointing towards a direction