This shouts : 'str' object not callable
urlpatterns = patterns('',
(r'^first/$','firstsite'),
This works fine :
urlpatterns = patterns('',
(r'^first/$',firstsite),
First argument in ``patterns`` factory method is like the starting point
for all views that should be called. Moreover, you may pass function view
as a callable object or as a string but in this case your starting point
has to be hooked first.
So, if for instance, your view method 'firstsite' is in module 'mysite.views'
you have to pass full module-path here ('mysite.views.firstsite') or hook 'mysite.views'
as starting point (first argument of patterns method). Like that:
> urlpatterns = patterns('mysite.views',
> (r'^first/$','firstsite'),
or if you don't want to specify starting point:
> urlpatterns = patterns('',
> (r'^first/$','mysite.views.firstsite'),
Hope it helps
> --
>
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>