Thanks Antony This did the trick, I think it is a serious bug (.. but all
bugs are serious:-)
Regarding the Add button, I removed the authentication to make it simpler
for testers to see the bug. I do have it in my app.
Now we can move to the next "bug":
If I do have an Add button but I add the folowing after the grid creation:
grid = SQLFORM.grid(db.place)
for a in grid.elements('input',_name='mode'):# disable mode change. can be
done on a separate form
a['_disabled']=''
to manipulate the html so the radio button will be disable on the edit/new
forms, then I can't add new records
I get the new record form but clicking on submit the form stays and a
record is not added.
I do it because I don't want the user to set the place mode on the edit
form but to use a form specifically for that
I have also another issue (now that I have your attention:):
Some times in my development process the session.flash functionality
changed so the flash message blinks a few times and disappears. Only a thin
line is left
in the color of the flash window. If I click on it it vanished exactly like
the flash window. Something similar is happening also to errors on a form
if I don't fill a field that is required then the red error message blinks
a few times and disappears. I get it all over the app also in the login
dialog, the e-mail requires blinks and vanished. If I click the login
button a few times the error message eventually stays..
( this issue is no demonstrated in the app i attached)
Could you please point me to the right direction ?
Thanks
On Friday, July 17, 2015 at 10:48:46 PM UTC+2, Anthony wrote:
>
> For now, one workaround might be to do this right before defining the grid:
>
> db.place.mode.type = 'integer'
>
> In that case, because the grid won't think the field is a "reference"
> field, it will not attempt to cache the output of the "represent" function.
>
> Also, you probably don't see an "Add" button because you are not logged in
> (login is required, unless you set user_signature=False, which is not
> recommended).
>
> Anthony
>
> On Friday, July 17, 2015 at 4:38:05 PM UTC-4, Anthony wrote:
>>
>> You have found a bug, which I have submitted here:
>> https://github.com/web2py/web2py/issues/1024
>>
>> Thanks for putting this together.
>>
>> Anthony
>>
>> On Friday, July 17, 2015 at 1:53:36 PM UTC-4, icodk wrote:
>>>
>>> The attached app is a simple two tables app that demonstrates
>>> smart/grid bug in represent settings:
>>> the line :
>>> db.place.mode.represent=lambda mode,row: A(T(db.place_mode[mode].name),
>>> _href=URL('place_mode_change',args=row.id))
>>> should generate a link with specific row.id for each row. However, if
>>> the text(in this case the mode db.place_mode[mode].name) is the same
>>> for more then one row, the row.id will not be updated.
>>> In addition, the Add Record button is missing for no obvious(for me )
>>> reason
>>>
>>> 2.10.4-stable+timestamp.2015.04.26.15.11.54
>>> (Running on Rocket 1.2.6, Python 2.7.9)
>>>
>>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.