Python Forum

Full Version: how does importing work in django framewok ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am new to python . Im learning django web framework . 

I dont understand how these lines of code works ?

at urls.py these two lines of code : 

from django.conf.urls import url
from . import views
in django\conf\urls I dont see any module with "url" name .how does it work actually?

and another question is how does " from . import views" work ? I dont understand this line of code .
in the  /django/conf/urls/__init__.py you have url function.

for the second import see
https://docs.python.org/2/tutorial/modul...references