Add suport to django > 3.0 and drf > 3.9
See original GitHub issueI was using the base_name argument on the urls of my app but i believe drf isn’t supporting it anymore because when testing the following error is returned.
Traceback (most recent call last):
File "manage.py", line 29, in <module>
main()
File "manage.py", line 25, in main
execute_from_command_line(sys.argv)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/management/base.py", line 366, in execute
self.check()
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/management/base.py", line 395, in check
include_deployment_checks=include_deployment_checks,
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/management/base.py", line 382, in _run_checks
return checks.run_checks(**kwargs)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 588, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/circleci/company_service/.venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 581, in urlconf_module
return import_module(self.urlconf_name)
File "/home/circleci/company_service/.venv/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/circleci/company_service/company_service/urls.py", line 16, in <module>
companies_router.register('production_lines', views.ProductionLineViewSet, base_name='companies-production_lines')
TypeError: register() got an unexpected keyword argument 'base_name'
Exited with code exit status 1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
3.9 Announcement - Django REST framework
The 3.9 release gives access to extra actions in the Browsable API, introduces composable permissions and built-in OpenAPI schema support.
Read more >How to upgrade Django to a newer version
While it can be a complex process at times, upgrading to the latest Django version has several benefits: New features and improvements are...
Read more >drf-yasg - Yet another Swagger generator - Read the Docs
Django Rest Framework: 3.10, 3.11, 3.12; Django: 2.2, 3.0, 3.1 ... If you are looking to add Swagger/OpenAPI support to a new project...
Read more >Django Rest Framework extensions documentation
DRF -extensions is a collection of custom extensions for Django REST Framework. ... Django 3.0 (#276); Dropped support for Django 2.0; Added support...
Read more >django-rest-serializer-field-permissions - PyPI
If future major versions of Django and DRF are roughly compatible with this plugin, then I hope to offer ongoing support for those...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I see that you merged #186 which should add support for Django 3 but didn’t create a new version for pypi.
Lately I am thinking in just deprecate DRF 3.11 in December. Holidays will (hopefully) let me take care of this.
You are right. This is cumbersome and letting people confused.