Django ошибкa 404
Не могу понять в чем ошибка. Помогите, пожалуйста.
Файл Human\urls.py
from django.contrib import admin
from django.urls import path
#from django.conf.urls.static import static
from django.conf import settings
from Human.views import index, get_profession
urlpatterns = [
path('', index, name='Home'),
path('profession/<int:profession_id>', get_profession, name='profession')
]
Файл views.py
from django.shortcuts import render
from .models import Human, Profession
def index(request):
human = Human.objects.all()
professions = Profession.objects.all()
context = {
'human': human,
'title': 'Список',
'professions': professions
}
return render(request, 'Human/index.html', context=context)
def get_profession(request, profession_id):
human = Human.objects.filter(profession_id=profession_id)
professions = Profession.objects.all()
profession = Profession.objects.get(pk=profession_id)
context = {
'human': human,
'professions': professions,
'profession': profession
}
return render(request, 'Human/profession.html', context=context)
Источник: Stack Overflow на русском