#34585: Can we use Class with urlpatterns attribute for parameter in include
method?
-----------------------------------------+------------------------
               Reporter:  Neeraj Kumar   |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  new
              Component:  Core (URLs)    |        Version:  4.1
               Severity:  Normal         |       Keywords:  urls
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 {{{
 class ApiV1:
     urlpatterns = (
         path("auth/", include("v1.user.urls")),
         path("doctor/", include("v1.doctor.urls")),
         path("patient/", include("v1.patient.urls")),
     )


 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701883dc6acd3-d2116e43-c715-4c5b-9d8f-b2abdbc87239-000000%40eu-central-1.amazonses.com.

Reply via email to