[web2py] gitpython module error

2012-11-08 Thread Luc Chase
When trying to install a package from github I get an error saying that I need to have the gitpython module. But when I execute the following it seems it is already there... sudo pip install gitpython Password: Requirement already satisfied (use --upgrade to upgrade): gitpython in /Library/Fram

[web2py] Re: Error when trying to upload large application to web2py.

2012-11-08 Thread Kimmo
Hi, I manually already transferred the app so I can't test this right now but I will let you know if I can test this in near future. Thank you for quickly responding to my issue (and fixing it). On Friday, November 9, 2012 12:22:59 AM UTC+2, Massimo Di Pierro wrote: > > I think this is fixed.

[web2py] Optimized way to use web2py Scheduler

2012-11-08 Thread Amit
Hi, I have more than 10 functions which has to be executed by Scheduler and each task has assigned different time ( for e.g...one has to execute on every 15 minutes, other one has to executes on every 24 hrs etc... ) to execute, so in my CustomScheduler.py module : I wiil have 10 different sta

[web2py] What can cause "unable to install application"?

2012-11-08 Thread Luca
I am using web2py to teach a class on web development, and sometimes the students submit .w2p packages as assignments that cannot be loaded. When I or the TAs try to load them, we get the "unable to install application" message. What can cause this message? The packages open without problem

[web2py] Re: how to call a controller funtion on click of a button?

2012-11-08 Thread Leonel Câmara
Set the button onclick attribute to run a javascript function which calls it using ajax, or, depending on what you're doing, using a trapped link can be a good idea (styled to look like a button if you want, just add class btn to it) finally also consider if you could be doing this using the LOA

Re: [web2py] Re: Database table name is different that dal reference

2012-11-08 Thread Leonel Câmara
Ok this is hackish but... db.__class__.case = property(lambda self: self['`case`']) Wouldn't putting this in the model after the table definition work well enough? Not sure if you don't need to define a setter too. --

[web2py] Simple logging not working?

2012-11-08 Thread Luca
I tried this simple way to log (to help debugging, not really for production logging): import logging logging.basicConfig(filename="/tmp/web2py.log", level=logging.INFO) logging.info("this is not output") The above does not work. I know that there is a solution that works at http://www.web2pys

Re: [web2py] Re: Using non-web2py created database

2012-11-08 Thread Michele Comitini
Latest trunk has a little script to help you create a model file from a legacy sqlite3 database. You will have to fine tune some table definition, but it should help. Then you should be able to access your db through the DAL. Note that triggers side effects, if there are any, must be taken into a

Re: [web2py] Re: How to create long running tasks?

2012-11-08 Thread Michele Comitini
SIGTERM is the correct one. But usually INT has the same handler... usually. mic 2012/11/8 Richard Baron Penman > So far script has used SIGINT and not needed the SIGKILL backup. > What would be a better way to terminate a process than SIGINT? > > Zombie processes consume minimal resources,

[web2py] Re: 2.2.1 auth.wiki() automatically adds users to wiki_editor group. Bug or feature?

2012-11-08 Thread Massimo Di Pierro
Please open a ticket. Will fix this tonight. On Thursday, 8 November 2012 14:50:51 UTC-6, Dragan Matic wrote: > > I can confirm and replicate this bug, the same happens on windows binaries > and on ubuntu with source with latest stable version - 2.2.1. > > Here are the steps to replicate the bug

Re: [web2py] Re: How to create long running tasks?

2012-11-08 Thread Richard Baron Penman
So far script has used SIGINT and not needed the SIGKILL backup. What would be a better way to terminate a process than SIGINT? Zombie processes consume minimal resources, but are being reaped eventually anyway so not stacking up. On Fri, Nov 9, 2012 at 9:06 AM, Michele Comitini wrote: > using

[web2py] Re: Error when trying to upload large application to web2py.

2012-11-08 Thread Massimo Di Pierro
I think this is fixed. Can you give it a try? On Wednesday, 7 November 2012 01:08:20 UTC-6, Kimmo wrote: > > > Hi, > > I have a packed a Web2py application that is about 1.9Gb (lots of upload > files). When trying to upload it to production server the following error > occurs: > > Traceback (mos

[web2py] how to call a controller funtion on click of a button?

2012-11-08 Thread web4py
hi i have a button in my html file on click of which i want to call a function present in default.py unable to find any source... --

[web2py] Re: 2.2.1 auth.wiki() automatically adds users to wiki_editor group. Bug or feature?

2012-11-08 Thread Dragan Matic
I can confirm and replicate this bug, the same happens on windows binaries and on ubuntu with source with latest stable version - 2.2.1. Here are the steps to replicate the bug: 1. create new app 2. create new page (default/wikipage.html) and controller that returns auth.wiki(manage_permission

Re: [web2py] Re: routing problem on www.bioinformatics.org

2012-11-08 Thread Maurice Ling
This issue had been settled - http://refgene.bioinformatics.org and I shall close this question. On Tuesday, 6 November 2012 15:09:42 UTC-6, J.W. Bizzaro wrote: > > > On Tuesday, November 6, 2012 3:54:47 PM UTC-5, Jonathan Lundell wrote: >> >> >> Your wsgi configuration should be pointing to wsgih

[web2py] Re: Circular references

2012-11-08 Thread Luc Chase
Any way to achieve this when using the wizard? Tried... parent_project reference project But it returns circular reference error. On Saturday, 13 November 2010 23:21:11 UTC, Francisco G. T. Ribeiro wrote: > > Thank you, > sorry, I should know this... > > On Nov 13, 10:50 pm, villas wrote: >

Re: [web2py] Re: How to create long running tasks?

2012-11-08 Thread Michele Comitini
using SIGKILL is not a good way to end processes and zombies are evil not only in "Night of the Living Dead" ;-) they consume resources. mic 2012/11/8 Richard Baron Penman > thanks for advice, but already have a working solution. > > > I

Re: [web2py] Re: Database table name is different that dal reference

2012-11-08 Thread Jim Steil
Not the reply I wanted, but as always, I appreciate the prompt reply. Certainly something I can work around. -Jim On Thu, Nov 8, 2012 at 9:51 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This is not supported at this time. > > > On Thursday, 8 November 2012 09:39:24 UTC-6, Jim

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

2012-11-08 Thread Paolo Caruccio
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'}} {{w2p_grid_tbl = grid.element('table')}} {{w2p_grid_tbl['_id'] = 'table_id'}} Il giorno giovedì 8 no

[web2py] Re: REF: Modal Window: Automatically close and update parent window:

2012-11-08 Thread Paolo Caruccio
a possible solution (skeleton code so please check for errors and omissions): # controllers def companies(): return dict() def add_company(): form = SQLFORM(db.company, formstyle='bootstrap') if form.process().accepted: session.flash = 'form accepted' redirect(URL('a

[web2py] Re: Using non-web2py created database

2012-11-08 Thread Maurice Ling
OK - I found a solution or hack. 1. put my sqlite database into applications//database folder 2. add this into applications//model/db.py nat = DAL('sqlite://nat_full.db', migrate=False) 3. use "result = nat.executesql(stmt)" whenever I want to run my queries Anyone can comment if this is an app

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
ok, give me some hints at least (trying to reverse engineer here :P). when you go to http://localhost:8000/init/journal/journals how many records are returned ? I assume 1. in other words: are you using request.vars.jids to create the query you pass on the tables ? If yes, I remember someon

Re: [web2py] Re: track_changes

2012-11-08 Thread Massimiliano
Massimo pointed me out in the right direction. I was putting the tracking code in the wrong place. I should be in the app and not in modules... On Thu, Nov 8, 2012 at 4:39 PM, Massimiliano wrote: > I filed a bug: > http://code.google.com/p/web2py/issues/detail?id=1128 > > and I posted a samp

[web2py] Using non-web2py created database

2012-11-08 Thread Maurice Ling
Hi everyone Let's say I have a database that I want to fit a web application to. There are a lot of views and triggers in the database, so I do not consider porting as a viable option. How do I go about doing this? My steps are as follow: 1. create an "init" application 2. put my database into

[web2py] Re: uwsgi + web2py + Custom Python Build

2012-11-08 Thread Phyo Arkar
After that error i got is : uwsgi socket 0 bound to TCP address 127.0.0.1:47235 (port auto-assigned) fd 3 Python version: 2.7.3 (default, Oct 25 2012, 04:38:33) [GCC 4.6.3] Set PythonHome to ./runtime/lib/python2.7 ImportError: No module named site is -H option for setting pythonhome for uwsgi

[web2py] Re: uwsgi + web2py + Custom Python Build

2012-11-08 Thread Phyo Arkar
I tried to set pythonhome to exact python home of my built python , but still it don't work.. here is my wrapper script : #!/bin/bash SOURCE="${BASH_SOURCE[0]}" DIR="$( dirname "$SOURCE" )" while [ -h "$SOURCE" ] do SOURCE="$(readlink "$SOURCE")" [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"

[web2py] Re: Where is the best place to make e-mail by registration and login to be converted always to lower case?

2012-11-08 Thread Mark Abajian
Thank you, Anthony, The reset_email_lower() worked for me. I just needed to use table_user() instead of table_user. By reading this thread, I am now able to store emails as lower case, but allow upper/mixed case logins and password resets. Just what I was looking for! Thank you, everyone.

[web2py] Re: json formatting of a select with grouping

2012-11-08 Thread Massimo Di Pierro
You can try this. Yet I found some problem as data.json() does not behave well as json(data) while they should be the same. from gluon.serializers import json db =DAL() db.define_table('test',Field('name'),Field('firstname')) db.test.insert(name='Test',firstname='Test') count = db.test.id.count(

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 8 November 2012 15:32, Niphlod wrote: > ehm missing something here. jids is not a standard var for the grid, > are you using that var to filter the query passed to the grid ? > > One thing is taking care of the default filtering (keywords variable), > another is to accomplish the same thin

[web2py] id tag in SQLFORM.grid()

2012-11-08 Thread HP
I am creating a table using SQLFROM.grid() and want to set the id attribute in the created HTML , how can I do that? --

[web2py] Re: Shortcut not working: del db.mytable[id]

2012-11-08 Thread Cliff Kachinske
Shouldn't have to commit, since I'm not working from the console. On Thursday, November 8, 2012 5:21:17 AM UTC-5, Johann Spies wrote: > > On Thursday, 8 November 2012 05:58:50 UTC+2, Cliff Kachinske wrote: >> >> Version 2.0.9, Postgres 9.X, Psycopg2 >> >> I don't know what else to tell you, except

[web2py] Re: Belongs with empty list fails on postgres

2012-11-08 Thread Cliff Kachinske
I've been working around this Postgres/psycopg2 "feature" for ages. Something like this: query = db.sometable.somefield==somevalue avoid = [id1, id2, id3] #could be an empty list if len(avoid): query &= ~(db.sometable.id.belongs(avoid)) On Tuesday, November 6, 2012 12:06:22 PM UTC-5, Niphlod

[web2py] json formatting of a select with grouping

2012-11-08 Thread dederocks
Hello, If I define a table with define_table('test',Field('name'),Field('firstname')) Then in the controller, I have: count = db.test.id.count() data = db().select(db.test.ALL, count.with_alias('newName'), groupby=db.t

Re: [web2py] REF: Modal Window: Automatically close and update parent window:

2012-11-08 Thread Richard Vézina
Hello, When you submit the form in the modal it submit the whole page? I do have the same issue and found that for no particular reason the form tag of the embeded modal form is trim somehow. If I use the same component form (web2py LOAD) without modal, my form has the html form tag... Richard

[web2py] Re: 2.2.1 auth.wiki() automatically adds users to wiki_editor group. Bug or feature?

2012-11-08 Thread Massimo Di Pierro
The rule is the first user to register is also a wiki_editor. This should not happen for other users. If it happens it is a bug. Can you confirm this is working as intended? On Thursday, 8 November 2012 08:00:31 UTC-6, Dragan Matic wrote: > > I am doing an auth.wiki(manage_permissions=True). >

[web2py] 2.2.1 auth.wiki() automatically adds users to wiki_editor group. Bug or feature?

2012-11-08 Thread Dragan Matic
I am doing an auth.wiki(manage_permissions=True). Basically, I want to have a wiki writer and a wiki_reader who will not be able to edit wiki posts. Two users (reader and writer) are registered and two groups are automatically opened (user_1 and user_2). For every wiki post user_1 and user_2 a

[web2py] REF: Modal Window: Automatically close and update parent window:

2012-11-08 Thread Teddy Nyambe
Hi, How do I auto close a JS Bootstrap modal window that has simple form and then update a grid on the calling main page??? I am using Bootstrap modal window. Model: db.define_table('department', Field('name')) db.define_table('office', Field('name'), Field('department', db.department)) Controll

[web2py] Re: Database table name is different that dal reference

2012-11-08 Thread Massimo Di Pierro
This is not supported at this time. On Thursday, 8 November 2012 09:39:24 UTC-6, Jim S wrote: > > Hi - I'm wondering if I can specify a table name in db.define_table that > is different than the name that web2py will then use to refer to it. > Example: > > case = db.define_table('case', Field(f

Re: [web2py] Re: track_changes

2012-11-08 Thread Massimiliano
I filed a bug: http://code.google.com/p/web2py/issues/detail?id=1128 and I posted a sample application. I will put detail about my enviroment inside the issue. On Thu, Nov 8, 2012 at 4:25 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Many have reported this problem but i cannot r

[web2py] Database table name is different that dal reference

2012-11-08 Thread Jim S
Hi - I'm wondering if I can specify a table name in db.define_table that is different than the name that web2py will then use to refer to it. Example: case = db.define_table('case', Field(field1...)) Using MySQL, this doesn't work because case is a keyword. I can however do this: case = db.d

[web2py] Re: Automatic login if username contains @ : Is this normal ?

2012-11-08 Thread Massimo Di Pierro
I emailed you privately abou this. Asking for for somd debug info. Did you get my email? --

Re: [web2py] Re: track_changes

2012-11-08 Thread Massimo Di Pierro
Many have reported this problem but i cannot reproduce. Can you more about the environment and post a sample app? --

[web2py] Re: Alternative to Janrain: in pure Python

2012-11-08 Thread Massimo Di Pierro
No. I do not this anybody opened an issue on goggle code. Please do. --

[web2py] Re: Error when trying to upload large application to web2py.

2012-11-08 Thread Massimo Di Pierro
Although this is a bad idea, Kimmo has a point. This should work and the problem is a bug in the FORM handling. I will try fix it asap. On Wednesday, 7 November 2012 02:49:53 UTC-6, Niphlod wrote: > > were you seriously thinking about transferring 1.9gb of files through an > "upload" form ? > t

Re: [web2py] Re: How to create long running tasks?

2012-11-08 Thread Richard Baron Penman
thanks for advice, but already have a working solution. > It's still not clear why the scheduler does not fit your needs. I do not need to schedule tasks. I just need to react to form submissions so having the scheduler middleman is not necessary in this case. On Fri, Nov 9, 2012 at 12:59 AM, M

[web2py] REF: Refresh Modal Window

2012-11-08 Thread Teddy Nyambe
Hi, Give the following modal window on the same initiated on the same page...modal 1 has a form to add a department and modal window 2 has a form to add an office under a given department. The problem is that after adding department without refreshing I try to add office, the drop down with a list

Re: [web2py] Re: How to create long running tasks?

2012-11-08 Thread Michele Comitini
It's still not clear why the scheduler does not fit your needs. Anyway what you want seems to need should be a *deamon*. You can launch it in the middle of the request/response cycle or from the scheduler it will detach from the parent (the launching) process and work in the background. pip insta

[web2py] uwsgi + web2py + Custom Python Build

2012-11-08 Thread Phyo Arkar
This is more uwsgi problem so here: I am doing a self contained , relocatable , standalone python build with uwsgi, web2py , scipy (Numpy,matplotlib) Everything works fine in relocatable enviorment but Uwsgi is having this error : uwsgi socket 0 bound to UNIX address /home/uwsgi/uwsgi/uwsgi.sock

Re: [web2py] Re: Problem in deploying ssl certificates to Rocket server.

2012-11-08 Thread Michele Comitini
I think as a practical solution you should remove the password from the server private key as Niphlod pointed out in this same thread. BTW I suggest to use any of apache, nginx, cherokee, uwsgi and probably other webservers instead of rocket and have them do the SSL/TLS part. web2py auth code will

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
ehm missing something here. jids is not a standard var for the grid, are you using that var to filter the query passed to the grid ? One thing is taking care of the default filtering (keywords variable), another is to accomplish the same thing with a customization like that. On Thursday,

[web2py] Re: Shortcut not working: del db.mytable[id]

2012-11-08 Thread Niphlod
try with 2.2.1, it's the one I tested On Thursday, November 8, 2012 4:58:50 AM UTC+1, Cliff Kachinske wrote: > > Version 2.0.9, Postgres 9.X, Psycopg2 > > I don't know what else to tell you, except I know the record was there > after the failed delete attempt. > > Today the same syntax failed in

[web2py] Re: Shortcut not working: del db.mytable[id]

2012-11-08 Thread Johann Spies
On Thursday, 8 November 2012 05:58:50 UTC+2, Cliff Kachinske wrote: > > Version 2.0.9, Postgres 9.X, Psycopg2 > > I don't know what else to tell you, except I know the record was there > after the failed delete attempt. > > Did you do a db.commit() ? Regards Johann --

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Niphlod
what is the url you exported from ? (i.e. hover on the export link and paste here (the relevant part is from the controller onwards)) On Thursday, November 8, 2012 11:08:11 AM UTC+1, Johann Spies wrote: > > On 7 November 2012 17:38, Niphlod > wrote: > >> patch to apply to trunk. Please test it ex

Re: [web2py] SQLFORM.grid exports the whole table

2012-11-08 Thread Johann Spies
On 7 November 2012 17:38, Niphlod wrote: > patch to apply to trunk. Please test it extensively with all the possible > combinations. > I applied the patch but did not see any different behaviour. A view with two records in the grid exported the whole table of more than 1 records. And yes,