Example #1
0
]

v2_urls = [
    url(r'^$', ApiV2RootView.as_view(), name='api_v2_root_view'),
    url(r'^credential_types/', include(credential_type_urls)),
    url(r'^hosts/(?P<pk>[0-9]+)/ansible_facts/$', HostAnsibleFactsDetail.as_view(), name='host_ansible_facts_detail'),
    url(r'^jobs/(?P<pk>[0-9]+)/extra_credentials/$', JobExtraCredentialsList.as_view(), name='job_extra_credentials_list'),
    url(r'^jobs/(?P<pk>[0-9]+)/credentials/$', JobCredentialsList.as_view(), name='job_credentials_list'),
    url(r'^job_templates/(?P<pk>[0-9]+)/extra_credentials/$', JobTemplateExtraCredentialsList.as_view(), name='job_template_extra_credentials_list'),
    url(r'^job_templates/(?P<pk>[0-9]+)/credentials/$', JobTemplateCredentialsList.as_view(), name='job_template_credentials_list'),
    url(r'^schedules/preview/$', SchedulePreview.as_view(), name='schedule_rrule'),
    url(r'^schedules/zoneinfo/$', ScheduleZoneInfo.as_view(), name='schedule_zoneinfo'),
    url(r'^applications/$', OAuth2ApplicationList.as_view(), name='o_auth2_application_list'),
    url(r'^applications/(?P<pk>[0-9]+)/$', OAuth2ApplicationDetail.as_view(), name='o_auth2_application_detail'),
    url(r'^applications/(?P<pk>[0-9]+)/tokens/$', ApplicationOAuth2TokenList.as_view(), name='application_o_auth2_token_list'),
    url(r'^tokens/$', OAuth2TokenList.as_view(), name='o_auth2_token_list'),
    url(r'^', include(user_oauth_urls)),
]

app_name = 'api'
urlpatterns = [
    url(r'^$', ApiRootView.as_view(), name='api_root_view'),
    url(r'^(?P<version>(v2))/', include(v2_urls)),
    url(r'^(?P<version>(v1|v2))/', include(v1_urls)),
    url(r'^login/$', LoggedLoginView.as_view(
        template_name='rest_framework/login.html',
        extra_context={'inside_login_context': True}
    ), name='login'),
    url(r'^logout/$', LoggedLogoutView.as_view(
        next_page='/api/', redirect_field_name='next'
    ), name='logout'),
Example #2
0
    url(r'^(?P<pk>[0-9]+)/projects/$',
        UserProjectsList.as_view(),
        name='user_projects_list'),
    url(r'^(?P<pk>[0-9]+)/credentials/$',
        UserCredentialsList.as_view(),
        name='user_credentials_list'),
    url(r'^(?P<pk>[0-9]+)/roles/$',
        UserRolesList.as_view(),
        name='user_roles_list'),
    url(r'^(?P<pk>[0-9]+)/activity_stream/$',
        UserActivityStreamList.as_view(),
        name='user_activity_stream_list'),
    url(r'^(?P<pk>[0-9]+)/access_list/$',
        UserAccessList.as_view(),
        name='user_access_list'),
    url(r'^(?P<pk>[0-9]+)/applications/$',
        OAuth2ApplicationList.as_view(),
        name='o_auth2_application_list'),
    url(r'^(?P<pk>[0-9]+)/tokens/$',
        OAuth2TokenList.as_view(),
        name='o_auth2_token_list'),
    url(r'^(?P<pk>[0-9]+)/authorized_tokens/$',
        UserAuthorizedTokenList.as_view(),
        name='user_authorized_token_list'),
    url(r'^(?P<pk>[0-9]+)/personal_tokens/$',
        OAuth2PersonalTokenList.as_view(),
        name='o_auth2_personal_token_list'),
]

__all__ = ['urls']
Example #3
0
File: urls.py Project: yckwon75/awx
 re_path(r'^schedules/preview/$',
         SchedulePreview.as_view(),
         name='schedule_rrule'),
 re_path(r'^schedules/zoneinfo/$',
         ScheduleZoneInfo.as_view(),
         name='schedule_zoneinfo'),
 re_path(r'^applications/$',
         OAuth2ApplicationList.as_view(),
         name='o_auth2_application_list'),
 re_path(r'^applications/(?P<pk>[0-9]+)/$',
         OAuth2ApplicationDetail.as_view(),
         name='o_auth2_application_detail'),
 re_path(r'^applications/(?P<pk>[0-9]+)/tokens/$',
         ApplicationOAuth2TokenList.as_view(),
         name='application_o_auth2_token_list'),
 re_path(r'^tokens/$', OAuth2TokenList.as_view(),
         name='o_auth2_token_list'),
 re_path(r'^', include(oauth2_urls)),
 re_path(r'^metrics/$', MetricsView.as_view(), name='metrics_view'),
 re_path(r'^ping/$', ApiV2PingView.as_view(), name='api_v2_ping_view'),
 re_path(r'^config/$', ApiV2ConfigView.as_view(),
         name='api_v2_config_view'),
 re_path(r'^config/subscriptions/$',
         ApiV2SubscriptionView.as_view(),
         name='api_v2_subscription_view'),
 re_path(r'^config/attach/$',
         ApiV2AttachView.as_view(),
         name='api_v2_attach_view'),
 re_path(r'^auth/$', AuthView.as_view()),
 re_path(r'^me/$', UserMeList.as_view(), name='user_me_list'),
 re_path(r'^dashboard/$', DashboardView.as_view(), name='dashboard_view'),