[web2py] submenus in layout

2015-02-10 Thread Yebach
I would like to create a drop down menu in my layout. The data for menu is read from menu.py this is my list for menu response.menu_logged = [ (T('Schedules'),URL('default','index')==URL(),URL('default','index')), (T('New schedule'),URL('script','edit')==URL(),URL('script','edit', args='new'))

[web2py] login and request.vars_next

2015-02-10 Thread Annet
In the init application I defined the following link: Join Which is rendered as follows: Join In the myleonexus application I have this setting: auth.settings.login_next = URL('default', 'index') I am facing two problems: 1. When the user is already logged in he is still directed to defa

[web2py] web2py shutil move or delete

2015-02-10 Thread Yebach
Hello I encounter an interesting problem or bug I have a app that runs some *.exe program that returns a file (*.out) to be processed every couple of second. If I want to stop this exe from working I delete *.lls file. So if a user hits play button I create lls file put it in a directory, sets

Re: [web2py] Re: Trunk unusable after this morning's git pull

2015-02-10 Thread Johann Spies
On 9 February 2015 at 20:51, Massimo Di Pierro wrote: > Can you try: > > python web2py.py -S welcome > >>> from gluon.dal import _default_validators > > what error do you get? > I had to get web2py working so I just unpacked a web2py_src.zip over the existing installation. Today I did a new "gi

Re: [web2py] Re: Question about web2py roadmap.

2015-02-10 Thread Carlos Cesar Caballero Díaz
I disagree that all queries belong in models. A complex query that needs to be re-used in multiple places should go somewhere centralized (not necessarily a model file, but perhaps a module). However, not all queries need to be re-used. Furthermore, some queries are so simple, there is no poi

[web2py] Re: login and request.vars_next

2015-02-10 Thread Anthony
Why don't you just change the original link to onclick="javascript:openwindow('/myleonexus/grouphandler/connect')" and let the app handle redirecting to login and back if necessary? Anthony On Tuesday, February 10, 2015 at 5:03:30 AM UTC-5, Annet wrote: > > In the init application I defined th

[web2py] Re: web2py shutil move or delete

2015-02-10 Thread Niphlod
oh please DON'T chdir ! it's not thread safe On Tuesday, February 10, 2015 at 11:19:18 AM UTC+1, Yebach wrote: > > Hello > I encounter an interesting problem or bug > > I have a app that runs some *.exe program that returns a file (*.out) to > be processed every couple of second. > If I want to

[web2py] Re: web2py shutil move or delete

2015-02-10 Thread Yebach
What do you suggest then? This part work? the problem is inside if script.sc_status == 11: On Tuesday, February 10, 2015 at 2:21:13 PM UTC+1, Niphlod wrote: > > oh please DON'T chdir ! it's not thread safe > > On Tuesday, February 10, 2015 at 11:19:18 AM UTC+1, Yebach wrote: >> >> Hello >> I en

Re: [web2py] vars=dict(_next= ...) and settings.cas_domains = None

2015-02-10 Thread Annet
Hi Anthony, auth.settings.cas_domain = [] solved the issue, thanks. Best Annet On Friday, 30 January 2015 15:33:00 UTC+1, Anthony wrote: > > You cannot set auth.settings.cas_domains to None. Instead, you can set it > to an empty list: > > auth.settings.cas_domains = [] > > Anthony > > On Frid

[web2py] Re: login and request.vars_next

2015-02-10 Thread Annet
Hi Anthony, Thanks for your reply. Why don't you just change the original link to > > onclick="javascript:openwindow('/myleonexus/grouphandler/connect')" > > and let the app handle redirecting to login and back if necessary? > Because I am tired :-( and now feel embarrassed asking such a stu

[web2py] Re: web2py shutil move or delete

2015-02-10 Thread Niphlod
once you chdir, all weird can happen. BTW, if you don't have any exception, is probably because your code is crafted NOT to raise any... what if you remove the "if os.path.isfile()" bit ? if indeed it's the code who can't delete the file, you'll get back the traceback you'll need to investigate.

Re: [web2py] Re: ckeditor : how to make read only, how to remove the toolbar in a dynamic way

2015-02-10 Thread Serge Bourgeois
I'd like to share the solution I found (maybe not the best?), in case it could be usefull to other: 1. collapse the top bar either with editing the app/static/plugin_ckeditor/config.js file like this: CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration

Re: [web2py] Re: Question about web2py roadmap.

2015-02-10 Thread Richard Vézina
Carlos, You bring good points to consider and Anthony brings some perspective too. I don't think there is a single answer here, but I think that web2py allows someone to do what is right to do depending of the context... The fact that the book may be misleading if you applied simply it examples ca

[web2py] BLOB fields in MSSQL Server

2015-02-10 Thread Jose
Hello everyone I have the following: Web2py on Freebsd. Database: SQLServer 2008 Connection: web2py <-> pyodbc <-> UnixODBC <-> FreeTDS <-> SQLServer I'm trying to store some uploaded files into a blob field, instead than on the file system. The table was created by the administrator SQLServe

[web2py] Re: https only on admin

2015-02-10 Thread tim spear
I think I may have a solution. I've posted it at http://stackoverflow.com/questions/28116754/how-can-i-make-part-of-the-website-not-use-https-in-web2py On Wednesday, February 4, 2015 at 3:48:21 AM UTC+7, Juozas Masiulis wrote: > > For certain reasons I could not use https for my entire website.

[web2py] Re: Did one click install. Now all sites try to use https: How go I get http: ?

2015-02-10 Thread tim spear
I think I found a solution. I posted it at http://stackoverflow.com/questions/28116754/how-can-i-make-part-of-the-website-not-use-https-in-web2py On Thursday, February 5, 2015 at 8:12:19 PM UTC+7, tim spear wrote: > > > I did the "one step deployment" from the web2py guide on Ubuntu on digital

Re: [web2py] BLOB fields in MSSQL Server

2015-02-10 Thread Richard Vézina
You say uploading don't works? What is you web server? Nginx were having a bug and limit the size of the file... Also, why you want to put your file in blob... I am going away from that, it bloat database and make db dump longer, etc. Richard On Tue, Feb 10, 2015 at 10:24 AM, Jose wrote: > Hel

[web2py] Re: Please help us test the 2.9.12 binaries

2015-02-10 Thread vince
i have the same problem too, 2.9.11 works fine. On Saturday, January 10, 2015 at 4:54:58 AM UTC+8, Dmitry Ermolaev wrote: > > I use _src.zip > >> 'DAL' object has no attribute 'Field' >> Versionweb2py™Version 2.9.12-beta+timestamp.2015.01.07.16.40.02PythonPython >> 2.7.8: C:\Python27\python.exe

Re: [web2py] BLOB fields in MSSQL Server

2015-02-10 Thread Jose
El martes, 10 de febrero de 2015, 13:01:36 (UTC-3), Richard escribió: > > You say uploading don't works? What is you web server? Nginx were having a > bug and limit the size of the file... > It is not a server problem. This web2py internal server using for development. The problem is the field

[web2py] fixing this terrible email function might benefit others

2015-02-10 Thread Alex Glaros
Here's a multi-recipient email function I just got working. It is newbie-created and horrible, but I'm hoping that building something like this is such a common requirement that someone might be willing to give tips that others could benefit from. Can anyone give guidance on any part of it? *M

Re: [web2py] Re: Question about web2py roadmap.

2015-02-10 Thread Anthony
> I disagree that all queries belong in models. A complex query that needs > to be re-used in multiple places should go somewhere centralized (not > necessarily a model file, but perhaps a module). However, not all queries > need to be re-used. Furthermore, some queries are so simple, there i

Re: [web2py] BLOB fields in MSSQL Server

2015-02-10 Thread Richard Vézina
You may look to adpater side, I guess SQL Server adapter is not creating blob type correctly for SQL server... Richard On Tue, Feb 10, 2015 at 11:40 AM, Jose wrote: > > > El martes, 10 de febrero de 2015, 13:01:36 (UTC-3), Richard escribió: >> >> You say uploading don't works? What is you web s

[web2py] Re: BLOB fields in MSSQL Server

2015-02-10 Thread Raul Monares
I had a similar problem with truncated info in blob fields. This line fixed for me: db.executesql('SET TEXTSIZE 2147483647') right after the DAL connection On Tuesday, February 10, 2015 at 8:24:19 AM UTC-7, Jose wrote: > > Hello everyone > > I have the following: > > Web2py on Freebsd. > Da

[web2py] ordering while doing left outer join

2015-02-10 Thread Напольнов Дмитрий
Hello everyone, I'm trying to solve a simple thing but I'm stuck for several hours already. Imagine I have a price list that keeps history, basically it's two tables: THINGS id | name 1| thing1 2| thing2 PRICES id |thing_id | date |price 1|1

[web2py] db value display

2015-02-10 Thread 'Diogene Laerce' via web2py-users
Hi, I got this code in default.py : form_0 = SQLFORM(db.base_folder, record=db.base_folder(1)) and unfortunately, the form displayed, displays also : id: 1 above the field value, and which that disappears when I omit the record option. How could I avoid that behavior please - as I need to kee

[web2py] Re: submenus in layout

2015-02-10 Thread Gary Cowell
I don't know if I understand your problem, but I do this: adminmenu = [ (T('Admin'), False, '', [ (T('Disk'), False, URL('dynamic', 'diskadmin'), []), (T('Slot'), False, URL('dynamic', 'systemadmin'), []), ]), ] Which creates a cascaded menu option, then I if auth.has_mem

Re: [web2py] Re: how to remember selected selectables during grid search?

2015-02-10 Thread Vinicius Assef
You have to control the client-side with javascript. This behaviour is a good candidate for it. On Mon, 09 Feb 2015 19:25:24 -0300 Alex Glaros wrote > this would be useful for others to know who are seeking to create a list of > email recipients, as this is a common function requir

[web2py] Deploying Web2py App on Bluehost

2015-02-10 Thread web2py user
I have Python, Web2py and various database technologies installed on an Linux server (say 123.45.67.89). Assuming I've configured my application, databases, and folder permissions properly, is deploying my Web2py application as simple as launching Web2py (the command on my machine would be p

[web2py] Showing menu only after successful login

2015-02-10 Thread Simon Marshall
Hi All, is there a way to hide the top menu until a person has logged in, i have a requirement that present a user just with a login page before the can do anything on the site. Any suggestion or pointer would be grateful. Thanks Simon -- Resources: - http://web2py.com - http://web2py.com/

Re: Re: Re: [web2py] Best practices for Lazy Tables

2015-02-10 Thread Vinicius Assef
It's easy, in fact. Instead of having functions defined in models/ directory, you move them to modules/ dir. Then, you need to import them when you need them, in your controllers and in your models. Be aware of how to access the Web2py API from modules [0]. [0] http://web2py.com/books/default/

[web2py] Re: https only on admin

2015-02-10 Thread Juozas Masiulis
So standard deployment should not require https use sitewide?I thought this was intended behaviour, because this happens on any computer that I've tried this on, for example fresh ubuntu 14.04 droplet. On Thursday, February 5, 2015 at 11:39:23 PM UTC+2, Massimo Di Pierro wrote: > > You are the s

[web2py] web2py on Microsoft Azure PAAS

2015-02-10 Thread Gary Cowell
Anyone any experience on deploying a web2py app on Microsoft Azure Web? Can it be done? -- 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

[web2py] Re: https only on admin

2015-02-10 Thread Ariya Owam-aram
HI Juozas Masiulis In /etc/apache2/sites-enabled/default.conf please chenge rewriterule as follows. RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/(admin/.*) https://%{SERVER_NAME}/$1 [R,L] Hope it wil help เมื่อ วันพุธที่ 4 กุมภาพันธ์ ค.ศ. 2015 3 นาฬิกา 48 นาที 21 วินาที UT

[web2py] Deploying Web2py on Bluehost

2015-02-10 Thread web2py user
I posted this on Stackoverflow; thought someone here might be able to help. I have Python, Web2py and various database technologies installed on an Linux server (say 123.45.67.89). Assuming I've configured my application, databases, and folder permissions properly, is deploying my Web2py a

Re: [web2py] Showing menu only after successful login

2015-02-10 Thread Richard Vézina
You can create a layout_login.html and remove what you want... In views/default/user.html replace layout.html by your layout_login.html That it! Richard On Tue, Feb 10, 2015 at 9:13 AM, Simon Marshall wrote: > > Hi All, > > is there a way to hide the top menu until a person has logged in, i h

Re: [web2py] How to run web2py on Linux Shared Hosting With No Shell, or SSH access

2015-02-10 Thread Massimo Di Pierro
I do not understand why anybody would use shared hosting in 2015 when you can have PythonAnywere or Google App Engine for free or a dedicated VM on Digital Ocean for $5/mo. Anyway, the book chapter "Shared hosting with mod_python" must go. mod_python should not be used by anybody anymore. How

[web2py] Re: Broke my button :-(

2015-02-10 Thread Dave S
Just tagging up in case I have to search for this again later: On Wednesday, January 21, 2015 at 4:38:04 PM UTC-8, Dave S wrote: > > > > On Wednesday, January 21, 2015 at 11:49:52 AM UTC-8, Anthony wrote: >> >> Dave had already responded with: >> >>> >>> Both the function for the page with the but

Re: [web2py] Showing menu only after successful login

2015-02-10 Thread Javier Pepe
Also you can try to verify the model (menu.py) that the user is logged before loading the array with the options menu if auth.is_logged_in (): response.menu = [options ] else: response.menu = [] On Tue, Feb 10, 2015 at 5:26 PM, Richard Vézina wrote: > You can create a layout_login.

[web2py] import gluon.tools under private modules

2015-02-10 Thread lucas
hey everyone, i am writing a private module, like dude.py under applications/app/private. how do i access the web2py library like from gluon.tools import Mail and have it run properly under the private module? thank you in advance, lucas -- Resources: - http://web2py.com - http://web2py.com

[web2py] Re: db value display

2015-02-10 Thread Alex Glaros
am a newbie but try this in your function above the "form" line db.base_folder.id.readable = db.base_folder.id.writable=False -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Redirect Error

2015-02-10 Thread Maggs
Hey all, I recently set up a new dev environment with a new version of web2py (2.9.11). In production I am currently running version 1.99.7. When I imported my 1.99.7 apps into version 2.9.11 I had to clean up a few issues, but this one I'm unable to figure out. I have a simple page that update

Re: [web2py] Re: https only on admin

2015-02-10 Thread tim spear
There didn't used to be https for everything with the older script for Ubuntu 12 / Apache 2.2 and there still is not if you use the Ngnix / Ubuntu script. Also https everywhere is not mentioned in the docs as far as I know. It seems to have come in in the new install script for Apache 2.4 labelled

Re: [web2py] Re: https only on admin

2015-02-10 Thread tim spear
I tried similar but then http: didn't work because Apache didn't know to send the requests to web2py. I found the http://stackoverflow.com/questions/28116754/how-can-i-make-part-of-the-website-not-use-https-in-web2py solution got http to work while keeping admin on https though I was changing thing

[web2py] Re: import gluon.tools under private modules

2015-02-10 Thread Leonel Câmara
You can do exactly that. -- 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 subscribed to the Google Groups "web2p

[web2py] Re: Deploying Web2py App on Bluehost

2015-02-10 Thread Dave S
Partial answers inline: On Monday, February 9, 2015 at 12:52:04 PM UTC-8, web2py user wrote: > > I have Python, Web2py and various database technologies installed on an > Linux server (say 123.45.67.89). Assuming I've configured my application, > databases, and folder permissions properly, is d

[web2py] Re: Deploying Web2py App on Bluehost

2015-02-10 Thread Dave S
On Tuesday, February 10, 2015 at 8:16:04 PM UTC-8, Dave S wrote: > However, there are plenty of people who do run on virtual hosts. I don't > remember that Bluehost has been mentioned. I think Blue Ocean has, but > er, that should be "Digital Ocean", it seems > PythonAnywhere and Googl