On 09-12-11 01:28, Jim Byrnes wrote:
from django.conf.urls.defaults import * from mysite import views from mysite.views import hello, current_datetime, hours_ahead, display_meta from django.contrib import admin from mysite.contact import views from mysite.books import viewsadmin.autodiscover() urlpatterns = patterns('', (r'^hello/$', hello), (r'^time/$', current_datetime), (r'^time/plus/(\d{1,2})/$', hours_ahead), (r'^admin/' , include(admin.site.urls)), (r'^contact/$',views.contact), (r'^search-form/$', views.search_form), #from mysite.books (r'^search/$', views.search), # from mysite.books )
mysite.contact.views might very well have a contact() method, but mysite.books.views probably does not.
And you're importing 'views' a couple of times at the top. The last "from mysite.books import views" is winning :-) You cannot have one variable point to several things at the same time.
Best thing you can do: import mysite.contact.views import mysite.books.views ... (r'^contact/$', mysite.contact.views.contact), Reinout -- Reinout van Rees http://reinout.vanrees.org/ [email protected] http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

