"""sidlab 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 shortener.views import kirr_redirect_view, KirrCBView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^view-1/$', kirr_redirect_view), url(r'^view-2/$', KirrCBView.as_view()), # joincfe.com/projects/ python regex ]
"""kirr 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, re_path from shortener.views import KirrCBView, HomeView urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view()), re_path(r'^(?P<shortcode>[\w-]+)/$', KirrCBView.as_view(), name='scode') ]
"""kirr 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.conf.urls import url from django.contrib import admin from shortener.views import kirr_redirect_view, KirrCBView, test_view urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^test_view/', test_view), url(r'^(?P<shortcode>[\w-]+){0,15}/$', kirr_redirect_view), url(r'^cbv/(?P<shortcode>[\w-]+)/$', KirrCBView.as_view()), ]
"""kirr 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, include from django.conf.urls import url from django.conf.urls.static import static from django.conf import settings from shortener.views import HomeView, KirrCBView urlpatterns = [ path('admin/', admin.site.urls), url(r'^$', HomeView.as_view()), url(r'^(?P<shortcode>[-\w]+)/$', KirrCBView.as_view()), ] urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
"""juno 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 shortener.views import KirrCBView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^algo', KirrCBView.as_view()) ]
"""krr 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.conf.urls import url from django.contrib import admin from shortener.views import kirr_redirect_view, KirrCBView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^(?P<shortcode>[\w-]+){6,15}/$', kirr_redirect_view), url(r'^b/(?P<shortcode>[\w-]+){6,15}/$', KirrCBView.as_view()), ]
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 shortener.views import kirr_redirect_view, KirrCBView # do not do #from shortener import views #from another_app.views import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^a/(?P<shortcode>[\w-]+)/$', kirr_redirect_view), url(r'^b/(?P<shortcode>[\w-]+)/$', KirrCBView.as_view()), #joincfe.com/projects/python regex ]