This is my view.py file
class UploadTemplateView(TemplateView):
template_name = 'reports/from_file.html'
This is my urls.py file
urlpatterns = [
path('save/', create_report_view, name='create-report'),
path('', ReportListView.as_view(), name='main'),
path('from_file/', UploadTemplateView.as_view(), name='form-file'),
path('<pk>/', ReportDetailView.as_view(), name='detail'),
path('upload/', csv_upload_view, name='upload'),
path('<pk>/pdf/', render_pdf_view, name='pdf'),
]
When I try to access my page it cost an error "Field 'id' expected a number but got 'form_file' The only way to fix it is by changing the pathname to number. How can I define pathname as a string