pydal | Remap your specific keyboard to execute custom scripts | Keyboard library
kandi X-RAY | pydal Summary
kandi X-RAY | pydal Summary
Remap your specific keyboard to execute custom scripts!
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pydal
pydal Key Features
pydal Examples and Code Snippets
Community Discussions
Trending Discussions on pydal
QUESTION
I believe i am following the code here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=insert#sum-avg-min-max-and-len
The insert works fine. The max() lines gives an error: pydal.objects.Expression object at 0x0000024D079AF748
What am I doing wrong?
The model:
...ANSWER
Answered 2020-Mar-28 at 00:10You're not getting an error. Rather, you are returning two PyDAL Expression
objects (the .max()
method of a DAL Field
object returns an Expression
object). If you are then trying to include those objects in your view, they will be converted to strings, and when you convert an arbitrary Python object to a string, you get a default string representation of the object like .
Presumably what you meant to do was to query the database to find the max name (which would be the last one alphabetically) and the max id
. To get those values, you can do something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pydal
pyevdev - Debian has a package python3-evdev
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page