Whoops - true sign of a neophyte.

Is there a reason why web2py uses names as opposed to IDs?

On Monday, March 4, 2013 3:20:15 PM UTC-5, Anthony wrote:
>
> Looks like you don't assign names to any of the selects, so their values 
> are not passed via request.post_vars (and therefore don't make it into 
> form.vars).
>
> On Monday, March 4, 2013 11:54:23 AM UTC-5, Anthony Bond wrote:
>>
>> The values shouldn't be null - it should be a int value from between 0 
>> and 5.  Even if the user didn't select any items, the default value will 
>> still be 0 from the drop down list.
>>
>> On Monday, March 4, 2013 11:51:01 AM UTC-5, Anthony wrote:
>>>
>>> Did you previously define that column with notnull=True? If so, you may 
>>> need to alter that column directly in MySQL so it allows null values.
>>>
>>> Anthony
>>>
>>> On Monday, March 4, 2013 11:41:05 AM UTC-5, Anthony Bond wrote:
>>>>
>>>> I've fixed the issue with the variable names by prefixing a letter to 
>>>> the variable.  However, the insert still does not function.  Here's the 
>>>> error:
>>>>
>>>> 127.0.0.1.2013-03-04.11-38-23.96eaf75d-0524-4eb8-8848-6000d1993dcd
>>>> <class 'gluon.contrib.pymysql.err.InternalError'> (1048, u"Column 
>>>> 'Q4_3A' cannot be null")
>>>>
>>>> Traceback (most recent call last):
>>>>   File "gluon/restricted.py", line 212, in restricted
>>>>   File 
>>>> "C:/Users/abond2/Desktop/web2py/web2py/web2py/applications/Teacher_Evaluation_System/controllers/evaluation.py"
>>>>  
>>>> <http://127.0.0.1:8000/admin/default/edit/Teacher_Evaluation_System/controllers/evaluation.py>,
>>>>  line 84, in <module>
>>>>   File "gluon/globals.py", line 193, in <lambda>
>>>>   File "gluon/tools.py", line 2929, in f
>>>>   File 
>>>> "C:/Users/abond2/Desktop/web2py/web2py/web2py/applications/Teacher_Evaluation_System/controllers/evaluation.py"
>>>>  
>>>> <http://127.0.0.1:8000/admin/default/edit/Teacher_Evaluation_System/controllers/evaluation.py>,
>>>>  line 28, in Take_Eval
>>>>   File "gluon/dal.py", line 7918, in insert
>>>>   File "gluon/dal.py", line 1176, in insert
>>>> InternalError: (1048, u"Column 'Q4_3A' cannot be null")
>>>>
>>>>
>>>> line 28, in Take_Eval refers to the insert method.  Just a thought - do I 
>>>> need to append something extra to "form.vars.Q4_3A" to get the value of 
>>>> that particular drop down list?
>>>>
>>>>
>>>> On Sunday, March 3, 2013 2:34:29 PM UTC-5, Alan Etkin wrote:
>>>>>
>>>>> > My attempts at resolving this issue have made the implementation of 
>>>>> the form much simpler, but I'm still unable to get the code to 
>>>>> > compile after I put the insert in.  I would appreciate and 
>>>>> assistance you could provide in enlightening me as to why that insert 
>>>>> > statement would not compile.
>>>>>
>>>>> Could you post the relevant part of the error ticket?
>>>>>
>>>>>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to