[web2py] Re: Images not laoded

2012-11-10 Thread Julien Courteau
I realized, all of a sudden, that the images of my home page didn't use the {{=URL()}} notation... That's why web2py didn't know how to fetch them (img src=../static/img.png /). Thanks! On Friday, November 9, 2012 11:33:30 PM UTC-5, pbreit wrote: Are you doing images like this?

[web2py] Re: DAL and Pivot Tables

2012-11-10 Thread Rocco
I found a solution, I don't know if it is the good one, but works enough for me. My real data structure is slightly different about the above example: db.define_table('ctd', Field('station'), Field('parameter'), Field('value','integer')) It contains oceanographic information about

[web2py] Re: calendar display

2012-11-10 Thread dhmorgan
I think you may find an answer here, but the original question is difficult to understand. Are you saying you want the calendar to be built into the form and always visible? Or do you want it to be a pop-up and already activated upon page load, as though the user had clicked in the date field?

[web2py] Re: gitpython module error

2012-11-10 Thread dhmorgan
Is the failure to find gitpython module happening with development server or Apache/other? If you start Python interpreter and can you import git, perhaps web server is using a different Python. On Friday, November 9, 2012 1:19:23 AM UTC-6, Luc Chase wrote: When trying to install a package

[web2py] web2py process terminates without reason

2012-11-10 Thread BlueShadow
Hi, I installed web2py on my unix server and started it but in less than 8 hours the process is terminated. Is there some sort of log where I can find out why this happens? Is there a way I can make it run forever? After all it is a server and my site should be reacheable 24/7 Server Ubuntu

[web2py] web2py woes

2012-11-10 Thread Daniele
I just started using web2py and am having lots of trouble with things that I think should be quite simple. I will enumerate them here in the hopes they can be answered: 1) I had made a design in Twitter bootstrap 2.2.1 which was working fine as a plain .html file. I saw that web2py used an

[web2py] Re: table id tag in SQLFORM.grid()

2012-11-10 Thread HP
Thank you. On Thursday, November 8, 2012 4:43:12 PM UTC-5, Paolo Caruccio wrote: In the controller: myGrid = SQLFORM.grid(db.tablename) w2p_grid_tbl = myGrid.element('table') w2p_grid_tbl['_id'] = 'table_id' return dict(grid=myGrid) or in the view: {{extend 'layout.html'}}

Re: [web2py] proper way to mobile and desktop 'skins'

2012-11-10 Thread Ray (a.k.a. Iceberg)
Hi there, I just come across this old post. I solve this problem in a slightly different way. With all the same *.mobile views ready, I just explicitly use .mobile extension name as my visiting url, such as http://.../app/controller/action.mobile, therefore I don't need those if is_mobile

[web2py] conditional update after form is submitted

2012-11-10 Thread Simon Carr
Hi, I want to run some code after an update form is submitted but before the record in the database is updated. Where can I put the code so that I know the values in the form have passed validation before I run my code. Thanks Simon --

Re: [web2py] web2py woes

2012-11-10 Thread Vasile Ermicioi
hi, 1) since you already have a plain html design my advice is to remove all files from static folder of your app and to put your bootstrap files there, then replace the content of layout.html from view folder with your content (from html file) and adjust links of css and js files then put

[web2py] expressions and update

2012-11-10 Thread Martin Weissenboeck
I have tried this example def visit(): db(db.person1.id0).update( visits = db.person1.visits + 1, ) It is in the book and works fine. Now I have added another line... def visit(): db(db.person1.id0).update( visits = db.person1.visits + 1, name =

[web2py] Re: expressions and update

2012-11-10 Thread Niphlod
that's because db.person1.visits in an expressions is turned to the string 'person1.visits' and all databases understand update person1 set person1.visits = person1.visits + 1 when you do db.person1.name.capitalize(), you are willing to have a database that executes a python function

Re: [web2py] conditional update after form is submitted

2012-11-10 Thread Niphlod
or use the onvalidation callback on form.process form.process(onvalidation=yourfunction).accepted On Saturday, November 10, 2012 6:57:10 PM UTC+1, Vasile Ermicioi wrote: if form.validate(request.vars): #your code form.accepts(request.vars) --

Re: [web2py] conditional update after form is submitted

2012-11-10 Thread Simon Carr
Hi Vasile, Thanks for the reply, but that code seems to generate an error if form.validate(request.vars): TypeError: validate() takes exactly 1 argument (2 given) Here is my full function that I am trying to run if it helps @auth.requires_login() def edit_chart(): record =

Re: [web2py] conditional update after form is submitted

2012-11-10 Thread Simon Carr
Thanks Batman, That is what I was looking for. I thought I had seen it before, but could not find it again when searching the documentation. Cheers Simon On Saturday, 10 November 2012 19:47:00 UTC, Niphlod wrote: or use the onvalidation callback on form.process

[web2py] deploying web2py apache wsgi

2012-11-10 Thread BlueShadow
Hi I used the setup-web2py-ubuntu.sh to install web2py. It installed it but when I access my server on the specified port get the welcome app but I can't access the admin panel! It says app admin is deactivated because of unsecure channel. when I try to access it with an https:// infront of my

Re: [web2py] deploying web2py apache wsgi

2012-11-10 Thread Kenneth Lundström
Hi Kevin, the setup script does not change Apaches SSL configuration at all, if I remember correctly. So you need to configure your Apache to use SSL. You need to generate a self-generated certificate, if you havn't bought one. Kenneth Hi I used the setup-web2py-ubuntu.sh to install

[web2py] Plugin installation without admin

2012-11-10 Thread David Sorrentino
Hello everybody, I am wondering if there is a way to install a plugin without using the admin interface. Can anybody help me in that? Cheers, David --

Re: [web2py] Plugin installation without admin

2012-11-10 Thread Massimo Di Pierro
cd applications/yourapp tar zxvf /path/to/web2py.plugin.name.w2p On Saturday, 10 November 2012 16:34:21 UTC-6, David Sorrentino wrote: Hello everybody, I am wondering if there is a way to install a plugin without using the admin interface. Can anybody help me in that? Cheers, David --

[web2py] xhtml2pdf / pisa in a web2py view

2012-11-10 Thread chris_g
Has anyone had any luck running Pisa in a web2py view? I've only had success with using it at the command line: pisa example.html -- pisa.pdf I've tried putting the following in a view, but I am getting an empty string returned. {{ import logging import os import StringIO import

[web2py] Re: xhtml2pdf / pisa in a web2py view

2012-11-10 Thread chris_g
I believe I need to use a file reference to the html like this: pdf = pisa.CreatePDF( StringIO.StringIO(html) , result) But I am still getting an empty string. --

Re: [web2py] deploying web2py apache wsgi

2012-11-10 Thread BlueShadow
OK can you tell me how I do configure the apache2 server? I got the ssl crt and key. On Saturday, November 10, 2012 10:35:36 PM UTC+1, Kenneth wrote: Hi Kevin, the setup script does not change Apaches SSL configuration at all, if I remember correctly. So you need to configure your Apache

Re: [web2py] Plugin installation without admin

2012-11-10 Thread David Sorrentino
Easier than expected! :) Thank you Massimo. I wish you a good Sunday. David On 11 November 2012 01:15, Massimo Di Pierro massimo.dipie...@gmail.comwrote: cd applications/yourapp tar zxvf /path/to/web2py.plugin.name.w2p On Saturday, 10 November 2012 16:34:21 UTC-6, David Sorrentino wrote: