[web2py] how to use db connection multiple times with scheduler?

2012-07-19 Thread Amit
hi, I have to implement one scenario where scheduler will make the query to database periodically to retrieve data(lets say every 10 mins), i have written function inside model db.py to retrieve the data, and from controller i am staring the scheduler and assign the job to get the data periodic

Re: [web2py] Connecting from LAN to wsdl file

2012-07-19 Thread Mariano Reingart
Hello Bill: Generic views are disabled if you don't connect to localhost address (because they can be security risk) You can try to add this to your controller, call function: def call(): response.view = "generic.html' Te best solution is to create a view default/call.html to display

[web2py] Connecting from LAN to wsdl file

2012-07-19 Thread Bill Thayer
Hello, Thanks for all of your post about connecting to web2py rocket server from my LAN. For me, using 0.0.0.0 was not accessible on my local pc or from my laptop. I used ipconfig to find the ipaddress and started web2py server using 192.168.1.65 on my pc. Then it was accessible from my laptop

[web2py] Facing problem of settingup web2py project in Eclipse.

2012-07-19 Thread Amit
Hi, I followed below link to configure Web2py project in eclipse: http://allisterx.blogspot.in/2009/06/using-web2py-framework-on-eclipse.html but after setting up when i open my application which is there inside application folder of web2py_src folder, I saw so many errors on the module. once i

Re: [web2py] Re: Multi-tenant social-network?

2012-07-19 Thread Alec Taylor
On Fri, Jul 20, 2012 at 4:12 AM, Andrew wrote: > If users can create groups, will you want to create a database on the fly? > Yes. In the same way that in Massimo talk from a few months ago he talked about using the multi-tenant feature in an e-commerce setup, presumable where individuals would c

[web2py] PostgreSQL DAL connection issue

2012-07-19 Thread Abhishek Gupta
Hi, I am encountering the exact same problem as mentioned by Lucas in one the earlier threads : msql db_name -U user_name -h localhost *works* * * import psycopg2 psycopg2.connect *works* * * python web2py.py -S app_name DAL(...) works too But, still I get error > RuntimeError: Failure to co

[web2py] Re: Scheduler problems with 1.99.7

2012-07-19 Thread Massimo Di Pierro
the scheduler has been rewritten in trunk. Please give it a try. On Thursday, 19 July 2012 17:32:26 UTC-5, Wojo wrote: > > Hi All, > > I'm using the experimental scheduler for parallel processing of tasks that > come in short bursts (up to 300 tasks every 5 to 60 minutes). > Scheduler_task queue

Re: [web2py] Unable to login to admin in trunk

2012-07-19 Thread Jonathan Lundell
On 19 Jul 2012, at 4:17 PM, JohnB wrote: > Using Version 2.00.0 (2012-07-19 16:56:40) dev > > $python web2py.py > Enter pw and start server. > Starts up OK in welcome app. > Click on goto admin button and get login screen. > Enter pw and get admin error ticket. > > Has password hash in parameter

[web2py] Unable to login to admin in trunk

2012-07-19 Thread JohnB
Using Version 2.00.0 (2012-07-19 16:56:40) dev $python web2py.py Enter pw and start server. Starts up OK in welcome app. Click on goto admin button and get login screen. Enter pw and get admin error ticket. Has password hash in parameters_8000.py Help? --

[web2py] Scheduler problems with 1.99.7

2012-07-19 Thread Wojo
Hi All, I'm using the experimental scheduler for parallel processing of tasks that come in short bursts (up to 300 tasks every 5 to 60 minutes). Scheduler_task queue is populated by a homemade background worker (-M -N -R script) and I'm running 10 scheduler workers for task processing. Everyth

[web2py] two references from one table to another.

2012-07-19 Thread Ashraf Mansour
Hi, The first table has two fields: * from_user , db.auth_user* * to_user , db.auth_user* both are referencing db.auth_user. How to get the list of records in the first table with the corresponding first_name of the two fields? I am confused, because I don't know how to differentiate the tw

[web2py] Re: Multi-tenant social-network?

2012-07-19 Thread pbreit
Separate DBs sounds messy. You could either use Web2py's multi-tenant functionality and/or auth_group. Or just code it. --

Re: [web2py] Internal Error on EC2/Ubuntu

2012-07-19 Thread Jonathan Lundell
On 19 Jul 2012, at 2:42 PM, lyn2py wrote: > That's right, it works for now. Which file do I need to change? It can be tricky playing with this stuff, so no guarantees... Here's what I'd try. In /etc/apache2/sites-available/default (which was set up by setup-web2py-ubuntu.sh), find this line:

[web2py] Re: Create popular today query

2012-07-19 Thread Niphlod
The "linear" (faster, cleaner, smarted) way to do this is: db.define_table('views_by_day', Field('page'), Field('refdate', 'date'), Field('view_counter', 'integer') ) Then, db(db.views_by_day.refdate == request.now.date()).select(limitby=(0,10), orderby=~db.views_by_day.view

Re: [web2py] Internal Error on EC2/Ubuntu

2012-07-19 Thread lyn2py
That's right, it works for now. Which file do I need to change? Thanks Jonathan! On Thursday, July 19, 2012 11:20:49 PM UTC+8, Jonathan Lundell wrote: > > On 19 Jul 2012, at 12:24 AM, lyn2py wrote: > > Example: > /home/www-data/web2py/applications > By tree's owner do you mean the owner of web2p

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
from ordereddict import OrderedDict things_list=db().select(db.ref_thing.id, db.ref_thing.thing) things = [] if T.accepted_language.split('-')[0] == 'en': for r in things_list: things.append((en_ui_tables_names[r.thing],r.id, r.thing)) things.sort(key=lambda x: x[0].lower()) el

Re: [web2py] Re: A Web2py CMS like Joomla ?

2012-07-19 Thread Bruno Rocha
> > IMHO the real question is *what is the cause of plugins little usage?* The misunderstanding of plugin system, to be honest I think the web2py plugin system is not good. Now with modules, we can have a better base for plugin development. --

Re: [web2py] Re: A Web2py CMS like Joomla ?

2012-07-19 Thread Michele Comitini
The problem here is not only related to CMS. web2py is a full featured framework, this has at least two consequences that affect the sharing of applications built on top of it: 1. Since even a complex application tends to be short on web2py this makes easier to rewrite from scratch that study som

Re: [web2py] Re: Responsive tables

2012-07-19 Thread Richard Vézina
Here is a great compilation of the possible implementation for responsive table : http://css-tricks.com/responsive-data-table-roundup/ Richard On Thu, Jul 19, 2012 at 3:16 PM, Derek wrote: > Pretty neat, first cell length isn't scrollable on desktop web browser > sized too small. > > > On Wedn

Re: [web2py] Re: x509 authentication

2012-07-19 Thread Michele Comitini
- Install M2Crypto. - If you use rocket be sure to pass the --ca-cert option or if you use another server configure the server to support client certificate validation and to pass needed SSL variables in wsgi environment*. - In you model put the following: from gluon.contrib.login_methods.x50

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
Is T.accepted_language could be empty? Richard On Thu, Jul 19, 2012 at 4:08 PM, Richard Vézina wrote: > I read about it, but I wasn't sure if it contain the first prefered > language set in the browser of visitor... > > But I think, it's what I was searching for. > > Thanks Bruno! > > Richard >

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
I read about it, but I wasn't sure if it contain the first prefered language set in the browser of visitor... But I think, it's what I was searching for. Thanks Bruno! Richard On Thu, Jul 19, 2012 at 3:17 PM, Bruno Rocha wrote: > *T.accepted_languag*e does not helps? > > On Thu, Jul 19, 2012

Re: [web2py] Re: CSRF consideration for running web2py with pure JS interface

2012-07-19 Thread Derek
I suppose then that it would make sense to bake his own at this point - create a formkey in the session variables, on submit check the formkey returned. On Tuesday, July 17, 2012 10:15:14 PM UTC-7, Anthony wrote: > > I am presuming this is the mechanism you use for preventing CSRF attacks - >>

Re: [web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Bruno Rocha
*T.accepted_languag*e does not helps? On Thu, Jul 19, 2012 at 3:59 PM, Richard Vézina wrote: > Hello, > > I need to render a form with ordered input label in alphabetic order base > on the browser language, so I thought that that I could get the user setted > browser languages from request.env.h

[web2py] Re: Responsive tables

2012-07-19 Thread Derek
Pretty neat, first cell length isn't scrollable on desktop web browser sized too small. On Wednesday, July 18, 2012 4:31:06 PM UTC-7, rochacbruno wrote: > > > http://www.zurb.com/playground/responsive-tables > > > > > > *Bruno Cezar Rocha* > > http://www.CursoDePython.com.br > --

[web2py] simpler then request.env.http_accept_language

2012-07-19 Thread Richard Vézina
Hello, I need to render a form with ordered input label in alphabetic order base on the browser language, so I thought that that I could get the user setted browser languages from request.env.http_accept_language in order to determine which sorted label to return, but request.env.http_accept_langu

[web2py] Re: Create popular today query

2012-07-19 Thread Derek
You wouldn't be able to do that if you just have a counter which counts the totals. There are several ways to do it. You can log each visit in a table, then query based on time, grouped by table and ordered by count... You could also create a 'daily summary' table that logs page visits to it, an

[web2py] Re: x509 authentication

2012-07-19 Thread Derek
1. Take a look at x509_auth.py for information on how to do that. It's only 102 lines, so don't be daunted. 2. Yes. On Tuesday, July 17, 2012 4:12:50 PM UTC-7, tiadobatima wrote: > > Hi guys, > > After reading the docs, searching through old posts, and scouring the net, > I'm hoping someone ca

[web2py] Multi-tenant social-network?

2012-07-19 Thread Andrew
If users can create groups, will you want to create a database on the fly? --

[web2py] Multi-tenant social-network?

2012-07-19 Thread Alec Taylor
I've got a simple architecture, there are groups, users and group-events. • Users login with Facebook • Users can search for a group or a group-event by name, location and/or datetime • Users can create groups • Users can RSVP to group events if the group owner allows open RSVPs, else the user mus

Re: [web2py] Re: upload - exceptions.MemoryError

2012-07-19 Thread Janath Geeganage
Hi, It works! I was actually trying with restarting the server. But this time I closed everything and restarted python. So I am fine. Thank you for your consideration and sorry for dragging this topic unknowingly. Gist: Restarting Python is something that I should do after making changes to web

Re: [web2py] Re: A Web2py CMS like Joomla ?

2012-07-19 Thread Bruno Rocha
The only problem here is WHO will build the Killer web2py CMS? Instant Press is built by @Martin and I dont know if he gets contribution Movu.ca is built by @rochacbruno (me) and I did not get too much contribution (two or 3 people helped with ideas and translations) Sorry community, but we do no

Re: [web2py] Re: upload - exceptions.MemoryError

2012-07-19 Thread Massimo Di Pierro
Can you print print request.vars.keys() just before that line? What do you get? On Thursday, July 19, 2012 10:18:21 AM UTC-5, Janath wrote: > > Hi, > > I actually have already made that by following Anthony's suggestion. That > error persists. > > Thank you, > Janath > > On Thu, Jul 19, 2012

Re: [web2py] Re: sqlform.grid search widget

2012-07-19 Thread Richard Vézina
I think it will solve one of the issue I had with using sqlform.grid in place of sqltable + Datatables. Since Datatables has a pretty simple search/filter and my users knows how to use it than I would not remove this kind of easy search/filter functionality and leave them with only a harder more co

Re: [web2py] Internal Error on EC2/Ubuntu

2012-07-19 Thread Jonathan Lundell
On 19 Jul 2012, at 12:24 AM, lyn2py wrote: > Example: > /home/www-data/web2py/applications > By tree's owner do you mean the owner of web2py folder or owner of www-data > folder? I mean the web2py folder and its contents. > > From what I see, www-data folder is root:root > web2py folder is www-

[web2py] Create popular today query

2012-07-19 Thread Andrew Evans
Hello How can I query the database so it pulls the most viewed pages for the current day. I have a counter that calculates views on each page in total, I am just not sure how to implement it based on a time frame :-) *cheers and ty --

[web2py] database query for most popular today

2012-07-19 Thread Andrew Evans
Maybe this is pretty simple, I was wondering how I can get the most popular pages for the current day I have a counter set that checks how many times a page gets viewed here is a query for the most viewed: *popular_original = db(db.episodes.id>0).select(orderby=~db.episodes.views, limitby=(0,5

[web2py] Printing a landscape report from pyfpdf

2012-07-19 Thread John Zumsteg
I use pyfpdf to generate a landscape report. The report generates a pdf which appears correctly in a browser window, but when I try to print it, the landscape report is on a portrait page. This means, of course, that it doesn't fit: the right side runs off the page. This occurs when trying to print

[web2py] Re: A Web2py CMS like Joomla ?

2012-07-19 Thread Nikolay Marusov
> > Is there any interest for it? > There is an actual need in CMS over Web2py ( https://groups.google.com/forum/?fromgroups#!msg/web2py/34-whf953-Q/fZc4Nnmt9OgJ). The problem is not so acute because of ease of developing with Web2py. I think it's a question of real leaders who could advance

[web2py] Pyfpdf landscape printing

2012-07-19 Thread John Zumsteg
I use pyfpdf to generate a landscape report in a web2py app. The report generates a pdf which appears correctly in a browser window, but when I try to print it, the landscape report is on a portrait page. This means, of course, that it doesn't fit: the right side runs off the page. This occur

Re: [web2py] Re: upload - exceptions.MemoryError

2012-07-19 Thread Janath Geeganage
Hi, I actually have already made that by following Anthony's suggestion. That error persists. Thank you, Janath On Thu, Jul 19, 2012 at 10:11 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Can you please edit your tools.py and replace: > > next = '?_next='+urllib.quote(URL(arg**s=

[web2py] Re: upload - exceptions.MemoryError

2012-07-19 Thread Massimo Di Pierro
Can you please edit your tools.py and replace: next = '?_next='+urllib.quote(URL(args=request.args,vars=request.vars)) with next = '?_next='+urllib.quote(URL(args=request.args,vars=request.get_vars)) Does this get rid of the error? On Thursday, 19 July 2012 00:31:02 UTC-5, Janath wrote: > >

[web2py] Re: sqlform.grid search widget

2012-07-19 Thread peter
Thanks for this I had not noticed that clear did not work, I guess I never use it. The problem is a type in the search_form function The fifth line should read id = 'search_text'), not id='searchText'), Does anyone know if I can edit the first message in this topic so as to correct it? Pet

[web2py] Re: how to compare date time in web2py?

2012-07-19 Thread Niphlod
current datetime is: request.now or import datetime datetime.datetime.now() Il giorno giovedì 19 luglio 2012 11:05:41 UTC+2, Amit ha scritto: > > Hi, > I have some records in a table and each record is having one field of type > datetime [fromat : 2012-07-19 23:12:0 (-MM-DD HH:MM:SS)], tabl

[web2py] Re: matching string in list using DAL

2012-07-19 Thread Anthony
Maybe replace all your code with something like this: seqlist <- [r.processed_seq for r in db().select(db.plugin_seq.processed_seq )] oligolist <- [r.oligo_processed_seq for r in db().select(db.oligo_seq. oligo_processed_seq)] for m in oligolist: for n in range(1, (len(seqlist) + 1) if seqlist

[web2py] matching string in list using DAL

2012-07-19 Thread praveen krishna
Hii, I want to match two string which are in two different lists,I want to view the stings which are matched for example string 1 ASDFFFASVSDSDDD

Re: [web2py] Migrating computed Fields?

2012-07-19 Thread Johann Spies
On 19 July 2012 11:01, Martin Felder wrote: > Hi everyone, > > I have a small migration problem here: In my Table (Postgres adapter, in > case this matters) I originally had the fields > > Field('co2_pot_masse', type='double'), > Field('thermisch_bedingt', compute=lambda r: 0.18*r.co2_pot

[web2py] Re: Server side rendering requiring js library. Svg to png. D3.js

2012-07-19 Thread Andrew
That data generator was harder than it looked. I'm getting there but I'll do a force layout first, which has been my focus. --

[web2py] Re: how to deploy web2py application on my purchased domain server

2012-07-19 Thread Luc Chase
might this help? http://stackoverflow.com/questions/817809/how-to-use-google-app-engine-with-my-own-domain-not-subdomain On Thursday, 19 July 2012 10:27:37 UTC+1, Roma Asnani wrote: > > Hello Everyone, > > I am learning python and web2py as well. I had developed an application on > web2py fr

[web2py] how to deploy web2py application on my purchased domain server

2012-07-19 Thread Roma Asnani
Hello Everyone, I am learning python and web2py as well. I had developed an application on web2py framework but I am having a bit problem in it that how can i be able to deploy it on my purchase domain. As earlier i had work on JAVA and there we use the framework for apache server but for web2p

[web2py] how to compare date time in web2py?

2012-07-19 Thread Amit
Hi, I have some records in a table and each record is having one field of type datetime [fromat : 2012-07-19 23:12:0 (-MM-DD HH:MM:SS)], table structure is: Emp_ID Emp_Name Emp_Address Emp_Salary updated_on(Type: datetime) periodically getting data against each Emp_ID and updating to the p

[web2py] Migrating computed Fields?

2012-07-19 Thread Martin Felder
Hi everyone, I have a small migration problem here: In my Table (Postgres adapter, in case this matters) I originally had the fields Field('co2_pot_masse', type='double'), Field('thermisch_bedingt', compute=lambda r: 0.18*r.co2_pot_masse), Now, if I change this to Field('co2_pot_m

Re: [web2py] Re: Internal Error on EC2/Ubuntu

2012-07-19 Thread lyn2py
Example: /home/www-data/web2py/applications By tree's owner do you mean the owner of web2py folder or owner of www-data folder? >From what I see, www-data folder is root:root web2py folder is www-data:www-data On Thursday, July 19, 2012 9:39:27 AM UTC+8, Jonathan Lundell wrote: > > On 18 Jul 201

[web2py] Re: Server side rendering requiring js library. Svg to png. D3.js

2012-07-19 Thread Martin Felder
Hi Andrew, did you perchance get to do this already? I'm still waiting eagerly ;) Thanks Martin --