[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] How to get the last few records except the last record

2017-10-25 Thread Maurice Waka
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) except the very last record(last record posted to the db) from the db. I have tried: records = db(db.post.author == auth.user_id).select(orderby=(db.post.ALL,

[web2py] Re: do LOAD statements work in layout.html?

2017-10-25 Thread Dave S
On Wednesday, October 25, 2017 at 3:55:13 PM UTC-7, Dave S wrote: > > Last night, I thought I had it working. Today it doesn't seem to be. > > (I wanted to have a blurb on the page, and also be able to show the blurb > as an specific page). > > The specific page still works, using blurb.html,

[web2py] do LOAD statements work in layout.html?

2017-10-25 Thread Dave S
Last night, I thought I had it working. Today it doesn't seem to be. (I wanted to have a blurb on the page, and also be able to show the blurb as an specific page). The specific page still works, using blurb.html, but the blurb doesn't show on other pages with blurb.load. I don't even see

Re: [web2py] Re: sistemExit during scheduler execution

2017-10-25 Thread Manuele Pesenti
Il 25/10/17 08:56, Dave S ha scritto: > Line 166 is the error handler after a try: run_models_in() .  Anything > unusual about the models for this app? > Do you see an exception printed (on the console -- sys.stderr is used) > with the stack trace? > > /dps Thank you Dave for your answare. I'm

[web2py] Re: New syntax error?

2017-10-25 Thread Dave S
On Wednesday, October 25, 2017 at 6:03:10 AM UTC-7, Anthony wrote: > > I cannot reproduce, and I can't think of anything web2py would be doing > that would be relevant, as this is a standard Python exception. I was > thinking maybe you switched to Python 3, but in that case, I would expect a

[web2py] Re: limiting the SSL max fragment size on development server (Rocket)

2017-10-25 Thread Dave S
On Wednesday, October 25, 2017 at 6:18:08 AM UTC-7, icodk wrote: > > Some small IoT units can't afford the standard 16K fragment size required > by default for SSl negotiation. > On some servers it is possible to set such limit, ex > nginx: ssl_buffer_size 4k; > > Is it possible to do the

Re: [web2py] Make a form and edit multiple rows in web2py

2017-10-25 Thread Dave S
On Wednesday, October 25, 2017 at 7:01:33 AM UTC-7, Richard wrote: > > Use sqlform.factory and custom.form and web2py helpers and you create an > html table with you fields into... with sqlform.factory you can use > field().clone() method to manager field attributes like requires and you >

[web2py] Re: MySQL, self-reference, and null values

2017-10-25 Thread Dave S
On Wednesday, October 25, 2017 at 9:54:08 AM UTC-7, Oasis Agano wrote: > > Has this issue been solved still facing it after 4 years on mysql > > Dunno. In the current tracking system, I'd expect the imported issue to show up on this page:

Re: [web2py] Make a form and edit multiple rows in web2py

2017-10-25 Thread Richard Vézina
Use sqlform.factory and custom.form and web2py helpers and you create an html table with you fields into... with sqlform.factory you can use field().clone() method to manager field attributes like requires and you will have to manually insert, update you model and db.commit() since facotry doesn't

[web2py] limiting the SSL max fragment size on development server (Rocket)

2017-10-25 Thread icodk
Some small IoT units can't afford the standard 16K fragment size required by default for SSl negotiation. On some servers it is possible to set such limit, ex nginx: ssl_buffer_size 4k; Is it possible to do the same on web2py development server ? -- Resources: - http://web2py.com -

[web2py] Make a form and edit multiple rows in web2py

2017-10-25 Thread Joilson Quinteiro
Hi all, Anyone can help me this question? ? its very importante to me. Give me one example please. -- 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) ---

[web2py] Re: New syntax error?

2017-10-25 Thread Anthony
I cannot reproduce, and I can't think of anything web2py would be doing that would be relevant, as this is a standard Python exception. I was thinking maybe you switched to Python 3, but in that case, I would expect a more specific error message indicating the parentheses are missing (unless

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

2017-10-25 Thread mostwanted
*OK I JUMPED THE GUN & GOT TOO EXCITED WAAAY TO EARLY! I'M STILL FACED WITH THE SAME PROBLEM, I MADE ONE ENTRY WHEN TRYING TO MAKE ANOTHER THE SAME PROBLEM CROPS UP FOREIGN KEY constraint failedI'M SERIOUSLY LOST COZ I THOUGHT I NAILED IT! PLEASE HELP ME!!!* On Wednesday, October 25, 2017

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

2017-10-25 Thread mostwanted
*PLEASE ALLOW ME TO RECTIFY MYSELF, LOOKING AT THE SCREEN 6HRS STRAIGHT IS NOT HEALTHY, ONE ENDS UP MAKING REALLY STUPID MISTAKES AND CALLING ON EVERYONE TO ASSIST THEM! LIKE I DIDthis is wrong!!* *{{=students.guardian.guardian}}this must be{{=students.guardian.surname}} thanks for

Re: [web2py] Re: migrating database and updating it

2017-10-25 Thread Yebach
So this is the whole procedure I did at the end and it seems to do the trick 1. create a folder for your new app (WoShiTest) 2. copy production version there 3. delete content of sessions, error and DATABASE folders 4. in 0.py set db connection string 5. set migrate = True and

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

2017-10-25 Thread mostwanted
*WHEN I TRY ENTERING A STUDENT'S DETAILS AND SELECTING THEIR GUARDIAN AS FROM THE DROP DOWN MENU AS REFERNCED I GET A FOREIGN CONSTRAINT FAILED ERROR MESSAGEMY TABLES* db.define_table('guardian', Field('surname', requires=IS_NOT_EMPTY()), Field('name',

[web2py] Re: New syntax error?

2017-10-25 Thread Dave S
On Monday, October 23, 2017 at 3:38:27 PM UTC-7, Dave S wrote: > > In my 2.15.x testing, I've been concentrating on the https interface, but > I now tried to do a -M -S that would queue up a Scheduler task. And I ran > into an unexpected problem with syntax errors on print statements. > >

[web2py] Re: sistemExit during scheduler execution

2017-10-25 Thread Dave S
On Tuesday, October 24, 2017 at 1:06:02 PM UTC-7, Manuele wrote: > > Hi *! > > What could be the reason of the subsequant traceback during a scheduler > function execution? > > "Traceback (most recent call last): File > "/home/colouree/web2py/gluon/scheduler.py", line 293, in executor >