[web2py] Re: form.accepts returning false

2011-09-07 Thread Rufus

Did you look at form.errors to find out why it returns false?

If form.errors doesn't exist, the accepts() method didn't see
it as having been submitted, and will return false.

See Example 28 in

http://web2py.com/examples/default/examples

for the three cases:  unsubmitted, submitted no error, submitted w/
error

Rufus


[web2py] Re: form.accepts returning false

2011-09-07 Thread Christopher Baron
Form.errors is an empty storage object.

So... it was unsubmitted ?

How is this possible when I'm using the controllers/appadmin.py that
comes with web2py ?

On Sep 7, 2:01 pm, Rufus rufusvsm...@gmail.com wrote:
 Did you look at form.errors to find out why it returns false?

 If form.errors doesn't exist, the accepts() method didn't see
 it as having been submitted, and will return false.

 See Example 28 in

 http://web2py.com/examples/default/examples

 for the three cases:  unsubmitted, submitted no error, submitted w/
 error

 Rufus


[web2py] Re: form.accepts returning false

2011-09-07 Thread Cliff
If your form doesn't have the default hidden fields, the controller
assumes it's a resubmit and fails silently.

Check out the book, Chapter 7, SQLFORMS.

But why would you want to do this?

On Sep 7, 2:05 pm, Christopher Baron cba...@fieldmuseum.org wrote:
 Hi web2py users,

 When trying to update a row in a database table using the appadmin
 interface, it does not work.  The same page returns with the original
 values.

 In the appadmin controller, form.accepts is returning false - this may
 have to do with a hack I've made to the controllers.appadmin.py file
 ( I've made changes such that one can access the appadmin remotely
 without an ssh tunnel or https )

 How do I debug the form.accepts function in gluon ?

 How can I make changes to the gluon.sqlhtml code and reload these
 changes?

 Thanks in advance,

 Chris


[web2py] Re: form.accepts returning false

2011-09-07 Thread Christopher Baron
I don't believe I've taken the hidden fields out.  The only thing I've
changed in controllers/appadmin.py deals with redirection based on a
remote user.

I've written my own workaround, so I guess no one has to spend any
more time dealing with this.  Thanks for the assistance.

On Sep 7, 3:11 pm, Cliff cjk...@gmail.com wrote:
 If your form doesn't have the default hidden fields, the controller
 assumes it's a resubmit and fails silently.

 Check out the book, Chapter 7, SQLFORMS.

 But why would you want to do this?

 On Sep 7, 2:05 pm, Christopher Baron cba...@fieldmuseum.org wrote:







  Hi web2py users,

  When trying to update a row in a database table using the appadmin
  interface, it does not work.  The same page returns with the original
  values.

  In the appadmin controller, form.accepts is returning false - this may
  have to do with a hack I've made to the controllers.appadmin.py file
  ( I've made changes such that one can access the appadmin remotely
  without an ssh tunnel or https )

  How do I debug the form.accepts function in gluon ?

  How can I make changes to the gluon.sqlhtml code and reload these
  changes?

  Thanks in advance,

  Chris


[web2py] Re: form.accepts returning false

2011-09-07 Thread Cliff
Okay.

You can verify what you are getting back from the browser by putting

print request.post_vars

in your controller right after the call to form.accepts().

Assuming you are using Rocket, the output will show up in the terminal
window where you started web2py.py.

On Sep 7, 4:15 pm, Christopher Baron cba...@fieldmuseum.org wrote:
 I don't believe I've taken the hidden fields out.  The only thing I've
 changed in controllers/appadmin.py deals with redirection based on a
 remote user.

 I've written my own workaround, so I guess no one has to spend any
 more time dealing with this.  Thanks for the assistance.

 On Sep 7, 3:11 pm, Cliff cjk...@gmail.com wrote:







  If your form doesn't have the default hidden fields, the controller
  assumes it's a resubmit and fails silently.

  Check out the book, Chapter 7, SQLFORMS.

  But why would you want to do this?

  On Sep 7, 2:05 pm, Christopher Baron cba...@fieldmuseum.org wrote:

   Hi web2py users,

   When trying to update a row in a database table using the appadmin
   interface, it does not work.  The same page returns with the original
   values.

   In the appadmin controller, form.accepts is returning false - this may
   have to do with a hack I've made to the controllers.appadmin.py file
   ( I've made changes such that one can access the appadmin remotely
   without an ssh tunnel or https )

   How do I debug the form.accepts function in gluon ?

   How can I make changes to the gluon.sqlhtml code and reload these
   changes?

   Thanks in advance,

   Chris