"""sookhproject 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.url import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from django.views.generic import RedirectView urlpatterns=[ url(r'^admin/', admin.site.urls), url(r'^sookh/',include('appwithmodels.urls')), url(r'^$',RedirectView.as_view(url='/sookh/home/',permanent=True)), ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.url import pattern, url from rango import index urlpatterns = pattern('', url(r'^$', rango.index, name="index"))
from django.conf.url import url from rest_framework.urlpatterns import format_suffix_patterns from user import views urlpatterns = [ url(r'^users/$', views.UserList.as_view(), name='user-list'), url(r'^users/(?P<pk>[0-9]+)/$', views.UserDetails.as_view, name='user-detail'), ]
"""rookie URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/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 personalfinance import views from django.conf.url import url urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^personalfinance/', include('personalfinance.urls')), url(r'^$/', views.index, name='index'), ]
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.url import url from django.contrib import admin from bookmark import views as bk_views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', bk_views.current_datetime, name='index') ] def current_datetime(request): now = datetime.datetime.now() html="<html><body> It is now %s. </body></html>" % now return HttpResponse(html)
from django.conf.url = import patterns, include, url urlpatterns = patterns('', url(r'^$', 'email_generator.views.input') )
from django.conf.url import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), # 127.0.01/polls/ ]