class ApiV2:
urlpatterns = (
path("auth/", include("v2.user.urls")),
path("doctor/", include("v2.doctor.urls")),
path("patient/", include("v2.patient.urls")),
)
urlpatterns = i18n_patterns(
path("admin/", admin.site.urls),
path('api/v1/', include(ApiV1)),
path('api/v2/', include(ApiV2)),
prefix_default_language=False,
)
}}}
this code is working for me, but in Django docs, nothing mentioned for
Class can be used with include method?
So do we need to put restrictions from the Django side for don't use class
or otherwise update docs and code to accept Class as an argument in the
include method?
--
Ticket URL: <https://code.djangoproject.com/ticket/34585>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
> this code is working for me, but in Django docs, nothing mentioned for
Class can be used with include method?
>
> So do we need to put restrictions from the Django side for don't use
class or otherwise update docs and code to accept Class as an argument in
the include method?
I see no reason to document (as officially supported) or restrict this (as
officially prohibited).
--
Ticket URL: <https://code.djangoproject.com/ticket/34585#comment:1>
* type: Uncategorized => Cleanup/optimization
--
Ticket URL: <https://code.djangoproject.com/ticket/34585#comment:2>