| 1 |
from django.contrib import admin |
| 2 |
from django.urls import path, include |
| 3 |
from .models import Model2C |
| 4 |
|
| 5 |
urlpatterns = [ |
| 6 |
path("admin/", admin.site.urls), |
| 7 |
path("examples/views", include("polymorphic.tests.examples.views.urls")), |
| 8 |
] |
| 9 |
|
| 10 |
try: |
| 11 |
import extra_views # noqa: F401 |
| 12 |
|
| 13 |
urlpatterns.append( |
| 14 |
path( |
| 15 |
"examples/integrations/extra_views/", |
| 16 |
include( |
| 17 |
"polymorphic.tests.examples.integrations.extra_views.urls", namespace="extra_views" |
| 18 |
), |
| 19 |
) |
| 20 |
) |
| 21 |
except ImportError: |
| 22 |
pass |
| 23 |
|
| 24 |
try: |
| 25 |
import rest_framework # noqa: F401 |
| 26 |
|
| 27 |
urlpatterns.append( |
| 28 |
path( |
| 29 |
"examples/integrations/drf/", |
| 30 |
include("polymorphic.tests.examples.integrations.drf.urls", namespace="drf"), |
| 31 |
) |
| 32 |
) |
| 33 |
except ImportError: |
| 34 |
pass |