[web2py] Re: override Login / logout methods

2011-02-21 Thread pbreit
It's apparently possible to extend/override the Auth features with subclassing, however Web2py has some "onlogin/onlogout" features that may work for you. This thread touches on both: https://groups.google.com/forum/#!searchin/web2py/MyAuth$20login/web2py/73jbzK8Sy-w/oYNXuMxw35gJ Session expirat

[web2py] Validate length of exactly 2.

2011-02-21 Thread annet
In a function I defined a SQLFORM.factory form: form=SQLFORM.factory(Field(...)), Field('areacode',requires=[IS_LENGTH(2),IS_NOT_EMPTY()]) The IS_LENGTH(2) validator validates areacodes that have a length of 1 or 2 characters, whereas an areacode have a length of 2 characters. Is there a wa

[web2py] Re: override Login / logout methods

2011-02-21 Thread Neveen Adel
Thanks a lot pbreit :) On Feb 21, 12:01 pm, pbreit wrote: > It's apparently possible to extend/override the Auth features with > subclassing, however Web2py has some "onlogin/onlogout" features that may > work for you. This thread touches on > both:https://groups.google.com/forum/#!searchin/we

[web2py] save file

2011-02-21 Thread luifran
I used the following code to open a O.S window, to open a file, form = FORM (INPUT (_type = 'file', _name = 'data'), INPUT (_type = 'submit')), but now I want the same to save a file, how I can do?

[web2py] Re: Validate length of exactly 2.

2011-02-21 Thread pbreit
IS_LENGTH(minsize=2, maxsize=2) http://web2py.com/book/default/chapter/07?search=is_length

Re: [web2py] Re: Spatial Database Modeling

2011-02-21 Thread Manuele Pesenti
Dear Massimo and everybody, after some time my businness brings me again on a quite old question. I'd like to undestand whether it may be worth to implement a spatial extension for web2py or if it's better to turn to geoDjango. Considering that Massimo said that "Most of that work was done on a

[web2py] Re: New Widget and Slice - SELECT_OR_ADD_OPTION

2011-02-21 Thread Massimo Di Pierro
+1 On Feb 20, 2:54 pm, Brian M wrote: > I've created a widget to augment the IS_IN_DB select widget with the ability > to add a new option record within a dialog on the same page. Check it out; > feedback is welcome. > > http://web2pyslices.com/main/slices/take_slice/121 > > ~Brian

[web2py] Re: Create custom session store?

2011-02-21 Thread Massimo Di Pierro
Not really. You can store them in db. That's about as much as configuration as it is available at this time. On Feb 20, 8:36 pm, Stodge wrote: > Does web2py provide the ability to write custom session stores? I'm > still reading through the book but I haven't seen anything yet. Thanks

[web2py] Re: regexp in like expressions

2011-02-21 Thread Massimo Di Pierro
This should be added. I will do today. Do we know if it works with sqlite? On Feb 20, 9:26 pm, DenesL wrote: > It seems that several DB backends support having a regular expression > pattern besides the simple % placeholder; I tested MSSQL 2008 R2 based > onhttp://msdn.microsoft.com/en-us/library

[web2py] Re: Subclass navbar() ?

2011-02-21 Thread Massimo Di Pierro
class MyAuth(Auth): def navbar(self): ... On Feb 20, 10:45 pm, pbreit wrote: > I guess the correct terminology would be extending/replacing navbar() by > subclassing Auth.

[web2py] Re: can't create new app

2011-02-21 Thread Massimo Di Pierro
this bug was in trunk for no more than 2 minutes. You really got unlucky! On Feb 20, 10:38 pm, Bruno Rocha wrote: > Same problem here, but running latest trunk, cant create new app from admin > form. > >   File "/home/rochacbruno/Dropbox/WP/animalsystem/web2py/gluon/html.py", > line 560, in __ini

[web2py] Re: regexp in like expressions

2011-02-21 Thread DenesL
On Feb 21, 9:23 am, Massimo Di Pierro wrote: > This should be added. I will do today. Do we know if it works with > sqlite? Yes, I made those changes in 1.91.6 and the example works as shown. The patch applies to 1.92.1 as well.

Re: [web2py] Sqlite3 error

2011-02-21 Thread G. Clifford Williams
On Sun, Feb 20, 2011 at 12:00:42PM -0800, Felipe AP spake: > None of my web2py apps are working anymore. I'm getting this error. > What can I do about it? Please answer. Thanks! > > Traceback (most recent call last): > File "/home/felipe/web2py/gluon/restricted.py", line 188, in > restricted >

[web2py] Debug somtimes works, sometimes doesn't..

2011-02-21 Thread Joseph.Piron
Hi all, I have a weird issue here.. I'm working with eclipse and pydev and I have defined a project with the full web2py folder. The problem is I can debug several applications such as the welcome or example app, or even the code in web2py.py, but my own apps (created with fast new app options in

[web2py] HTTP_RANGE support for streaming to iDevices

2011-02-21 Thread Joseph.Piron
Hi all, I was trying to create a plugin for VideoJS html 5 player for web2py. Everything was nice with the demo video from VideoJS server when I tried with my own. It works with Chrome, IE, Safari, Firefox and ... doesn't with iPhone.. (nor FlowPlayer flash player) After some research, it appears

Re: [web2py] Re: can't create new app

2011-02-21 Thread Bruno Rocha
2011/2/21 Massimo Di Pierro > this bug was in trunk for no more than 2 minutes. You really got > unlucky! Thanks Massimo, I think I am the only mad that runs trunk updated in production sites, but I thing it is very more easy to run 'hg pull|update' directly in the running server, and it helps

[web2py] Re: Shorter URLs

2011-02-21 Thread stargate
This is very interesting so do you have separate fies for your pages or just one index file On Feb 20, 11:45 pm, Jonathan Lundell wrote: > On Feb 20, 2011, at 8:39 AM, Ross Peoples wrote: > > > That would be pretty cool! So, assuming this was in the current release > > now, I would set the 'fu

[web2py] crud.update issue with boolean field

2011-02-21 Thread Richard Vézina
Hello, I have a pretty strange problem. I have record that has to be updated and approved, so all the fields are writable=false except those reserved to the approver... Since I migrate to 1.91.6 the I let crud represent my boolean field with a checked or empty checked boxes my record in read and u

Re: [web2py] Debug somtimes works, sometimes doesn't..

2011-02-21 Thread Lucas D'Avila
I use eclipse with PyDev for debugging works fine, I start web2py within the eclipse. The only problem I have is to stop the process started by the eclipse, 'sometimes' I have to kill the python process by the operating system (note: I use ubuntu). -- Lucas D'Avila http://flavors.me/lucasdavila

[web2py] Re: App profiling?

2011-02-21 Thread Luther Goh Lu Feng
Check out http://newrelic.com/ Though they currently do not support python web apps, but a presenter at my local python meetup grp shared that he is working on a python port at New Relic. However, Django will be the first framework to work with the port. He also mentioned web2py, but I think that

[web2py] Re: App profiling?

2011-02-21 Thread Luther Goh Lu Feng
Check out http://newrelic.com/ It was shared at a local python meetup by a new relic developer working on a python port. However, web2py is not at the top of his priorities at the moment, Django is. On Feb 19, 10:43 pm, pbreit wrote: > Do we have anything similar to these php tools? > > http://p

[web2py] Re: GSoC

2011-02-21 Thread Luther Goh Lu Feng
Inspired by http://groups.google.com/group/web2py/browse_thread/thread/cfb0ed89924c3b5e# I wonder if it is possible to provide performance analytics of some sorts in web2py? If it is, I think it could be a worthwhile GSOC project. On Feb 17, 7:03 am, Massimo Di Pierro wrote: > We need proposals

[web2py] Re: App profiling?

2011-02-21 Thread Massimo Di Pierro
This should work... massimo-di-pierros-macbook-2:web2py mdipierro$ python web2py.py -h -F PROFILER_FILENAME, --profiler=PROFILER_FILENAME profiler filename ... it should store profiler info in the file. I have not used it in some time so it is possible it may need s

[web2py] Re: HTTP_RANGE support for streaming to iDevices

2011-02-21 Thread Massimo Di Pierro
response.stream already supports HTTP_RANGE. Not sure what the problem is. On Feb 21, 9:48 am, "Joseph.Piron" wrote: > Hi all, > > I was trying to create a plugin for VideoJS html 5 player for web2py. > Everything was nice with the demo video from VideoJS server when I > tried with my own. > It

[web2py] Re: Validate length of exactly 2.

2011-02-21 Thread annet
> IS_LENGTH(minsize=2, maxsize=2) > > http://web2py.com/book/default/chapter/07?search=is_length Thanks, I didn't realize I could provide IS_LENGTH() with two parameters. Kind regards, Annet.

[web2py] crud.update issue with boolean field

2011-02-21 Thread Richard Vézina
Hello, I have a pretty strange problem. I have record that has to be updated and approved, so all the fields are writable=false except those reserved to the approver... Since I migrate to 1.91.6 the I let crud represent my boolean field with a checked or empty checked boxes my record in read and u

[web2py] crud.update issue with boolean field

2011-02-21 Thread Richard Vézina
Hello, I have a pretty strange problem. I have record that has to be updated and approved, so all the fields are writable=false except those reserved to the approver... Since I migrate to 1.91.6 the I let crud represent my boolean field with a checked or empty checked boxes my record in read and u

[web2py] looking for web2py users in Mumbai

2011-02-21 Thread Massimo Di Pierro
If you are there please contact me. Massimo

[web2py] Sharing knowledge in this group. What is the point ?

2011-02-21 Thread António Ramos
Hello, I see a lot of good knowledge being shared in this discussion group. But i would like to know this from the book or another tutorial ,and not have to search in google. I think that someone should be watching for user problems and as soon as we have good material for a paper about something

[web2py] CRUD checkboxes

2011-02-21 Thread greenpoise
is it possible to achieve this on CRUD: def do_what_timmie_asks(): rows=db(db.sometable.id>0).select() db.sometable.id.represent=lambda id: DIV(id,INPUT (_type='checkbox',_name='check%i'%id)) form=FORM(SQLTABLE(rows),INPUT(_type='submit')) if form.accepts(request.vars):

[web2py] easyframework

2011-02-21 Thread Bruno Rocha
http://easyframework.com/ seems to be a usefull tool to work together with web2py -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ]

[web2py] Re: CRUD checkboxes

2011-02-21 Thread greenpoise
I want to put 2 checkboxes next to the fields of my table..the form is crud. thanks On Feb 21, 10:43 am, greenpoise wrote: > is it possible to achieve this on CRUD: > > def do_what_timmie_asks(): >      rows=db(db.sometable.id>0).select() >      db.sometable.id.represent=lambda id: DIV(id,

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread cjrh
On Feb 21, 8:42 pm, António Ramos wrote: > But i > would like to know this from the book or another tutorial ,and not have to > search in google. Feel free to point out some topics that are not covered in the book, and should be.

[web2py] Dreampie as web2py shell

2011-02-21 Thread Bruno Rocha
Hi, I am trying to use DreamPie [ http://dreampie.sourceforge.net/ ] as web2py shell, but $dreampie from command line does not have the ability to catch command line arguments. Is there a trick to get it working with django http://www.roryhart.net/code/django-and-dreampie/ and I am wondering how

[web2py] Re: App profiling?

2011-02-21 Thread pbreit
I think Graham Dumpleton is working on New Relic and he visits this group occasionally. I thought the Particletree thing was pretty spiff. We probably don't need anything quite that fancy.

[web2py] Tornado Web2py how to set up in Production Envrironment?

2011-02-21 Thread Andrew Evans
Does any one have any resources on setting up web2py and Tornado in a production environment. I would like to set it up with Debian Lenny to host web sites I develop, I am wanting to get in to development using Tornado and web2py cause I saw how cool it was in a few demos. Any tips and advice are

[web2py] Variables in queries

2011-02-21 Thread LightOfMooN
Is there a way to use variables in queries as table names? For example, something like this: keys = ['table1','table2','table3'] mydict = {} for key in keys: mydict[key] = db(db.KEY.id=='some_id').select() where key is a name of table.

Re: [web2py] Variables in queries

2011-02-21 Thread Bruno Rocha
Yes, this is used in crud and appadmin db['tablename']['fieldname'] keys = ['table1','table2','table3'] mydict = {} for key in keys: mydict[key] = db(*db[key]['id']*=='some_id').select() -- Bruno Rocha [

Re: [web2py] Variables in queries

2011-02-21 Thread Richard Vézina
db[key].id not workin?? Richard On Mon, Feb 21, 2011 at 3:16 PM, LightOfMooN wrote: > Is there a way to use variables in queries as table names? > For example, something like this: > > keys = ['table1','table2','table3'] > mydict = {} > for key in keys: >mydict[key] = db(db.KEY.id=='some_id

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread pbreit
Good idea in theory but not always easy to execute. I'm wondering if a wiki would help?

[web2py] Re: easyframework

2011-02-21 Thread pbreit
Looks pretty cool. Not a huge fan of the license but I think I'll give it a try.

Re: [web2py] Re: bug in SQLFORM.factory for multiple tables with repeated field names but readable=False

2011-02-21 Thread Richard Vézina
Get the same problem... Common name fields (my own auth.signature) in differents tables not working anymore in 1.92.1. I was about to complete to create differents multiple tables form to make easier the life of my user in different use case... I believe I will need to find an other solution to ma

[web2py] Re: Subclass navbar() ?

2011-02-21 Thread pbreit
Ah, much simpler than I thought, thanks! It seemed to require this: def navbar(self, prefix='Welcome', action=None):

[web2py] Create files from JSON request

2011-02-21 Thread Charles Law
I'm working on a game app that is setup to have users create profiles using the Auth class. I want to have users save games specific to their account, and allow them to have multiple saved games. I also want to have the saved games listed so the user can load (and maybe download) them. The files

[web2py] Date intervals split

2011-02-21 Thread JmiXIII
I need to split a date range into shorter intervalle : Selection=FORM(TABLE(TR( (TD("De l'article",SELECT(_name='DebArt', *[OPTION(ListeArticle[i].CodeArticle, _value=str(ListeArticle[i].CodeArticle)) for i in range(len(ListeArticle))]))), TD("A l'article",SELECT(_name='FinArt',*[OPTI

[web2py] Re: Subclass navbar() ?

2011-02-21 Thread pbreit
One thing that I wanted to fix is a missing space: In tools.py, Change: bar = SPAN(prefix,self.user.first_name,' [ ', logout, ' ]',_class='auth_navbar') To: bar = SPAN(prefix,self.user.first_name,' [ ', logout, ' ]',_class='auth_navbar') # space before ]

[web2py] Re: Create files from JSON request

2011-02-21 Thread Charles Law
Hopefully this is easier to read: @service.jsonrpc def sendFileJSON(dataFromJSON): #sendFileJSON parentpath='/Documents/' filename='testFile06.dat' #eventually use dataFromJSON instead of abc file = cgi.FieldStorage('file', 'testFile06.dat', 'abc\n') filepath=parentpath

Re: [web2py] Subclass navbar() ?

2011-02-21 Thread David J
You only have to override the methods you want to override. On Feb 20, 2011 11:43 PM, "pbreit" wrote: > I can't seem to figure out the correct way to subclass navbar(). Does this > look close? > > === db.y == > from gluon.tools import * > > class MyAuth(Auth): > > def __init__(self, environment,

Re: [web2py] Subclass navbar() ?

2011-02-21 Thread David J
Sorry didn't see it was answered. I apologize. On Feb 21, 2011 4:02 PM, "David J" wrote: > You only have to override the methods you want to override. > On Feb 20, 2011 11:43 PM, "pbreit" wrote: >> I can't seem to figure out the correct way to subclass navbar(). Does this > >> look close? >> >> =

Re: [web2py] Dreampie as web2py shell

2011-02-21 Thread David J
Can't you just view the source if web2py.py in root directory? I would imagine if you add that if you add that to your python_path as well as all gluon you could accomplish that. On Feb 21, 2011 2:54 PM, "Bruno Rocha" wrote: > Hi, > > I am trying to use DreamPie [ http://dreampie.sourceforge.net/

[web2py] Re: easyframework

2011-02-21 Thread Anthony
On Monday, February 21, 2011 3:38:19 PM UTC-5, pbreit wrote: > > Looks pretty cool. Not a huge fan of the license but I think I'll give it a > try. Yeah, looks like you're required to keep a link back to the framework's homepage in your page footer, unless you want to pay $49 for a developer'

[web2py] One last thing

2011-02-21 Thread Jack315
Hello, I have what will most likely be my last question relating to my current project. I have set up a twitter stream that uses anyjson, but when I try to run my application, I get a ticket saying that there is no supported JSON module found. Thanks, --Jack

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread Anthony
On Monday, February 21, 2011 3:36:04 PM UTC-5, pbreit wrote: > > Good idea in theory but not always easy to execute. > > I'm wondering if a wiki would help? > Well, www.web2pyslices.com is probably the appropriate place for a lot of stuff. A revamped, more comprehensive version of the site is

[web2py] Win a Ticket to PyCon US 2011

2011-02-21 Thread Anthony
https://github.com/blog/799-win-a-ticket-to-pycon-us-2011 If you win, don't forget to sign up for the web2py tutorial too: http://us.pycon.org/2011/schedule/presentations/26/

[web2py] How to manipulate default tables and use them with powertable

2011-02-21 Thread Ismael Alejandro
Hi!! I have a new doubt, this time I'm trying to customize a table generated by a search, this is what I have: (Model) db.define_table('category', Field('name','string'),format='%(name)s') db.define_table('book', Field('name','string), Field('code','string)

[web2py] Help on Authentication with Janrain

2011-02-21 Thread Pystar
I am thinking of including third party authentication mechanisms like Twitter and facebook onto my site, but according to web2py documentation I have to register with Janrain before I can use it. Here's the catch, this is a new website, no income yet from it, but according to Janrain, the free vers

[web2py] Re: Help on Authentication with Janrain

2011-02-21 Thread Anthony
Janrain is probably the simplest way to do third party authentication, but you can also integrate directly with OpenID and OAuth providers. See this section of the book for details: http://web2py.com/book/default/chapter/08#Other-Login-Methods-and-Login-Forms Anthony On Monday, February 21, 2

[web2py] Re: One last thing

2011-02-21 Thread Jack315
Please respond soon, this is urgent! On Feb 21, 4:15 pm, Jack315 wrote: > Hello, > > I have what will most likely be my last question relating to my > current project. I have set up a twitter stream that uses anyjson, but > when I try to run my application, I get a ticket saying that there is > n

[web2py] Re: can't create new app

2011-02-21 Thread Massimo Di Pierro
No problem, this helps debugging. ;-) On Feb 21, 10:09 am, Bruno Rocha wrote: > 2011/2/21 Massimo Di Pierro > > > this bug was in trunk for no more than 2 minutes. You really got > > unlucky! > > Thanks Massimo, I think I am the only mad that runs trunk updated in > production sites, but I thing

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread DenesL
To those that want to see a bigger/better book I say feel free to help update it, just ask Massimo for an editor pass. It is also a good way to give back. Regarding the group search, it does suck, have you tried using: http://groups.google.com/groups/advanced_search?safe=off&q=group:web2py I find

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread pbreit
I think it's gotta be a wiki. Slices is too structured. Here are models: http://code.djangoproject.com/wiki http://wiki.rubyonrails.org/ Is there a good Web2py-based wiki app?

Re: [web2py] Re: One last thing

2011-02-21 Thread Jack Lyons
Error: Traceback (most recent call last): File "gluon/restricted.py", line 188, in restricted File "/Users/jacklyons/Downloads/web2py/web2py.app/Contents/Resources/applications/Stalker/models/anyjson.py" , line 115, in Im

[web2py] Re: Spatial Database Modeling

2011-02-21 Thread Tim Michelsen
> after some time my businness brings me again on a quite old question. > I'd like to undestand whether it may be worth to implement a spatial > extension for web2py or if it's better to turn to geoDjango. I would support your activites. What is your conclusion from the Thesis? I see this as a po

Re: [web2py] Customize search results table

2011-02-21 Thread Ismael Alejandro
Anybody? What I need is the same functionality than the "Display *n *Entries" in powertable, but I need it as a parameter to show the info that has the selected value

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread Plumo
There is this one: http://wiki.web2py.com but I had difficulty last time I tried to edit it.

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread Anthony
Bruno and Martin are working on a complete revamp of www.web2pyslices.com, and they've got a lot of good ideas: https://groups.google.com/d/topic/web2py/HkkZ_-kMUYE/discussion. If you've got ideas, let them know. I don't think we'll want a wiki in addition to the new slices site -- the new site

[web2py] Re: Fresh Wizard install and plugin wiki not working...

2011-02-21 Thread kawate
Hello all The discussions on plugin wiki is very useful for me. It is very natural that some privilage is needed. I had tranlateded in Japanese to post to the web2py Japan site. Thank you all. On 1月27日, 午後2:46, Jason Brower wrote: > Thanks for the heads up.  I had to create the group and add m

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread Anthony
Yeah, I think that is mostly abandoned, with a lot of out-of-date material. On Monday, February 21, 2011 6:05:27 PM UTC-5, Plumo wrote: > There is this one: > http://wiki.web2py.com > > but I had difficulty last time I tried to edit it. >

[web2py] Re: GSOC who is in charge and how should we proceed?

2011-02-21 Thread Tim Michelsen
>>> We need get our applications in very soon so let's get cracking! >>> Who is in charge of this and how can I help? >> Shall we collect Ideas on the google code wiki and then vote? >> > Do we have a wiki for this somewhere? I think we could just gather then > here on the list then make a page re

Re: [web2py] Re: One last thing

2011-02-21 Thread Anthony
Note, the simplejson module the comes with web2py is in gluon/contrib/ -- maybe anyjson isn't able to find it there. Anthony

Re: [web2py] Re: One last thing

2011-02-21 Thread Jonathan Lundell
On Feb 21, 2011, at 2:57 PM, Jack Lyons wrote: > List of known json modules, and the names of their serialize/unserialize > methods, as well as the exception they throw. Exception can be either > an exception class or a string. > """ > _modules = [("cjson", "encode", "EncodeError", "dec

Re: [web2py] Re: One last thing

2011-02-21 Thread Plumo
What Python version are you using? The json module was introduced in 2.5. simplejson can be downloaded here: https://github.com/simplejson/simplejson try: import simplejson as json except ImportError: import json

Re: [web2py] Re: One last thing

2011-02-21 Thread Jack Lyons
Jonathan- When I tried to put that in my script, I got this error message: Traceback (most recent call last): File "gluon/restricted.py", line 188, in restricted File "/Users/jacklyons/Downloads/web2py/web2py.app/Contents/Resources/applications/Stalker/models/anyjson.py"

Re: [web2py] Re: One last thing

2011-02-21 Thread Jack Lyons
Plumo- Web2Py is using 2.5.1, I have 2.7 on my computer. On Mon, Feb 21, 2011 at 6:13 PM, Jack Lyons wrote: > Jonathan- > > When I tried to put that in my script, I got this error message: > > > Traceback (most recent call last): > > > File "gluon/restricted.py", line 188, in restricted > >

[web2py] Re: logging time spent in sql statements ?

2011-02-21 Thread NetAdmin
Maybe you could use a trigger on update, insert or delete, but I'm not sure how to do it for a simple "select" statment. On Feb 21, 4:26 pm, Stef Mientki wrote: > hello, > > is there a way to log the time-duration of all sql statements ? > > thanks, > Stef Mientki

Re: [web2py] Re: One last thing

2011-02-21 Thread Jack Lyons
That fixed that problem, but I am now back to my original error: "No supported JSON Module Found" On Mon, Feb 21, 2011 at 6:16 PM, Jonathan Lundell wrote: > On Feb 21, 2011, at 3:13 PM, Jack Lyons wrote: > > When I tried to put that in my script, I got this error message: > > > > Traceback (most

[web2py] logging time spent in sql statements ?

2011-02-21 Thread Stef Mientki
hello, is there a way to log the time-duration of all sql statements ? thanks, Stef Mientki

[web2py] Re: Tornado Web2py how to set up in Production Envrironment?

2011-02-21 Thread Massimo Di Pierro
web2py does not async IO and its bottle neck is database IO. I doubt you would see any performance improvement of tornado over rocket. I tried and I did not see it. On Feb 21, 1:59 pm, Andrew Evans wrote: > Does any one have any resources on setting up web2py and Tornado in a > production environ

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread greenpoise
I wasnt sure if this was going to be a good post because of the subject, but I totally agree with Antonio...I have bought the book the three times it has been out and I would buy it again and again but I wish the book could cover more examples that are here in the groups rather than us having to fi

Re: [web2py] Re: One last thing

2011-02-21 Thread Jonathan Lundell
On Feb 21, 2011, at 3:13 PM, Jack Lyons wrote: > When I tried to put that in my script, I got this error message: > > Traceback (most recent call last): > > > > File "gluon/restricted.py", line 188, in restricted > > > File > "/Users/jacklyons/Downloads/web2py/web2py.app/Contents/Resourc

[web2py] Re: Sharing knowledge in this group. What is the point ?

2011-02-21 Thread Michael McGinnis
That's great. I like the idea of having two or three layers of documentation, which would allow "Here is a basic overview of this feature, but click here to read all the details." I agree that people shouldn't have to Google to learn about older features, but only to learn about new features that h

[web2py] Re: Spatial Database Modeling

2011-02-21 Thread Tim Michelsen
> extension for web2py or if it's better to turn to geoDjango. Considering > that Massimo said that "Most of that work was done on a very old web2py > version" I'd like to know how different is the web2py code now. For > examples I started studing mr Tsega thesis and I couldn't find a > "translator

Re: [web2py] Re: logging time spent in sql statements ?

2011-02-21 Thread Martín Mulone
web2py.py -F profiler.log 2011/2/21 NetAdmin > Maybe you could use a trigger on update, insert or delete, but I'm not > sure how to do it for a simple "select" statment. > > > On Feb 21, 4:26 pm, Stef Mientki wrote: > > hello, > > > > is there a way to log the time-duration of all sql statement

[web2py] Re: One last thing

2011-02-21 Thread DenesL
Posting the actual error and the related code might help. On Feb 21, 5:08 pm, Jack315 wrote: > Please respond soon, this is urgent! > > On Feb 21, 4:15 pm, Jack315 wrote: > > > Hello, > > > I have what will most likely be my last question relating to my > > current project. I have set up a twit

Re: [web2py] Re: App profiling?

2011-02-21 Thread Martín Mulone
It's working very well. 2011/2/21 Massimo Di Pierro > This should work... > > massimo-di-pierros-macbook-2:web2py mdipierro$ python web2py.py -h > > -F PROFILER_FILENAME, --profiler=PROFILER_FILENAME >profiler filename > ... > > it should store profiler info in the

[web2py] Re: How to manipulate default tables and use them with powertable

2011-02-21 Thread Ialejandro
Help! Why anybody answer me? :( On Feb 21, 3:25 pm, Ismael Alejandro wrote: > Hi!! I have a new doubt, this time I'm trying to customize a > table generated by a search, this is what I have: > > (Model) > > db.define_table('category', >             Field('name','string'),format='%(name)s') > > db

[web2py] Re: Date intervals split

2011-02-21 Thread DenesL
request.vars contains only strings but form.vars will contain the appropriate data type after form.validates so form.vars.Fin and form.vars.Interval should be datetime.date objects. On Feb 21, 3:56 pm, JmiXIII wrote: > I need to split a date range into shorter intervalle : > >     Selection=FOR

[web2py] Re: Date intervals split

2011-02-21 Thread Brian M
Let web2py do its magic. Give each of those date input fields an _id and _class="date" The _class="date" will make web2py automatically assign the date selector widget to the field (and that widget needs the _id to work). Then when processing the form, use form.vars.Fin instead of request.va

[web2py] Re: Date intervals split

2011-02-21 Thread JmiXIII
simpler : Does somebody know how I could transform a field passed via FORM in a datetime dal compliant field ? Thanks a lot ... On 21 fév, 21:56, JmiXIII wrote: > I need to split a date range into shorter intervalle : > >     Selection=FORM(TABLE(TR( >     (TD("De l'article",SELECT(_name='DebAr

[web2py] Re: Date intervals split

2011-02-21 Thread JmiXIII
Ooops sorry I did not see the answers On 22 fév, 00:29, JmiXIII wrote: > simpler : > > Does somebody know how I could transform a field passed via FORM in a > datetime dal compliant field ? > Thanks a lot ... > > On 21 fév, 21:56, JmiXIII wrote: > > > I need to split a date range into shorter in

Re: [web2py] Re: One last thing

2011-02-21 Thread Jonathan Lundell
On Feb 21, 2011, at 3:12 PM, Plumo wrote: > What Python version are you using? The json module was introduced in 2.5. 2.6, unfortunately. > simplejson can be downloaded here: https://github.com/simplejson/simplejson >

Re: [web2py] Re: One last thing

2011-02-21 Thread Jonathan Lundell
On Feb 21, 2011, at 3:19 PM, Jack Lyons wrote: > That fixed that problem, but I am now back to my original error: "No > supported JSON Module Found" Then try making it gluon.contrib.simplejson instead. > > On Mon, Feb 21, 2011 at 6:16 PM, Jonathan Lundell wrote: > On Feb 21, 2011, at 3:13 PM,

[web2py] Re: Date intervals split

2011-02-21 Thread JmiXIII
Thanks a lot , too late for testing this evening but I'll try the class solution as soon as possible. At the end , I'd like to select a duration time and splite the interval into regular interval of the selected duration (sorry for my bad english For example : Debut : 2010-01-01 Fin : 2010-12-31 In

[web2py] newb - authorized JSON ?

2011-02-21 Thread darkblue_b
Hi All- just stumbled upon web2py, glad to see it! I built a model that works for a client, and now simply want to return JSON *for a logged in user".. I am sure this is straightforward, but maybe someone could say it in a simple way.. thanks in advance -Brian

[web2py] europython 2011

2011-02-21 Thread Massimo Di Pierro
http://ep2011.europython.eu/call-for-paper/ I cannot make it but if you want to give a talk on web2py or web2py- related, I can help you any way you want. Just let me know. Massimo

[web2py] PowerTable default search filter

2011-02-21 Thread Ialejandro
Hi! I'm working with powertable, but I need to have a default search filter. Is it possible?? For example, could I have a dropdown with some keywords (and of course a default) instead the text input (in the search area), or could I have a default word in this area??

[web2py] Re: Date intervals split

2011-02-21 Thread Brian M
You may want to look at the python-dateutil module from http://niemeyer.net/python-dateutil it makes it easy to do date manipulation like adding/subtracting days, weeks, months, etc. The _class part just makes a handy datepicker widget appear in the UI. The important part is to use form.vars i

[web2py] Re: logging time spent in sql statements ?

2011-02-21 Thread NetAdmin
You could even do something like this... def makesome(): from gluon.contrib.populate import populate import datetime tstart = datetime.datetime.now().second # insert 2500 random records # YOU MAY WANT TO DO THIS ON A TEST TABLE populate(db.yourtable, 2500) tend =

[web2py] Re: newb - authorized JSON ?

2011-02-21 Thread Massimo Di Pierro
The easies way is from gluon.serializers import json @auth.requires_login() def f(): return json(data) or @auth.requires_login() def f(): return dict(data=data) and call it with http://.json (int this second case you must return a dict) and call it with .json On Feb 21, 5:14 

[web2py] Re: How to manipulate default tables and use them with powertable

2011-02-21 Thread Brian M
Try something like this. (Untested but should be close) form = SQLFORM.factory(Field("category",label="Book Category", requires=IS_IN_DB(db.category, 'category.id', 'category.name', error_message="Please pick a category from the list"))) if form.accepts(request.vars, session, keepvalues=True):

  1   2   >