Saya telah memperbarui ke djangorestframework==3.11.0
dari versi yang lebih lama. Sekarang saya punya kesalahan ini,
TypeError: register () mendapat argumen kata kunci tak terduga 'base_name'
Traceback
...
...
...
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/abu/projects/django-example/django2x/urls.py", line 21, in <module>
path('sample/', include('sample.urls')),
File "/home/abu/.virtualenvs/django-example/lib/python3.6/site-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/abu/projects/django-example/sample/urls.py", line 6, in <module>
router.register(r'musician', MusicianViewset, base_name='musician')
TypeError: register() got an unexpected keyword argument 'base_name'
python
django
django-rest-framework
Arakkal Abu
sumber
sumber