"""backend 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.contrib import admin # from django.views.decorators.csrf import csrf_exempt from index.views import IndexView urlpatterns = [ url(r'^admin/', admin.site.urls), # 取消api的crsf的验证 url(r'^api/', IndexView.as_view(), name='index') ]
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.contrib import admin from django.conf.urls import url, include from django.conf import settings from django.conf.urls.static import static from index.views import IndexView from laboratorio.api_urls import router from ordenes.views import ImpresionExamenesView urlpatterns = [ url(r'^api/', include(router.urls)), url(r'^app/', IndexView.as_view(), name='index'), url(r'^admin/', admin.site.urls), url(r'^accounts/', include('registration.backends.default.urls')), url(r'^$', IndexView.as_view(), name='index'), url(r'^print/(?P<pk>[^/]+)/$', ImpresionExamenesView.as_view(), name='orden-detail'), ] if settings.DEBUG: import debug_toolbar urlpatterns = [ url(r'^__debug__/', include(debug_toolbar.urls)), ] + urlpatterns urlpatterns += static(settings.STATIC_URL,
"""myproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path from django.conf.urls import url from django.contrib import admin from index.views import IndexView urlpatterns = [ path('',IndexView.as_view(), name='index'), path('admin/', admin.site.urls), ]
from django.conf.urls import patterns, include, url from django.contrib import admin from index.views import IndexView admin.autodiscover() urlpatterns = patterns('', url(r'^$', IndexView.as_view(), name='index'), url(r'^admin/', include(admin.site.urls)), )
"""Meet URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/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 patterns, include, url from django.contrib import admin from index.views import IndexView from Meet.settings import MEDIA_ROOT from django.views.static import serve urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', IndexView.as_view(), name="index"), url(r'^media/(?P<path>.*)$', serve, {"document_root": MEDIA_ROOT}), ]
urlpatterns = [ url(r'^admin/', admin.site.urls), url( r'^board/', include( 'board.urls', namespace='board', ), ), url( r'^thread/', include( 'thread.urls', namespace='thread', ), ), url( r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT} ), url( r'^$', IndexView.as_view(), name='index', ), ]
from django.conf.urls import include, url, patterns from django.contrib import admin from django.views.generic import TemplateView from index.views import IndexView urlpatterns = [ url(r'^$', IndexView.as_view()), url(r'^instagram/$', TemplateView.as_view(template_name="instagram.html")), ]
# encoding: utf-8 from django.conf.urls import patterns, url from index.views import IndexView urlpatterns = patterns("", url(r"^$", IndexView.as_view(), name="index"))
from index.views import IndexView """dheck URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path urlpatterns = [ path('', IndexView.as_view()), path('admin/', admin.site.urls), ]
urlpatterns = [ path('admin/', admin.site.urls), path("", include(router.urls)), path("api-token-auth/", jwt_views.TokenObtainPairView.as_view(), name="token_obtain_pair"), path("api-token-refresh/", jwt_views.TokenRefreshView.as_view(), name="token_refresh"), path("api-token-verify/", jwt_views.TokenVerifyView.as_view(), name="token_verify"), path("node_heart/", HeartViewSet.as_view()), path("test/", TestView.as_view()), path("index/", IndexView.as_view()), path("login/", LoginView.as_view()), path("register/", RegisterView.as_view()), path("taskpub/", TaskpubView.as_view()), path("tasklist/", TasklistView.as_view()), path("myorder/", MyorderView.as_view()), path("personaldata/", PersonaldataView.as_view()), path("mynode/", MynodeView.as_view()), path("changepasswd/", ChangepasswdView.as_view()), path("wallet/", WalletView.as_view()), # path("node_num_manage/", NodeNumManageViewSet.as_view()), path("node_run_manage/", NodeRunManageViewSet.as_view()), # path("node_num_manage/", NodeNumManageViewSet.as_view()), path("node_num_manage/", Node_Management_List.as_view()), path("particular/", ParticularView.as_view()), path("userprofile/", UserProfileView.as_view()),
from django.conf.urls import url, include from django.contrib import admin from django.urls import path from django.conf import settings from django.conf.urls.static import static from .api_urls import router from index.views import IndexView from knox.views import LogoutView urlpatterns = [ path('admin/', admin.site.urls), path('api/auth/logout', LogoutView.as_view()), path('api/', include(router.urls)), url(r'^app/*', IndexView.as_view()), url(r'^silk/', include('silk.urls', namespace='silk')), path('', include('index.urls')), ] if settings.DEBUG: # urlpatterns = [ # url(r'^silk/', include('silk.urls', namespace='silk')), # ] + urlpatterns urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from django.contrib import admin from guests.views import LoginFormView from index.views import IndexView, ContactsView, ImageGallery urlpatterns = patterns( '', url(r'^grappelli/', include('grappelli.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^summernote/', include('django_summernote.urls')), url(r'^login$', LoginFormView.as_view(), name='login'), url(r'^$', login_required(IndexView.as_view()), name='index'), url(r'^contacts$', login_required(ContactsView.as_view()), name='contacts'), url(r'^gallery$', login_required(ImageGallery.as_view()), name='gallery'), url(r'^news', include('news.urls')), )
from django.urls import re_path from index.views import IndexView urlpatterns = [ re_path(r'^$', IndexView.as_view(), name='index'), ]
"""contabot URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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.urls import path from django.contrib import admin from django.views.generic import TemplateView from index.views import IndexView urlpatterns = [path('admin/', admin.site.urls), path('', IndexView.as_view())]
def setUp(self): self.content = Content.objects.create(title="foo", description="bar") self.image = Image.objects.create(description="something :P") self.request = RequestFactory().get("index") self.response = IndexView.as_view()(self.request)
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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.contrib import admin from index.views import IndexView, TranslateView, SaveTranslateView, ShowTranslateView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', IndexView.as_view(), name="IndexPage"), url(r'^translate/$', TranslateView.as_view(), name="TranslatePage"), url(r'^translate/save/$', SaveTranslateView.as_view(), name="SaveTranslatePage"), url(r'^translate/show/$', ShowTranslateView.as_view(), name="ShowTranslatePage"), ]