Exemplo n.º 1
0
    re_path(
        r'auth_tokens/',
        include('oauth2_provider.urls', namespace='oauth2_provider')
    ),
    path(
        'images/<str:identifier>', ImageDetail.as_view(), name='image-detail'
    ),
    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'),
]
if WATERMARK_ENABLED:
    versioned_paths.append(
        path('watermark/<str:identifier>', Watermark.as_view())
    )

urlpatterns = [
    path('admin/', admin.site.urls),
    re_path('healthcheck', HealthCheck.as_view()),
    re_path(
        r'^swagger(?P<format>\.json|\.yaml)$',
Exemplo n.º 2
0
    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)$',
            schema_view.without_ui(cache_timeout=None),
Exemplo n.º 3
0
    path('oauth2/register', Register.as_view(), name='register'),
    path('oauth2/key_info', CheckRates.as_view(), name='key_info'),
    path('oauth2/verify/<str:code>',
         VerifyEmail.as_view(),
         name='verify-email'),
    re_path(r'^oauth2/',
            include('oauth2_provider.urls', namespace='oauth2_provider')),
    # path('list', CreateList.as_view()),
    # path('list/<str:slug>', ListDetail.as_view(), name='list-detail'),
    re_path('image/search', SearchImages.as_view()),
    path('image/browse/<str:provider>', BrowseImages.as_view()),
    path('image/<str:identifier>', ImageDetail.as_view(), name='image-detail'),
    path('image/related/<str:identifier>',
         RelatedImage.as_view(),
         name='related-images'),
    path('statistics/image', ImageStats.as_view(), name='about-image'),
    path('link', CreateShortenedLink.as_view(), name='make-link'),
    path('link/<str:path>', ResolveShortenedLink.as_view(), name='resolve'),
    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')
]

if WATERMARK_ENABLED: