Пример #1
0
    # Login/logout
    path(r'login/', LoginView.as_view(), name='login'),
    path(r'logout/', LogoutView.as_view(), name='logout'),

    # Apps
    path(r'circuits/', include('circuits.urls')),
    path(r'dcim/', include('dcim.urls')),
    path(r'extras/', include('extras.urls')),
    path(r'ipam/', include('ipam.urls')),
    path(r'secrets/', include('secrets.urls')),
    path(r'tenancy/', include('tenancy.urls')),
    path(r'user/', include('users.urls')),
    path(r'virtualization/', include('virtualization.urls')),

    # API
    path(r'api/', APIRootView.as_view(), name='api-root'),
    path(r'api/circuits/', include('circuits.api.urls')),
    path(r'api/dcim/', include('dcim.api.urls')),
    path(r'api/extras/', include('extras.api.urls')),
    path(r'api/ipam/', include('ipam.api.urls')),
    path(r'api/secrets/', include('secrets.api.urls')),
    path(r'api/tenancy/', include('tenancy.api.urls')),
    path(r'api/virtualization/', include('virtualization.api.urls')),
    path(r'api/docs/', schema_view.with_ui('swagger'), name='api_docs'),
    path(r'api/redoc/', schema_view.with_ui('redoc'), name='api_redocs'),
    re_path(r'^api/swagger(?P<format>.json|.yaml)$',
            schema_view.without_ui(),
            name='schema_swagger'),

    # Serving static media in Django to pipe it through LoginRequiredMiddleware
    path(r'media/<path:path>', serve, {'document_root': settings.MEDIA_ROOT}),
Пример #2
0
    # Login/logout
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),

    # Apps
    url(r'^circuits/', include('circuits.urls')),
    url(r'^dcim/', include('dcim.urls')),
    url(r'^extras/', include('extras.urls')),
    url(r'^ipam/', include('ipam.urls')),
    url(r'^secrets/', include('secrets.urls')),
    url(r'^tenancy/', include('tenancy.urls')),
    url(r'^user/', include('users.urls')),
    url(r'^virtualization/', include('virtualization.urls')),

    # API
    url(r'^api/$', APIRootView.as_view(), name='api-root'),
    url(r'^api/circuits/', include('circuits.api.urls')),
    url(r'^api/dcim/', include('dcim.api.urls')),
    url(r'^api/extras/', include('extras.api.urls')),
    url(r'^api/ipam/', include('ipam.api.urls')),
    url(r'^api/secrets/', include('secrets.api.urls')),
    url(r'^api/tenancy/', include('tenancy.api.urls')),
    url(r'^api/virtualization/', include('virtualization.api.urls')),
    url(r'^api/docs/$', schema_view.with_ui('swagger'), name='api_docs'),
    url(r'^api/redoc/$', schema_view.with_ui('redoc'), name='api_redocs'),
    url(r'^api/swagger(?P<format>.json|.yaml)$', schema_view.without_ui(), name='schema_swagger'),

    # Serving static media in Django to pipe it through LoginRequiredMiddleware
    url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),

    # Admin
Пример #3
0
    # Login/logout
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),

    # Apps
    url(r'^circuits/', include('circuits.urls')),
    url(r'^dcim/', include('dcim.urls')),
    url(r'^extras/', include('extras.urls')),
    url(r'^ipam/', include('ipam.urls')),
    url(r'^secrets/', include('secrets.urls')),
    url(r'^tenancy/', include('tenancy.urls')),
    url(r'^user/', include('users.urls')),
    url(r'^virtualization/', include('virtualization.urls')),

    # API
    url(r'^api/$', APIRootView.as_view(), name='api-root'),
    url(r'^api/circuits/', include('circuits.api.urls')),
    url(r'^api/dcim/', include('dcim.api.urls')),
    url(r'^api/extras/', include('extras.api.urls')),
    url(r'^api/ipam/', include('ipam.api.urls')),
    url(r'^api/secrets/', include('secrets.api.urls')),
    url(r'^api/tenancy/', include('tenancy.api.urls')),
    url(r'^api/virtualization/', include('virtualization.api.urls')),
    url(r'^api/docs/$', schema_view.with_ui('swagger'), name='api_docs'),
    url(r'^api/redoc/$', schema_view.with_ui('redoc'), name='api_redocs'),
    url(r'^api/swagger(?P<format>.json|.yaml)$',
        schema_view.without_ui(),
        name='schema_swagger'),

    # Serving static media in Django to pipe it through LoginRequiredMiddleware
    url(r'^media/(?P<path>.*)$', serve,