[web2py] Re: scheduler isn't starting

2014-10-15 Thread Niphlod
if even you can't reproduce, its hard to pinpoint what you're doing wrong. On Thursday, October 16, 2014 12:24:29 AM UTC+2, Júlia Rizza wrote: > > Ok, I reproduced all the steps in a new app and everything went ok. But I > still can't see why it is not working in an specific app, since it does no

[web2py] Re: Refresh DIV onclick

2014-10-15 Thread LoveWeb2py
UPDATE: This works well for me after the form submits: redirect( request.env.http_web2py_component_location,client_side=True) That came straight from the book, but its when the student gets a question wrong is where I'm running into trouble. I'd like to just refresh the div so they could contin

[web2py] Refresh DIV onclick

2014-10-15 Thread LoveWeb2py
I tried to search through most of the forums before submitting my question but I couldn't seem to find what I was looking for. When a user submits their answer I would like to do two things: if it is accepted and its corrected I would like to refresh the page, but if its not correct I would jus

[web2py] Re: nested for loop and pass in view

2014-10-15 Thread LoveWeb2py
Took in your suggestions, Anthony and my code worked. Thank you so much for dedicating so much time towards helping others. I think I speak for everyone when I say you're very much appreciated!! On Wednesday, October 15, 2014 9:44:32 PM UTC-4, Anthony wrote: > > On Wednesday, October 15, 2014 8:

[web2py] Re: nested for loop and pass in view

2014-10-15 Thread Anthony
On Wednesday, October 15, 2014 8:05:57 PM UTC-4, LoveWeb2py wrote: > > Hi Anthony, > > I think that part is correct. > In your original code, the inner loop looped over correct_questions, but in the menu items, you did not reference the correct_questions item and instead referenced the question

[web2py] Re: postgres schemas rname issue

2014-10-15 Thread libertil
My bad!! I just realized I had a stupid typo in my model. It works fine now. Sorry > > -- 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 t

[web2py] Re: nested for loop and pass in view

2014-10-15 Thread LoveWeb2py
Hi Anthony, I think that part is correct. Here is the return from my request: correct_questions: 26: answered_by: 1L correct: True id: 26L last_update: datetime.datetime(2014, 10, 13, 19, 49, 6) question: 5L submitted: Yes 35: answered_by: 1L correct: True id: 35L last_update: datetime.datetime(2

[web2py] Re: nested for loop and pass in view

2014-10-15 Thread Anthony
The element in the inner loop only references the question variable, which is set in the outer loop. Perhaps instead of question, you menat to put correct_questions[record]. Anthony On Wednesday, October 15, 2014 7:03:39 PM UTC-4, LoveWeb2py wrote: > > Hello I'm trying to create a menu for

[web2py] Re: What are .table files in sqlite databases?

2014-10-15 Thread Yi Liu
Thank you very much for your quick and complete answer, Leonel! -- Yi On Wednesday, October 15, 2014 4:13:33 PM UTC-7, Leonel Câmara wrote: > > Table files have nothing to do with sqlite. They are files generated by > web2py with the table structure, to detect changes and perform migrations. >

[web2py] Re: What are .table files in sqlite databases?

2014-10-15 Thread Leonel Câmara
Table files have nothing to do with sqlite. They are files generated by web2py with the table structure, to detect changes and perform migrations. You don't necessarily need to keep them in your backups, you can do a fake migration to generate them again. -- Resources: - http://web2py.com - ht

[web2py] What are .table files in sqlite databases?

2014-10-15 Thread Yi Liu
Dear all, I am trying to backup my sqlite databases using its backup API: sqlite3 storage.db ".backup db.bak" I noticed it made a copy of storage.db. But how about all those .tables files. I search about sqlite and web2py, seems nothing came up about them. Using ls -l, I can tell most these .t

[web2py] nested for loop and pass in view

2014-10-15 Thread LoveWeb2py
Hello I'm trying to create a menu for users who have already answered a question correctly. The questions are stored in the database, but for some reason my double for loop displays 10 of the same question. When I try my logic using python web2py.py -S myapp -M the logic works fine, however

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Júlia Rizza
Ok, I reproduced all the steps in a new app and everything went ok. But I still can't see why it is not working in an specific app, since it does not return any error or relevant debug info. What could be the reason for it to assign no tasks while I have at least 3 tasks on db? Em quarta-feira,

Re: [web2py] Re: Item in ``from list'' not a string (custom_import.py) web2py 2.9.11

2014-10-15 Thread Luciano Laporta Podazza
Hi again, So a friend of mine helped me solving the issue, on gluon/custom_import.py, on line 82 we have to replace this line: modules_prefix, globals, locals, [itemname], level) With this one: modules_prefix, globals, locals, [itemname*.encode('utf-8')*], level) And that's all!. Thanks for y

Re: [web2py] Re: How to delete session file on logout

2014-10-15 Thread Anthony
> In the current version of web2py, the default behavior is that upon >> logout, the session is cleared and renewed (i.e., a new session ID is >> issued). However, it does not delete the old session file. >> > When you say it "somehow doesn't work," do you just mean the old session >> file re

[web2py] postgres schemas rname issue

2014-10-15 Thread libertil
Hi, I am dealing with postgreSQL database with a fair number of tables and I currently group logically similar tables under different schemas.Now when I create the model I following the examples I was able to specify the schema using the rname. However I have issues when linking records from ta

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Niphlod
With that record and the correct parameter, task needs to be executed. There's probably an issue on how you're starting it. If you are sure everything is in place, pack a minimal app to reproduce the behaviour. On Wednesday, October 15, 2014 5:45:04 PM UTC+2, Júlia Rizza wrote: > > yeah, I forgo

[web2py] Re: return tail of a text log file

2014-10-15 Thread Dave S
On Wednesday, October 15, 2014 10:43:23 AM UTC-7, Dave S wrote: > > > > On Tuesday, October 14, 2014 3:23:15 PM UTC-7, Vin wrote: >> >> Hi all, >> >> I need to stream a text log file via web2py. The file is generated by a >> python script that runs outside web2py, but is saved to the "uploads"

[web2py] Re: Apostrophe causes new column in PYFPDF

2014-10-15 Thread Leonel Câmara
I have found the problem. It's not the HTML helpers that are escaping twise. The problem is that gluon.contrib.generics.pyfpdf_from_html calls sanitize on the input. >>> P("Row's").xml() 'Row's' >>> from gluon.sanitizer import sanitize >>> sanitize('Row's') 'Row's' >>> sanitize('Row's', esc

Re: [web2py] Re: How to delete session file on logout

2014-10-15 Thread Mandar Vaze / मंदार वझे
On Wed, Oct 15, 2014 at 1:06 AM, Anthony wrote: > On Tuesday, October 14, 2014 2:18:05 PM UTC-4, Mandar Vaze wrote: >> >> (This is related to security issue - I've explained the security issue in >> detail to Massimo and anthony separately) >> >> I want the session to be "invalid" as soon as afte

[web2py] GRID selectable inside component

2014-10-15 Thread LaDarrius Stewart
I have a grid inside a component inside a component which has selectable set to run a function that assigns the ids to a session variable. When inside the component it does not work when i click submit I can tell that the page is being reloaded but the callback does not run. I know that the cod

[web2py] Re: return tail of a text log file

2014-10-15 Thread Dave S
On Tuesday, October 14, 2014 3:23:15 PM UTC-7, Vin wrote: > > Hi all, > > I need to stream a text log file via web2py. The file is generated by a > python script that runs outside web2py, but is saved to the "uploads" > folder. > > This is what I have in a controller called 2.py: > > def index(

[web2py] Re: Upload to static folder in other application

2014-10-15 Thread Annet
Hi Anthony, Thanks for your reply. I tried your code and it works. I have a related question, I have a table grp_subgroup which apart from fields groupID, imageFilename and image, also contains fields name and description in a function I have the following code to store the original file name:

[web2py] return tail of a text log file

2014-10-15 Thread Vin
Hi all, I need to stream a text log file via web2py. The file is generated by a python script that runs outside web2py, but is saved to the "uploads" folder. This is what I have in a controller called 2.py: def index(): > import os > path=os.path.join(request.folder,'uploads','log.log'

[web2py] Web2py + Google Cloud Endpoints: There is a way to make them work together ?

2014-10-15 Thread Cláudio Bastos
Hi, i'm struggling to make Web2py and Google Cloud Endpoints work together. When I change app.yaml to include : - url: /_ah/spi/.* script: my_api.application libraries: - name: pycrypto version: "2.6" it tells me : INFO 2014-10-14 23:42:24,845 module.py:659] default: "POST > /_ah/

[web2py] Re: french web2py developper in paris

2014-10-15 Thread eric cuver
I am looking for developers who are paid for intervening to training sessions evening and training period for several beginners in code or for people who want to create prototypes for their startup. as to how people are ruby. there will be training in html, javascript and python and web2py. the

Re: [web2py] pg8000 driver that comes with web2py 2.8.2 is not supporting JSON field type?

2014-10-15 Thread Arnav Sharma
Hi Niphlod, I am a newbie to unittests, Eden unittests, postgis, postgresql and its drivers which is why I had come asking for help. Anyhow, I appreciate your input. Many thanks On 15 October 2014 03:55, Niphlod wrote: > > > On Tuesday, October 14, 2014 11:50:45 PM UTC+2, ArnvShrma wrote: >> >

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Júlia Rizza
yeah, I forgot to tell that I "cloned" the app into a new one, with other name, but I'm using the right name in the parameter anyway. Em quarta-feira, 15 de outubro de 2014 12h19min53s UTC-3, Niphlod escreveu: > > doh! you're right. I see though that the appname is ticket4service, while > your p

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Niphlod
doh! you're right. I see though that the appname is ticket4service, while your parameter to start the scheduler is python web2py.py -K test ... should be python web2py.py -K ticket4service On Wednesday, October 15, 2014 3:00:46 PM UTC+2, Júlia Rizza wrote: > > Actually, stop_time is a day after

[web2py] Re: Semantic UI instead of bootstap

2014-10-15 Thread lyn2py
It's good for the widgets but not the grid. It looks better by itself than to mix with others like zurb and bootstrap. It's a tad bigger, and different kind of style. Out of the box, I personally did not find its styling as nice as zurb and bootstrap, and it requires to input quite a bit of code

Re: [web2py] how to set a default represent for all fields

2014-10-15 Thread Richard Vézina
What do you mean... It would have be the same if web2py offer a solution... :-P Richard On Tue, Oct 14, 2014 at 2:09 PM, wrote: > I was expecting an elegant web2py solution but brute force works too. > Thanks Richard. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Docum

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Júlia Rizza
Actually, stop_time is a day after start_time. Anyway, nothing happens if I don't define a stop_time. Em quarta-feira, 15 de outubro de 2014 09h52min13s UTC-3, Niphlod escreveu: > > meaning. stop_time isn't there in the video, and shouldn't be there in > your record. It means "please don't p

Re: [web2py] Is it possible to restrict a user to single login instance ?

2014-10-15 Thread Anthony
> > *Theoretically* I am thinking following : >> >> in pre-login (if I can intercept login attempt) - put a code that checks >> whether user that is trying to login - has already logged in (and not >> logged out yet) If yes, do not allow the login (or somehow forcely >> invalidate "other" sess

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Niphlod
meaning. stop_time isn't there in the video, and shouldn't be there in your record. It means "please don't process this task if stop_time passed" On Wednesday, October 15, 2014 2:49:43 PM UTC+2, Niphlod wrote: > > you have stop_time equal to start_time. that's the reason why it isn't > w

[web2py] Re: scheduler isn't starting

2014-10-15 Thread Niphlod
you have stop_time equal to start_time. that's the reason why it isn't working ... -- 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

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-15 Thread Niphlod
if it's a module yes, it's the whole reason of having a module not to reevaluate it at every time. If you're debugging, though, it should be a function. Mind that you can always prepare a simple script (i.e. mylaunch.py) and use web2py.py -M -S appname -R mylaunch.py mylaunch.py will be execute

Re: [web2py] Is it possible to restrict a user to single login instance ?

2014-10-15 Thread Anthony
> Let me clarify a little - since lot of answer seemed to focus on "MachineA > Vs MachineB" > What I need is "only one valid session from UserA at given point" - so two > sessions - one from Chrome and other from Firefox - both from MachineA - > should be disallowed. (Not sure if it makes prob

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-15 Thread António Ramos
using your suggestion web2py.py -M -S appname whenever i change my code i have to exit my shell console and run it again right? Regards 2014-10-15 10:03 GMT+01:00 António Ramos : > > 2014-10-14 23:06 GMT+01:00 Niphlod : > >> web2py.py -M -S appname > > > Niphold > You deserve a promotion too!!

Re: [web2py] Re: Scheduler only runs 1 task from 2 queued

2014-10-15 Thread António Ramos
2014-10-14 23:06 GMT+01:00 Niphlod : > web2py.py -M -S appname Niphold You deserve a promotion too!! thank you for your time. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

Re: [web2py] Is it possible to restrict a user to single login instance ?

2014-10-15 Thread Mandar Vaze / मंदार वझे
All, Let me clarify a little - since lot of answer seemed to focus on "MachineA Vs MachineB" What I need is "only one valid session from UserA at given point" - so two sessions - one from Chrome and other from Firefox - both from MachineA - should be disallowed. (Not sure if it makes problem easy