Hello everyone I’ve been in this issue for two days now, and I really hope that someone will help me to understand it in order to continue learning. Django 404 error in all html templates of second app created in my project, help is more then appreciated, and thanks in advance!
1. admin/
2. [name='home']
3. about/ [name='about']
4. jptadmin/ [name='jptadmin']
5. dhadmin_login/ [name='dhadmin_login']
6. login [name='login']
7. ^media/(?P<path>.*)$
8. ^static/(?P<path>.*)$
The current path, `login/`, didn’t match any of these.
views settings of the second app created the one with problem
from django.shortcuts import render
from django.http import HttpResponse
#from django.contrib.admin.views.decorators import staff_member_required
def game_admin(request):
return render(request, 'game_admin/game_admin.html',)
#@staff_member_required( login_url="login.urls")
def login(request):
# Your view logic here
return HttpResponse("Just Test"),
urls config on the second app created on project, that is the one that I’m having trouble with
from django.urls import path
from . import views
urlpatterns = [
path('', views.game_admin, name=""),
path('login', views.login, name="login"),
]
main project urls setting
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('jackpot.urls')),
path('', include('game_admin.urls')),
]