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.py(main 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/urls.py(main urlsConfig)
from django.contrib import admin
from django.urls import path,include
from . import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.index, name='index'),
path('login', include('useraccount.urls')),
path('signup', include('useraccount.urls')),
]
useraccount/views.py(app 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/urls.py(app urlConf)
from django.urls import path
from useraccount import views
urlpatterns = [
path('login', views.login),
path('signup', views.signup)
]
please help me with it!