Hi all,

I have a web2py app in which following is the snippet of index action in 
controller:

def index():
    form = SQLFORM.factory(Field('your_name',  requires=IS_NOT_EMPTY()),
                           Field('birth_date','date', 
requires=IS_NOT_EMPTY())).process()
    if form.accepted:
        session.flash='Form Accepted'
        redirect(URL('other',vars={'your_name': form.vars.your_name}))
    elif form.errors:
        response.flash='Form contains errors'
    else:
        response.flash='Form displayed for the first time'
    return locals()

Now, after I submit the correct entries in the form (it is next redirected 
to other page as seen in snippet) and then click my (chrome) browser's back 
button, it works fine , by being redirected to index page. 

Problem comes here:

1: Suppose I leave field of "birth_date" empty and then submit.
2: It produces error message.
3: Enter the correct and valid entries, and press submit.
4: Redirected to another page, successfully.
5: Press the browsers back button, there is an error "ERR_CACHE_MISS" with 
a message prompted as "Confirm Form Resubmission".

After the 5th step, it should be successfully redirected to index page, but 
it does not happen so.

Is it inherent feature of SQLFORM.factory()?, if not please help me debug 
this issue. Cheers!  


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to