Exemplo n.º 1
0
            "url":
            "https://mirrors.creativecommons.org/presskit/logos/cc.logo.svg",
            "backgroundColor": "#FFFFFF"
        }),
    public=True,
    permission_classes=(rest_framework.permissions.AllowAny, ),
)

urlpatterns = [
    path('', schema_view.with_ui('redoc', cache_timeout=None), name='root'),
    path('admin/', admin.site.urls),
    path('list', CreateList.as_view()),
    path('list/<str:slug>', ListDetail.as_view(), name='list-detail'),
    # re_path(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    # re_path(r'^social/', include('rest_framework_social_oauth2.urls')),
    path('image/<int:id>', ImageDetail.as_view(), name='image-detail'),
    path('link', CreateShortenedLink.as_view(), name='make-link'),
    path('link/<str:path>', ResolveShortenedLink.as_view(), name='resolve'),
    re_path('image/search', SearchImages.as_view()),
    re_path('healthcheck', HealthCheck.as_view()),
    re_path(r'^swagger(?P<format>\.json|\.yaml)$',
            schema_view.without_ui(cache_timeout=None),
            name='schema-json'),
    re_path(r'^swagger/$',
            schema_view.with_ui('swagger', cache_timeout=15),
            name='schema-swagger-ui'),
    re_path(r'^redoc/$',
            schema_view.with_ui('redoc', cache_timeout=15),
            name='schema-redoc'),
]
Exemplo n.º 2
0
    path('auth_tokens/register', Register.as_view(), name='register'),
    path('rate_limit', CheckRates.as_view(), name='key_info'),
    path('auth_tokens/verify/<str:code>',
         VerifyEmail.as_view(),
         name='verify-email'),
    re_path(r'auth_tokens/',
            include('oauth2_provider.urls', namespace='oauth2_provider')),
    path('images/<str:identifier>', ImageDetail.as_view(),
         name='image-detail'),
    path('images/<str:identifier>/report',
         decorated_report_image_view,
         name='report-image'),
    path('recommendations/images/<str:identifier>',
         RelatedImage.as_view(),
         name='related-images'),
    re_path('images', SearchImages.as_view(), name='images'),
    path('sources', ImageStats.as_view(), name='about-image'),
    path('link', CreateShortenedLink.as_view(), name='make-link'),
    path('link/<str:path>', ResolveShortenedLink.as_view(), name='resolve'),
    path('thumbs/<str:identifier>', ProxiedImage.as_view(), name='thumbs'),
    path('oembed', OembedView.as_view(), name='oembed')
]
if WATERMARK_ENABLED:
    versioned_paths.append(
        path('watermark/<str:identifier>', Watermark.as_view()))

urlpatterns = [
    path('', RedirectView.as_view(url='/v1')),
    path('admin/', admin.site.urls),
    re_path('healthcheck', HealthCheck.as_view()),
    re_path(r'^swagger(?P<format>\.json|\.yaml)$',