I've had that problem when a stylesheet import in my document head used an empty string for the path -- the browser called the same URL as for the document in an attempt to import the stylesheet.
On Oct 17, 11:59 am, hao he <speed...@gmail.com> wrote: > with the follow code/config,one request lead to view function was > execute twice。 > > -------------------------------------------------------------------------------------------------- > url config: > url(r'^ader/basic/(?P<ad_id>[0-9]+)/ > $',ader_basic,name='ad_ader_basic'), > -------------------------------------------------------------------------------------------------- > view function: > def ader_basic(request,ad_id=None,template = "advertise/ > ad_wizard_basic.html"): > print 'ader_basic' > -------------------------------------------------------------------------------------------------- > template: > <a href=" {%url ad_ader_basic ad_id%} "basic info</a> > ----------------------------------------------------------------------------------------------- > Validating models... > 0 errors found > ------------------------------------------------------------------- > submit a request,lead to view_function was called twice! > why? > -------------- > Django version 1.1, using settings 'bxdc_project.settings' > Development server is running athttp://127.0.0.1:8000/ > Quit the server with CTRL-BREAK. > ader_basic #print first time when > [17/Oct/2009 23:48:11] "GET /advertise/ader/basic/2/ HTTP/1.1" 200 > 121201 > [17/Oct/2009 23:48:11] "GET /site_media/blueprint/src/reset.css HTTP/ > 1.1" 304 0 > [17/Oct/2009 23:48:11] "GET /site_media/jquery.js HTTP/1.1" 304 0 > ader_basic # print twice > [17/Oct/2009 23:48:11] "GET /advertise/ader/basic/2/ HTTP/1.1" 200 > 68221 > [17/Oct/2009 23:48:11] "GET /site_media/img/logo.png HTTP/1.1" 304 0 --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---