Two types:
1. function object (need import view function)
2. string (don’t need to import)
——————
from django.conf.urls.defaults import *
from mysite.views import hi
urlpatterns = patterns(‘ ‘,
(r’^hi/$’, hi),
(r’^hello/$’, ‘mysite.views.hello’),
)
——–
Note in the first example,
hi
is a function object. This means you need to import the view function.
In second example,
‘mysite.views.hello’
is a string.
Here you don’t need to import it (Django will figure out)
