[web2py] Re: How to get the last few records except the last record

2017-10-25 Thread sesenmaister
records = db(db.post.author == auth.user_id).select(orderby=(db.post.ALL, limitby=(0,10))*[:-1]* On Thursday, October 26, 2017 at 7:03:00 AM UTC+2, Maurice Waka wrote: > > If using the code: limitby=(0,10) am able to get the last 10 records, Is > there a way to get the same(last few records) e

[web2py] Re: IntegrityError('FOREIGN KEY constraint failed',)

2017-10-25 Thread sesenmaister
Hi, your shown code is incomplete. It seems you are doing an insert or update to the db. This "FOREIGN KEY constriaint failed" is meaning that in one of your referenced fields [db.student.guardian, db.student.class_name] you tried to reference a registry that doesn't exist on the parent tables

[web2py] Re: IS_NOT_EMPTY_OR(IS_IN_SET((),multiple=True))

2016-05-09 Thread sesenmaister
When using the validator IS_IN_SET(..) , it will require the values are in the set. So it will require not to be empty. On Sunday, May 8, 2016 at 6:51:23 PM UTC+2, billmac...@gmail.com wrote: > > I would like to have a set that requires to be not empty. But looking at > the documentatio

[web2py] Re: How To Select Only The Latest Rows from a Table

2016-05-09 Thread sesenmaister
What does mean "DOES NOT WORK? Are you getting an OperationalError? Use the argument *groupby *instead of *distinct*, and you'll get the desired results. On Sunday, May 8, 2016 at 9:33:44 AM UTC+2, PRACHI VAKHARIA wrote: > > > > *How To Select Only The Latest Rows from a Table* > > For a Table

Re: [web2py] Re: Table.import_from_csv_file preserving ids

2016-03-04 Thread sesenmaister
For the record, To import preserving ids, import_from_csv_file() needs as parameters: (given a csv with `id` column and not using another unique column (ex. `uuid`)) *id_offset = {} id_map = None* If the table is not empty, it's needed to tuncate() before importing, or use parameter restore=T

[web2py] Re: truncate() not resetting the counter id in one table

2012-06-13 Thread sesenmaister
Di Pierro wrote: > > > db.table.truncate just runs the sql "TRUNCATE TABLE table". There is > basically no web2py logic outside the SQL. Which database are you using? Is > there an event that triggered the change in behavior? > > > On Wednesday, 13 June 2012 21

[web2py] truncate() not resetting the counter id in one table

2012-06-13 Thread sesenmaister
Some evil happended, and truncate() has stopped working properly in editor: doesn't reset the counter id, as did before, but only for one of my tables. def cleaning_db(): > db.table1.truncate() > db.table2.truncate() > > def myAction(): > cleaning_db() > db.table1.insert(car='c

[web2py] Re: For all users using web2py editor on Firefox: solution to the "blurry" or "ghosty" text

2012-06-07 Thread sesenmaister
Sorry, the good value for *document.getElementById('** textarea').style.opacity* is *0.1* Value 0, is thiner than in chrome and the cursor disappear.

Re: [web2py] Hosting services recommendation

2012-06-06 Thread sesenmaister
lot of thanks Anthony, now that fluxflex is going down this link pointed me to new valid options jsesen El viernes, 6 de enero de 2012 15:54:41 UTC+1, Anthony escribió: > > See https://groups.google.com/d/topic/web2py/e2SL5ViOhL4/discussion

Re: [web2py] Fluxflex will be shut down and no longer available on June 30, 2012

2012-06-06 Thread sesenmaister
Andrew, I have the same question. Today I wanted to get payed hosting on FluxFlex. And now I have no idea where to go. I'm not pro, stdudying python and web2py for pleasure, I've got no idea how to install web2py in a "normal" server and have no idea if all hostings permit that. So FluxFlex was

[web2py] For all users using web2py editor on Firefox: solution to the "blurry" or "ghosty" text

2012-06-04 Thread sesenmaister
When using the web2py editor on firefox, text gets 1 pixel fatter, and makes the sensation of being blurry. I've got friends that seem comfortable with this little effect. But it disturbed me a lot, and therefore I went to Chrome, where the text appears just how it must. And I was some upset

[web2py] For all users using web2py editor on Firefox: solution to the "blurry" or "ghosty" text

2012-06-04 Thread sesenmaister
When using the web2py editor on firefox, text gets 1 pixel fatter, and makes the sensation of being blurry. I've got friends that seem comfortable with this little effect. But it disturbed me a lot, and therefore I went to Chrome, where the text appears just how it must. And I was some upset,

[web2py] Re: Why the web2py shell returns different results?

2012-05-16 Thread sesenmaister
1.-both editor and shell use different type of encofing: sure 2.-both editor and shell throw the same answer: yes >>> import sys >>> sys.stdin.encoding ‘cp850' 3.-both editor and shell throw the same answer: yes >>>import sys >>>sys.getdefaultencoding() 'ascii' 4.-due to my lack of knowledge, I

Re: [web2py] Why the web2py shell returns different results?

2012-05-09 Thread sesenmaister
El miércoles, 9 de mayo de 2012 22:48:29 UTC+2, Ricardo Pedroso escribió: > > On Wed, May 9, 2012 at 7:56 PM, sesenmaister > wrote: > > When I use web2py 1.99.7 shell (web2py.exe -S welcome) : > > > >>>> unicode('Äpple','utf-8') >

[web2py] Why the web2py shell returns different results?

2012-05-09 Thread sesenmaister
When I use web2py 1.99.7 shell (web2py.exe -S welcome) : >>> unicode('Äpple','utf-8') Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'utf8' codec can't decode byte 0x8e in position 0: unexpected code byte >>> unicode('Äpple','iso-8859-1') u'\x8epple' When running