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 at
http://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