I\'m new to Django and working my way through \"The Django Book\" by Holovaty and Kaplan-Moss. I have a project called \"mysite\" that contains two applications called \"books\
Disclaimer: Not a Django answer
The problem is with these two lines:
from books import views
from contact import views
The second import is shadowing the first one, so when you use views
later you're only using the views
from contact
.
One solution might be to just:
import books
import contact
urlpatterns = patterns('',
...
(r'^search/$', books.views.search),
(r'^contact/$', contact.views.contact),
...
I'm not sure, but I also think that you don't actually need to import anything and can just use strings in your pattern, something like: 'books.views.search'
.
Another possiblity is to follow Simon Visser suggestion:
from books.views import search
from contact.views import contact