"""django_todo_project2 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, include from django.contrib import admin from rest_framework_jwt.views import obtain_jwt_token from todo.views import TodoView from accounts.views import RegistrationView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^todo/$', TodoView.as_view()), url(r'^todo/(?P<pk>[0-9]+)/$', TodoView.as_view()), url(r'^accounts/register/$', RegistrationView.as_view()), url(r'^accounts/api-token-auth/$', obtain_jwt_token), url(r'^docs/', include('rest_framework_docs.urls')), ]
from django.conf.urls import url from todo.views import TodoView urlpatterns = [ url(r'^$', TodoView.as_view()) ]
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView import rest_framework from django.contrib import admin admin.autodiscover() from todo.views import TodoDetailView, TodoView urlpatterns = patterns( "", # Examples: # url(r'^$', 'skeleton.views.home', name='home'), # url(r'^skeleton/', include('skeleton.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r"^admin/", include(admin.site.urls)), url(r"^$", TemplateView.as_view(template_name="todo.html")), url(r"^todos/$", TodoView.as_view(), name="todo-view"), url(r"^todos/(?P<pk>\d+)$", TodoDetailView.as_view(), name="todo-view"), )
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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, include from webapp import views from student.views import StudentView from Authentication.views import SignUpView from todo.views import TodoView, GetOneTodoView urlpatterns = [ path('admin/', admin.site.urls), path('students/', StudentView.as_view()), path('employess/', views.EmployeeView.as_view()), path('signup/', SignUpView.as_view()), path('addtodo/', TodoView.as_view()), path('addtodo/<int:pk>', GetOneTodoView.as_view()), path('rest-auth/', include('rest_auth.urls')), ]
from django.conf.urls import url from todo.views import TodoView urlpatterns = [ url(r'^$', TodoView.as_view()), url(r'^(?P<pk>[0-9]+)/$', TodoView.as_view()) ]
from django.conf.urls import url from todo.views import TodoView urlpatterns = [url(r'^$', TodoView.as_view())]
from django.conf.urls import url from todo.views import TodoView urlpatterns = [ url(r"^$", TodoView.as_view()), url(r"(?P<pk>[0-9]+)/$", TodoView.as_view()) ]
from django.conf.urls import url from todo.views import TodoView urlpatterns = [ url(r'^$', TodoView.as_view()), url(r'^(?P<pk>[0-9]+)/$', TodoView.as_view()), ]
"""todo_bot 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 todo.views import Welcome, TodoView, UserView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^welcome/', Welcome.as_view()), url(r'^todo/', TodoView.as_view()), url('r^user/', UserView.as_view()) ]
from django.contrib import admin from django.urls import path, include from todo.views import RegisterView, TodoView, LoginView, ItemTodoView from knox import views as knox_views urlpatterns = [ path('', include('todo.urls')), path('admin/', admin.site.urls), path('api/todo/', TodoView.as_view(), name='todo'), path('api/todo/<pk>', ItemTodoView.as_view(), name='Itemtodo'), path('api/register/', RegisterView.as_view(), name='register'), path('api/login/', LoginView.as_view(), name='login'), path('api/logout/', knox_views.LogoutView.as_view(), name='logout'), path('api/logoutall/', knox_views.LogoutAllView.as_view(), name='logoutall'), ]
from django.conf.urls import url from todo.views import TodoView from . import views # specific app URL pointable from template app_name = 'todo' urlpatterns = [ # we need to invoke the as_view method on the TodoView class # Any view that inherits from the base View object will have the as_view method # This will allow Django to use the class-based view as a standard function-based view. url(r'^$', TodoView.as_view(), name='todo_all'), url(r'^todo_api_render/', views.todo_api_render, name='todo_api_render'), url(r'^(?P<pk>[0-9]+)/$', TodoView.as_view()) ] ''' 1 click link in base template to link to view 2 view loads template containing the JSON REQUEST 3 template renders the data '''
from django.urls import path from todo.views import TodoView, TodoDeleteView urlpatterns = [ path('', TodoView.as_view(), name='todo-index'), path('index/', TodoView.as_view(), name='todo-index'), path('delete/<pk>/', TodoDeleteView.as_view(), name='todo-delete'), ]
from django.conf.urls import patterns, include, url from django.views.generic import TemplateView import rest_framework from django.contrib import admin admin.autodiscover() from todo.views import TodoDetailView, TodoView urlpatterns = patterns( '', # Examples: # url(r'^$', 'skeleton.views.home', name='home'), # url(r'^skeleton/', include('skeleton.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^admin/', include(admin.site.urls)), url(r'^$', TemplateView.as_view(template_name="todo.html")), url(r'^todos/$', TodoView.as_view(), name='todo-view'), url(r'^todos/(?P<pk>\d+)$', TodoDetailView.as_view(), name='todo-view'), )