At the moment, CRUDView.url_base is strongly coupled with the path name for a given role (see Role.get_url) which I don't think makes a lot of sense.
IMO, the base component of the path name should always default to cls.model._meta.model_name and MAYBE have a separate option at the class level to change it, e.g. CRUDView.path_name_base or whatever.
On another note, why provide the url_base option at all? This functionality can already be handled in urls.py using the include function.
urlpatterns = [
path("my-url-base/", include(MyCRUDView.get_urls()),
]
IMO (again), the above is a much simpler and easy-to-understand way to declare this as opposed to a class-based option.
At the moment,
CRUDView.url_baseis strongly coupled with the path name for a given role (seeRole.get_url) which I don't think makes a lot of sense.IMO, the base component of the path name should always default to
cls.model._meta.model_nameand MAYBE have a separate option at the class level to change it, e.g.CRUDView.path_name_baseor whatever.On another note, why provide the
url_baseoption at all? This functionality can already be handled inurls.pyusing the include function.IMO (again), the above is a much simpler and easy-to-understand way to declare this as opposed to a class-based option.