Hello,
I have a small personal website on PythonAnywhere (great!!), based on web2py.
It includes a small sqlite database. I have a (rather complex) query which perfectly worked until some days ago that doesn't work anymore.
The query uses the SQL Random() function as indicated by web2py docs:
rows = db(...).select(..., orderby='<random>')
It doesn't return me a random set of rows but rather always the same rows, starting from the beginning of the possible matching rows. I tried to address the problem without success. I also tried not using the web2py dialect and replacing it with
import random
rows=db(...).select().sort(lambda row: random.random())
as explained in the web2py doc. No success either.
I checked on my pc that the query is OK (I downloaded the database and tried the same query which perfectly works).
Could anybody tell me if PythonAnywhere changed anything in the config so that the Random() function could not be executed anymore (I know that random doesn't work on Google NoSQL) ? Or give me some hints ...
Thanks in advance Dom