chibisov / drf-extensions

DRF-extensions is a collection of custom extensions for Django REST Framework
http://chibisov.github.io/drf-extensions/docs
MIT License
1.48k stars 208 forks source link

Documentation says base_name, should probably be basename #278

Open dyve opened 4 years ago

dyve commented 4 years ago

Documentation: http://chibisov.github.io/drf-extensions/docs/#nested-routes

router = ExtendedSimpleRouter()
(
    router.register(r'users', UserViewSet, base_name='user')
          .register(r'groups',
                    GroupViewSet,
                    base_name='users-group',
                    parents_query_lookups=['user_groups'])
          .register(r'permissions',
                    PermissionViewSet,
                    base_name='users-groups-permission',
                    parents_query_lookups=['group__user', 'group'])
)
urlpatterns = router.urls

Parameter base_name is not accepted, but looking at the source, basename is.

I cannot find a changelog for this change, please clarify and update documentation.

auvipy commented 4 years ago

you are right

shuternay commented 4 years ago

It seems that the documentation page hasn't been updated since 2016: https://github.com/chibisov/drf-extensions/commits/gh-pages In the source file it is basename: https://github.com/chibisov/drf-extensions/blob/master/docs/index.md