Моя проблема связана с шаблоном, в котором я встроил тег url. Это часть шаблона, которая вызывает ошибку:
39 <div class="table-data__tool-right">
40 <button class="btn btn-primary btn-lg active" href="{% url 'doctormonthbilling_export:add' %}/{{ month }}/{{ doctorid }}">
41 <i class="zmdi zmdi-plus"></i>
42 Rechnung erstellen
43 </button>
44 </div>
, и это ошибка:
'doctormonthbilling_export' is not a registered namespace
Request Method: GET
Request URL: http://127.0.0.1:8000/doctormonthbilling/3/2
Django Version: 3.0.8
Exception Type: NoReverseMatch
Exception Value:
'doctormonthbilling_export' is not a registered namespace
Exception Location: C:\mySF\mySF\venv\lib\site-packages\django\urls\base.py in reverse, line 83
Python Executable: C:\mySF\mySF\venv\Scripts\python.exe
Python Version: 3.8.4
Python Path:
['C:\\mySF\\mySF',
'C:\\Program Files (x86)\\Python38-32\\python38.zip',
'C:\\Program Files (x86)\\Python38-32\\DLLs',
'C:\\Program Files (x86)\\Python38-32\\lib',
'C:\\Program Files (x86)\\Python38-32',
'C:\\mySF\\mySF\\venv',
'C:\\mySF\\mySF\\venv\\lib\\site-packages']
, хотя в моем файле urls.py есть такая строка:
# some paths before with ,
path('doctormonthbilling_export/<str:month>/<str:doctorid>', views.doctormonthbilling_export,name='doctormonthbilling_export'),
#some other paths after
Я не могу понять, что случилось! Кто-нибудь может заметить ошибку? Спасибо