enter image description here
I have a ready-made html template with css. It seems to have done everything correctly, but it does not work.
project location C:\Projects\brew\brewtopia
location of the application C:\Projects\brew\brewtopia\users
location of the main urls.py C:\Projects\brew\brewtopia\brewtopia\urls.py
location urls.py in the app C:\Projects\brew\brewtopia\users\urls.py
location of views.py in the app C:\Projects\brew\brewtopia\users\views.py
html layout C:\Projects\brew\brewtopia\users\templates\users\Brewtopia.
folder static C:\Projects\brew\brewtopia\users\static
version django 4.1
python 3.11
I’ve been sitting with this problem for a day now, I’ve tried everything, people with experiences help me, I just started learning django
here is the code in the urls,py of the main project
`from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('"', include('users.urls')),
]`
here is the code in urls,py in the application
`from django.urls import path
from . import views
urlpatterns = [
path('Brewtopia', views.Brewtopia_view, name='brewtopia')
]`
here is the code in views.py in the app
`from django.shortcuts import render
def Brewtopia_view(request):
return render(request, 'Brewtopia.html')`
in the main settings.py I have completed this
`STATICFILES_DIRS = [BASE_DIR / "static"]`
>Solution :
If you want set localhost:8000/Brewtopia as index, change the code in urls.py in the application like that
`from django.urls import path
from . import views
urlpatterns = [
path('', views.Brewtopia_view, name='brewtopia')
]`