[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Yebach
models for two tables that need to be shown db.define_table('worker', Field('id', type ='id'), Field('w_organisation', type ='integer'), Field('w_user', type ='integer'), Field('w_status', 'reference status'), Field('w_first_name',type='text'), Field('w_last_name',type='text'), Field('w_nick_name'

[web2py] Re: CKeditor in a loaded component

2014-07-16 Thread Leonel Câmara
Rahul you use the XML helper. For instance, let's suppose I have a table 'page' with a field 'body' which I have set with ckeditor. In the view I can do: {{=XML(page.body, sanitize=False)}} If you can trust the input "sanitize=False" is a good idea (for instance if it can only be changed in the

[web2py] sessions2trash.py and memory usage

2014-07-16 Thread Annet
To clean up session on my production environment I thought of calling the sessions2trash.py this way: nohup python ~/webapps/w2p/web2py/web2py.py -S admin -R scripts/sessions2trash.py -A -o -x 3600 -f -v -s & nohup python ~/webapps/w2p/web2py/web2py.py -S myleonexus -R scripts/sessions2trash.py

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Niphlod
14 MB is "over your limit" ? change hosting provider. On Wednesday, July 16, 2014 10:46:58 AM UTC+2, Annet wrote: > > To clean up session on my production environment I thought of calling the > sessions2trash.py this way: > > nohup python ~/webapps/w2p/web2py/web2py.py -S admin -R > scripts/sess

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Annet
No, all these lines added up to 549 MB, my limit is 512 MB. I commented out: */5 * * * * ~/webapps/w2p/web2py/web2py.py -S admin -R scripts/sessions2trash.py & */5 * * * * ~/webapps/w2p/web2py/web2py.py -S mypynex -R scripts/sessions2trash.py in my cron tab, which solves the issue, however, I

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Yebach
Also, how do I costumize the edit view (etc. drop down menus, filed size). The input text fields are enormous. Using set max length does not work. It prevents the text larger then set to be inserted (but only on submit button click it rases an error - is it possibel to create an on the fly valid

[web2py] Problem with Google Fonts

2014-07-16 Thread Thiago Duarte
Hello! I'm having a problem: I upload a file with the following code in my application "static" folder (I'm using PythonAnywhere): http://fonts.googleapis.com/css?family=Nunito";> #font { font-family: 'Nunito', sans-serif; font-size: 48px; } Text here! Well, when I open the html fi

[web2py] How to deploy web2py under existing host

2014-07-16 Thread chuan137
Hi All, I have to install web2py as part existing VirtualHost. It is serving a few directories, and web2py folder is one of them. this is my settings under WSGIScriptAlias /newstatus /srv/www/hostRoot/web2py/wsgihandler.py AllowOverride None Order Allow,Deny

[web2py] Re: Styling columns in SQLTABLE and the grid

2014-07-16 Thread Кирилл Шаталаев
Hello, there is a little trouble. When I hide some fields from output by db.table.field.readable=False, and are not rendered (as it must), but in for this field is still rendered so it breaks the layout. пятница, 8 ноября 2013 г., 1:01:48 UTC+4 пользователь Anthony написал: > > In trunk, SQ

[web2py] Re: error(10053, 'An established connection was aborted by the software in your host machine')

2014-07-16 Thread Massimo Di Pierro
This is not the problem. You should not close connections in web2py. web2py may need to recycle them in the connection pool. Can you connect to your database via other means? For example the python shell or the web2py shell? On Tuesday, 15 July 2014 14:08:22 UTC-5, Copper Lark wrote: > > I foun

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Niphlod
did you try to inspect the log of the cron job adding a -v , i.e. web2py.exe -S mypynex -M -R scripts/sessions2trash.py -A -o -x 3600 -f -v ? On Wednesday, July 16, 2014 11:48:36 AM UTC+2, Annet wrote: > > No, all these lines added up to 549 MB, my limit is 512 MB. > > I commented out: > > */5 *

[web2py] Re: Problem with Google Fonts

2014-07-16 Thread Leonel Câmara
I don't see anything wrong with it (well you could use https instead of http so it also works if you're browsing it using https). Can you clarify exactly when does it not work? What do you mean by "when I open the page of the uploaded file"? -- Resources: - http://web2py.com - http://web2py.co

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Anthony
> > workers = db(db.worker.w_organisation == 10).select(db.worker.w_id_w, > db.worker.w_organisation, db.worker.w_first_name, > db.worker.w_last_name,db.worker.w_nick_name,db.worker.w_email,db.worker.w_status,db.worker.w_note).as_list() > What is the above for? It is not used below. > #Defin

Re: [web2py] Re: Favorite debuggers?

2014-07-16 Thread Don O'Hara
Thanks Ron - My preferred way has always been to "log now, look later" to not interupt the flow of the transaction/unit of work processing. Most of my "day work" is database programming where debugging is very limited or non-existent, and that's the only way. (Nothing worse than staring at code an

Re: [web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Vid Ogris
Hell I changed to SQLFORM.grid. It kind of works now. I even managed to include status as drop down in my edit view. I created a left join on my status table. The problem I am facing now is that when a user selects a status for worker and clicks submit I get an error. looks like it is trying to

[web2py] PythonAnywhere Web2py Script

2014-07-16 Thread Tom Russell
I am trying to run a script that I have in my app. While the log files seem to show my script ran, it does not update the db I have for my app. On the schedule tab in pythonanywhere I have this set up so not sure if it is correct: python2.7 /home/tsrdatatech/web2py/web2py.py -S ttheorydataextra

Re: [web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Anthony
> > #Validators > * db.worker.w_status.requires = IS_IN_DB(db,db.status.s_code) # This > created drop down but does not insert the right value into field* > Because w_status is a reference field, it must store the record ID from the db.status table, not the s_code value (which is a text field).

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Annet
Since I have access to my system's own cron service I use *external cron* The issue seems to be that */5 * * * * ~/webapps/w2p/web2py/web2py.py -S admin -R scripts/sessions2trash.py & */5 * * * * ~/webapps/w2p/web2py/web2py.py -S mypynex -R scripts/sessions2trash.py & are starting web2py and i

[web2py] Relative URLs in development absolute URLs in production

2014-07-16 Thread Annet
I have a development and a deployment environment. In development all URLs are relative. The issue is I have 2 applications, 1 over http and 1 over https. When I move my applications to production I have to add scheme= ...and host=... to all URLs that are links between the 2 applications. Which

[web2py] Ractive, web2py and forms, enable the automatically disabled submit button

2014-07-16 Thread Leonel Câmara
Hey, I'm doing something similar to this example: http://examples.ractivejs.org/comments I'm having a problem because my comment form submit button gets set to "working..." and disabled. I sort of like it but I'd like to be able to re-enable it. What I have tried to do is, in the bottom of my

Re: [web2py] Ractive, web2py and forms, enable the automatically disabled submit button

2014-07-16 Thread Richard Vézina
May this help : http://stackoverflow.com/questions/10073434/find-this-when-using-jquery-on-with-dynamically-created-elements ?? Richard On Wed, Jul 16, 2014 at 1:28 PM, Leonel Câmara wrote: > Hey, > > I'm doing something similar to this example: > http://examples.ractivejs.org/comments > > I'

Re: [web2py] PythonAnywhere Web2py Script

2014-07-16 Thread Stef Mientki
I'm not sure what all those command line parameters mean, so I don't know if this helps, but I run the same script on my Desktop, Raspberry Pi and PythonWhyWhere without parameters in the following way: # detect if I'm on PythonAnyWhere import platform Uname = platform.uname () CurDir = os.curd

[web2py] User_agent in a LOADed view

2014-07-16 Thread Louis Amon
I'm a great fan of LOAD, and i'm using it quite a bit to generate cool ajax pages. I got one issue so far though : can't seem to *cleanly* detect a mobile device in a .load view. For example I have a "result.load" view and I want a special mobile display in "result.mobile.load". I've tried to

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Niphlod
I'm starting to think we talk two different languages (and there's a little bit of lack of shell scripting on your side). cron syntax is a taddle bit universal that being said there is a subtle difference between web2py's cron and a "normal" cron (explained in the book). Cron is made specifi

[web2py] Re: User_agent in a LOADed view

2014-07-16 Thread Anthony
Please show your code and the exception. On Wednesday, July 16, 2014 4:15:27 PM UTC-4, Louis Amon wrote: > > I'm a great fan of LOAD, and i'm using it quite a bit to generate cool > ajax pages. > > I got one issue so far though : can't seem to *cleanly* detect a mobile > device in a .load view.

[web2py] Re: User_agent in a LOADed view

2014-07-16 Thread Louis Amon
Sure. It's fairly simple tho since the Exception gets raised on line 1 of my LOADed view. Views/default/search.html: ... {{ =LOAD('service', 'serv1') }} ... Controllers/service/serv1: response.view = "service.load" def serv1(): return dict() Views/service.load : {{ is_mobile = request

[web2py] Re: sessions2trash.py and memory usage

2014-07-16 Thread Jose C
Hi Annet, I'm also with webfaction and do my session cleanups like this: (this is one line in the crontab): # Delete sessions that are older than 1 day from the disk. 18 1 * * * /usr/local/bin/python2.7 /home/my_username/webapps/my_w2p_app_dir /web2py/web2py.py --nogui --no-banner -S myweb2pyap

[web2py] Re: how to trigger submit action of form(SQLFORM) under separated div(outside form)

2014-07-16 Thread Dave S
On Tuesday, July 1, 2014 6:46:29 AM UTC-7, Andrey K wrote: > > Dear web2py users, > I have a straight forward need in trigger submit action of sqlform outside > of form div - by clicking other button and hide original submit button on > the form. > Can I do it and how? > I'm going to guess th

Re: [web2py] Re: Favorite debuggers?

2014-07-16 Thread Tim Richardson
Pydev on top of eclipse is very strong. Pydev is evolving fast. I use pycharm pro (which is web2py aware), the community edition is worth trying. The web2py book has tips on using IDEs which are not web2py -aware. Web2py's IDE is improving too, every time I look it is getting better. -- Resour

[web2py] Re: User_agent in a LOADed view

2014-07-16 Thread Anthony
Note, you are using a non-Ajax component. I'm not sure why request.user_agent isn't defined in that case, but there are some funky things going on with non-Ajax components, so I would instead recommend using Ajax components: {{=LOAD('service', 'serv1', ajax=True)}} Feel free to file a Google C

[web2py] Re: how to trigger submit action of form(SQLFORM) under separated div(outside form)

2014-07-16 Thread lyn2py
You could use "display:none" but what if the user hits enter instead? On Tuesday, July 1, 2014 9:46:29 PM UTC+8, Andrey K wrote: > > Dear web2py users, > I have a straight forward need in trigger submit action of sqlform outside > of form div - by clicking other button and hide original submit b

Re: [web2py] Delete Query Not Working

2014-07-16 Thread dlypka
you might need to db.commit() after the delete(). versioning might be doing a commit() for you. On Tuesday, July 15, 2014 9:05:09 AM UTC-5, samurai wrote: > > No, I hadn''t. But it worked on turning it on. Thanks > But I don't get it. Record versioning just creates an archived db for the > modifi

[web2py] Re: CKeditor in a loaded component

2014-07-16 Thread Rahul
Thanks! Leonel. That helps. :-) Cheers, Rahul. On Wednesday, July 16, 2014 1:55:50 PM UTC+5:30, Leonel Câmara wrote: > > Rahul you use the XML helper. For instance, let's suppose I have a table > 'page' with a field 'body' which I have set with ckeditor. In the view I > can do: > {{=XML(page.

[web2py] Trolls at work against web2py!

2014-07-16 Thread Massimo Di Pierro
http://www.reddit.com/r/Python/comments/2awyjd/web2py/ -- 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 message because you are subscribe

[web2py] Re: Web2py sessions table does not exist?

2014-07-16 Thread Massimo Di Pierro
Hello Austin, I apologize I have overlooked your message and I would like to help with the problem. There seem to be thre distinct problems: 1) In your original post the "web2py_session_runstone.table" was there but the database had no knowledge of the table. This can only happen if the table i

[web2py] Re: Process uploaded file

2014-07-16 Thread David Jobes
I will try this, i already have a python script that parsers a file and converts to dsv to then add to db, this is the script i am trying to run, once a upload a file. On Saturday, July 12, 2014 3:40:10 AM UTC-4, Massimo Di Pierro wrote: > > for example, let's say you want to upload text files.

[web2py] Re: Problem with Google Fonts

2014-07-16 Thread Thiago Duarte
> > well you could use https instead of http so it also works if you're > browsing it using https I'm not sure if it's what you are talking about, but the url already is https, If I try delete this final s and reload the page, the url backs to be https. Moreover I uploaded the same file in two

[web2py] smart_query and SQLFORM.grid functions

2014-07-16 Thread EvilLinux
Hello, I at one point had smart_query working correctly (at least it seemed) with SQLFORM.grid but after having some issues with my database I had to rebuild some parts and it seems I cannot for the life of me get the smart_query functionality working again to have it show with SQLFORM.grid. B

[web2py] Compiling web2py application to run as a native windows app

2014-07-16 Thread Latif Masud
I have developed a web2py application that I want to run as a native windows app. Meaning when they click an icon, it launches a browser and runs the application. I was wondering if there is instructions somewhere on how to do this. Also, I have two local files that I call into my app. Right no

[web2py] Is it possible to get an _onclick prompt variable to send to the controller?

2014-07-16 Thread ucmyih
Hi all, I started using web2py a week ago with little MVC experience. I have a page displaying a database table using a SQLFORM.grid() where each row has buttons to extend a time variable or delete the row. I want to add a pop-up prompt which asks the user why they are extending the time vari

[web2py] Re: Problem with Google Fonts

2014-07-16 Thread Thiago Duarte
Thanks to a guy from the Stack Overflow, I tried change the third line to **, removing "http" from href, and it worked. Thank you anyway Leonel. Em terça-feira, 15 de julho de 2014 19h37min49s UTC-3, Thiago Duarte escreveu: > > Hello! I'm having a problem: I upload a file with the following cod

[web2py] Importing a csv I get (name 'step' is not defined)?

2014-07-16 Thread Jakob Hartman
name 'step' is not definedVersionweb2py™Version 2.9.5-stable+timestamp.2014.03.16.02.35.39PythonPython 2.7.8: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python (prefix: /Library/Frameworks/Python.framework/Versions/2.7)Traceback 1. 2. 3. 4. 5. 6. 7.