def test_invalid_entry_point(settings, rf): settings.MODERNRPC_HANDLERS = [] entry_point = RPCEntryPoint.as_view() with raises(ImproperlyConfigured) as exc_info: entry_point(rf.post('xxx')) assert 'handler' in str(exc_info.value)
from django.views.i18n import JavaScriptCatalog from grappelli import urls as grappelli_urls from modernrpc.core import JSONRPC_PROTOCOL, XMLRPC_PROTOCOL from modernrpc.views import RPCEntryPoint from tcms.core import views as core_views from tcms.kiwi_auth import urls as auth_urls from tcms.telemetry import urls as telemetry_urls from tcms.testcases import urls as testcases_urls from tcms.testplans import urls as testplans_urls from tcms.testruns import urls as testruns_urls urlpatterns = [ re_path(r"^$", core_views.DashboardView.as_view(), name="core-views-index"), re_path(r"^xml-rpc/", RPCEntryPoint.as_view(protocol=XMLRPC_PROTOCOL)), re_path(r"^json-rpc/$", RPCEntryPoint.as_view(protocol=JSONRPC_PROTOCOL)), re_path( r"^translation-mode/", core_views.TranslationMode.as_view(), name="translation-mode", ), re_path(r"^grappelli/", include(grappelli_urls)), re_path(r"^admin/", admin.site.urls), re_path(r"^attachments/", include(attachments_urls, namespace="attachments")), # Account information zone, such as login method re_path(r"^accounts/", include(auth_urls)), # Testplans zone re_path(r"^plan/", include(testplans_urls)), # Testcases zone
from django.conf.urls import url, include from modernrpc.views import RPCEntryPoint from main.views import HomePageView app_name = 'main' urlpatterns = [ url(r'^$', HomePageView.as_view()), url(r'^rpc', RPCEntryPoint.as_view(enable_doc=True)), ]
urlpatterns = [ # iframe navigation workaround url(r'^navigation/', core_views.navigation, name='iframe-navigation'), url(r'^grappelli/', include(grappelli_urls)), url(r'^admin/', admin.site.urls), url(r'^attachments/', include(attachments_urls, namespace='attachments')), url(r'^tinymce/', include(tinymce_urls)), # Index and static zone url(r'^$', core_views.index, name='core-views-index'), url(r'^search/$', core_views.search, name='core-views-search'), url(r'^xml-rpc/', RPCEntryPoint.as_view(protocol=XMLRPC_PROTOCOL), name='xml-rpc'), url(r'^json-rpc/$', RPCEntryPoint.as_view(protocol=JSONRPC_PROTOCOL)), # Ajax call responder url(r'^ajax/update/$', ajax.update, name='ajax-update'), url(r'^ajax/update/case-status/$', ajax.update_cases_case_status), url(r'^ajax/update/case-run-status$', ajax.update_case_run_status, name='ajax-update_case_run_status'), url(r'^ajax/update/cases-priority/$', ajax.update_cases_priority), url(r'^ajax/update/cases-default-tester/$', ajax.update_cases_default_tester, name='ajax-update_cases_default_tester'), url(r'^ajax/update/cases-reviewer/$', ajax.update_cases_reviewer), url(r'^ajax/update/cases-sortkey/$', ajax.update_cases_sortkey), url(r'^ajax/form/$', ajax.form, name='ajax-form'), url(r'^ajax/get-prod-relate-obj/$', ajax.get_prod_related_obj_json), url(r'^management/getinfo/$', ajax.info, name='ajax-info'),
"""divisas URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url from django.conf.urls import include from django.contrib import admin from django.urls import path from modernrpc.views import RPCEntryPoint urlpatterns = [ url('admin/', admin.site.urls), url('', include('CV_divisas.urls')), path('rpc/', RPCEntryPoint.as_view()), ]
from django.urls import path, re_path from . import views from rest_framework.urlpatterns import format_suffix_patterns from modernrpc.views import RPCEntryPoint app_name = 'dashboard' urlpatterns = [ path('recordings/', views.recordings_list), path('recordings/<path:file>', views.get_download_link), re_path(r'^rpc/', RPCEntryPoint.as_view(enable_doc=True)), path('<slug:slug>/', views.dashboard, name='dashboard'), ] urlpatterns = format_suffix_patterns(urlpatterns)
from django.conf.urls import url from modernrpc.views import RPCEntryPoint from . import views app_name = 'frontpage' urlpatterns = [ url(r'^rpc/', RPCEntryPoint.as_view()), ]
from django.conf.urls import url from . import views from . import api_rest from . import api_rpc # rest framework from rest_framework.urlpatterns import format_suffix_patterns # rpc from modernrpc.views import RPCEntryPoint # /hello urlpatterns = [ # ** VIEWS ** # /v/* url(r'^$', views.index, name='url>hello'), url(r'^(?P<id>[0-9]+)/$', views.detail, name='url>hello.detail'), # ** API ** # /api/rest/* (JSON RESTFUL) # /api/rpc/* (XML/JSON RPC) url(r'^api/rest/', api_rest.HelloList.as_view(), name="url>hello.api.rest"), url(r'^api/rpc/', RPCEntryPoint.as_view(), name="url>hello.api.rpc"), ] # for rest framework urlpatterns = format_suffix_patterns(urlpatterns)
from django.conf.urls import url from modernrpc.core import JSONRPC_PROTOCOL, XMLRPC_PROTOCOL from modernrpc.views import RPCEntryPoint urlpatterns = [ url(r'^all-rpc/', RPCEntryPoint.as_view(), name="generic_rpc_entry_point"), url(r'^all-rpc-doc/', RPCEntryPoint.as_view(enable_doc=True, enable_rpc=False), name="generic_entry_point_doc"), url(r'^json-only/', RPCEntryPoint.as_view(protocol=JSONRPC_PROTOCOL), name="json_rpc_entry_point"), url(r'^xml-only/', RPCEntryPoint.as_view(protocol=XMLRPC_PROTOCOL), name="xml_rpc_entry_point"), ]