On Mon, Sep 22, 2008 at 11:52 AM, Caisys <[EMAIL PROTECTED]> wrote: > > Hi, > I am following the tutorials on django website. My problem is that > when i create url conf for views that do not exist, the admin site > ceases to work. > Mysite\urls.py includes: > (r'^admin/(.*)', admin.site.root), > (r'^polls/', include('mysite.polls.urls')), > Mysite\Polls\urls.py includes: > urlpatterns = patterns('mysite.polls.views', > (r'^$', 'index'), > (r'^(?P<poll_id>\d+)/$', 'detail'), > (r'^(?P<poll_id>\d+)/results/$', 'results'), > (r'^(?P<poll_id>\d+)/vote/$', 'vote'), > > ) > > The thing is results & votes views do not exist yet, so I can > understand if they generate an error, but why does a reequest to http:\ > \127.0.0.1:8000\admin generate an error : 'module' object has no > attribute 'vote' > ??? > Thanks > > Admin uses reverse url lookups to generate links on the admin pages. Reverse lookups require that all your urlpatters be valid, since it scans through them all. Therefore it's best not to include not-yet-implemented stuff in your urlpatters, just comment them out until you really do implement the functions.
Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---