Wednesday, January 31, 2018

Django

Hello, I am studying Django for my new project.
I am confronting very basic problem. 
In Tutorial Part1. Request and Response, Django Documentation, following sorce code is there.
 But I cannot find path function in "~/django.urls" directory.
Can a function be imported which has no defintion in "from location"?


polls/urls.py
from django.urls import path    from . import views    urlpatterns = [      path('', views.index, name='index'),  ]

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0e088428-2daa-4ce1-b089-95e30d129948%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment