Code

Changes between Version 2 and Version 3 of searchengine


Ignore:
Timestamp:
08/15/06 02:08:35 (8 years ago)
Author:
antoni.aloy@…
Comment:

with the previous print print does not worked for me

Legend:

Unmodified
Added
Removed
Modified
  • searchengine

    v2 v3  
    4444 
    4545    if request.POST: 
    46         print print request.POST['term'] 
     46        print request.POST['term'] 
    4747        return HttpResponseRedirect("/") 
    4848    else: 
     
    6262When we enter the main page - http://localhost:8080/ we will see the form. When we enter a term and send the form we will be redirected to the main page. The form works. Note the: 
    6363{{{ 
    64 print print request.POST['term'] 
     64print request.POST['term'] 
    6565}}} 
    6666in the view. You should see the term from the form in the terminal with running django server. '''request.POST''' is a dictionary like object which we can easily access (key is the form field name).