Re: [web2py] Re: How to build a modular menu

2012-07-16 Thread Johann Spies
Thanks Jaap and Cliff. It was helpful. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --

[web2py] Re: Need a little help with DAL

2012-07-16 Thread pbreit
Looks like it is comparing them as strings. As others noted, need to see code. --

[web2py] Re: pg8000 '%' not supported in quoted string

2012-07-16 Thread KMax
Ок. I will post it here. вторник, 17 июля 2012 г., 3:36:09 UTC+7 пользователь Derek написал: > > So escape it. In Python, % usually refers to a variable that follows the > string. If you want a literal percent sign, then you need to double it. %%. > Seems like gluon is not escaping it properly. I

Re: [web2py] Re: Making a field non-editable, but writable using SQLFORM

2012-07-16 Thread Anthony
Can you elaborate? On Tuesday, July 17, 2012 12:24:37 AM UTC-4, amit wrote: > > Old thread, but this would trigger a race condition in case of multiple > concurrent users. > > On Friday, June 17, 2011 5:12:27 AM UTC+8, JayShaffstall wrote: >> >> I'd been thinking I needed to do that between form

[web2py] Re: Funny observed behaviour in custom form

2012-07-16 Thread Anthony
By default, form.accepts() does the insert automatically (unless you set dbio=False), and your redirect doesn't happen until after the insert. Anthony On Tuesday, July 17, 2012 12:38:02 AM UTC-4, Pystar wrote: > > I have a controller that presents a form, but I put a constraint that if > the us

[web2py] How to start a thread upon starting of webserver?

2012-07-16 Thread Amit
Hi, I have one timer thread which has to start once when web sever starts very first time and stop when web server stops, means it should be running continuously irrespective of how many users interacting with the application so there is only one instance of this thread running though out life

[web2py] Funny observed behaviour in custom form

2012-07-16 Thread Pystar
I have a controller that presents a form, but I put a constraint that if the user is not logged on (checked using auth.is_logged_in()) the entered form data should not be inserted but the user should be directed to the login form. But to my surprise, if the user is redirected to the logged in f

Re: [web2py] Re: Making a field non-editable, but writable using SQLFORM

2012-07-16 Thread amit
Old thread, but this would trigger a race condition in case of multiple concurrent users. On Friday, June 17, 2011 5:12:27 AM UTC+8, JayShaffstall wrote: > > I'd been thinking I needed to do that between form creation and the > accepts call, but you're right, it works even after that point. I >

[web2py] Re: response.JSON Decimal problem

2012-07-16 Thread Vineet
I grabbed the latest serializers.py from trunk & the problem is solved. Thanks, Vineet --

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
Try replace request.body = copystream_progress(request) ### stores request body with try: request.body = copystream_progress(request) ### stores request body except IOError: raise HTTP(400,"Bad Request - HTTP body is incomplete") in main.py. Does the problem

Re: [web2py] Re: how to delete records from table older than 1 day?

2012-07-16 Thread Amit
Thanks Niphold, its working as intended :) On Mon, Jul 16, 2012 at 3:55 PM, Niphlod wrote: > Why write such a query when DAL allows you to use a more (portable, > concise) pythonic way ? > > import datetime > yesterday = request.now - datetime.timedelta(days=1) > db(db.employee.created_on < yest

[web2py] Re: How to build a modular menu

2012-07-16 Thread Cliff Kachinske
submenu = [] response.menu = [ (T('Home'), False, URL('default', 'index'), submenu), ] if needsubmenu: sub_submenu = [] submenu.append([ (T('A submenu item'), False, URL('mygreatapp', blah), sub_submenu), # more menu items ]) if needsub_submenu: subsubmenu.append([

Re: [web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread Bruce Wade
Yeah I use both approaches, model-less + model folders so I don't have to import in the actual controllers. I also just use functions instead of classes to prevent all the extra overhead. On Mon, Jul 16, 2012 at 2:07 PM, wdtatenh wrote: > Thanks very much. I'm thinking that I'm probably going t

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
I personally think if we are just going to leave it as it, then we should not have it create an error ticket as I have had plenty of tickets created by this. On Mon, Jul 16, 2012 at 7:13 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > The more I think about this the more I am convinc

[web2py] Re: Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
The more I think about this the more I am convinced this is not of concern. It is very well possible that a slow client sends you the header of a request, then closes the connection before finishing (perhaps the user killed the page, or stopped the browser while doing an upload or something slo

[web2py] Re: Jeditable and SQLTables

2012-07-16 Thread Simon Ashley
Thanks Brent, Sorry for the delay - first chance to delve into this again. Still no luck. Have tried various combinations but unable to get jeditable fire in this setup. Do you have a quick example that works (just a cut and paste one would do)? TIA. --

Re: [web2py] Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
You are right. rocket does not help. I cannot think of any recent that may have fixed this but, before we spend time debugging this, it would be better if you could at least run stable 1.99.7 or better trunk. On Monday, July 16, 2012 6:28:25 PM UTC-5, Brian M wrote: > > Bruce - Yeah, I doubt thi

[web2py] Re: IntegrityError: column email is not unique

2012-07-16 Thread Massimo Di Pierro
For the time being... remove unique=True and use requires=(IS_EMAIL(),IS_NOT_IN_DB(db,'auth_user.email')) On Monday, July 16, 2012 9:01:54 PM UTC-5, Massimo Di Pierro wrote: > > This is a bug. The archive function creates a an auxiliary table to store > copies of the current record. > It reprod

[web2py] Re: IntegrityError: column email is not unique

2012-07-16 Thread Massimo Di Pierro
This is a bug. The archive function creates a an auxiliary table to store copies of the current record. It reproduces the same table structure as your table including (incorrectly) the unique attribute. This fails when you insert ore than one revision. Please open a ticket on google code. This

[web2py] Re: error : socket.gethostbyname(http_host)] : gaierror: [Errno -2] Name or service not known

2012-07-16 Thread Massimo Di Pierro
Never heard of this before. Fixed in trunk. Thanks for reporting it. On Monday, July 16, 2012 4:25:01 PM UTC-5, Carlos wrote: > > Hi, > > Every now and then, I see the following error in my server logs: > > ERROR:web2py:Traceback (most recent call last): > File "/home/www-data/web2py/gluon

[web2py] Web2py expert needed for start-up

2012-07-16 Thread Pepe C
Hi, We have a set of applications on web2py and we are looking for an expert that can help us to operate and develop them. This is a long-term role taking ~10 hours a week, although we do have a bunch of additional work to get done in the next few weeks. Responsibilities include: - Deve

[web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread wdtatenh
Thanks very much. I'm thinking that I'm probably going to have to go to a model-less app because this is going to be much bigger given the breadth of what I'm trying to accomplish. On Monday, July 16, 2012 4:52:56 PM UTC-4, Derek wrote: > > There should be no benefit to moving them to multiple

[web2py] Re: A blog app with no models - to include in /appliances

2012-07-16 Thread Massimo DiPierro
Can you please resend me the updated w2p file and a screenshot? On Jul 16, 2012, at 4:31 PM, Bruno Rocha wrote: > Hi, > > I just found that my example of Model Less Blog is not listed in > web2py.com/appliances > > This app can be a start point for those who want to test and improve the > Mod

[web2py] Re: How to update fields from different tables in a single form

2012-07-16 Thread Anthony
Does this help: http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables On Monday, July 16, 2012 8:56:24 PM UTC-4, mrtn wrote: > > > Hi, > > I have a field (say 'field_a') from table 'A', and a field ('field_b') > from table 'B', and the two tables are linked such that they sha

[web2py] How to update fields from different tables in a single form

2012-07-16 Thread mrtn
Hi, I have a field (say 'field_a') from table 'A', and a field ('field_b') from table 'B', and the two tables are linked such that they share a field. Now I want to create a single form in a view which updates both 'field_a' and 'field_b' in one submission. What is the proper way of doing this

[web2py] Re: How to build a modular menu

2012-07-16 Thread JaapP
Hi Johan, following code works for me to insert some items from the db into a submenu: response.menu = [ ('Home', False, URL('default','index'), []), ] if auth.is_logged_in(): locaties = db(db.locatie.apotheek_id==auth.user.apotheek_id).select() if locaties: locaties_

[web2py] Re: web2py on EC2

2012-07-16 Thread lyn2py
I tried and it said, command not found. I did: sudo ./setup-web2py-ubuntu.sh Or how should the command be? Thanks for the help! On Tuesday, July 17, 2012 2:11:33 AM UTC+8, rdodev wrote: > > Run with 'sudo' in front. > > On Monday, July 16, 2012 1:46:28 PM UTC-4, lyn2py wrote: >> >> Hi, >> >> I

Re: [web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread wdtatenh
Thanks very much for this information. I need to examine it more closely but it looks darn good. I'm hoping with this change and re-organizing my controllers, then my site will speed up significantly. At present, it is slower than raw maple syrup and I can't afford to stay with web2py if I ca

[web2py] Re: Help! IOErrors

2012-07-16 Thread Brian M
I'm on Version 1.99.4 (2011-12-22 11:20:45) stable. Yeah it is a bit old - at this point waiting for 2.0 stable to come out. On Monday, July 16, 2012 9:58:53 AM UTC-5, Massimo Di Pierro wrote: > > Which web2py version? The error is from copying the request body into a > tmp object in web2py. Lo

Re: [web2py] Help! IOErrors

2012-07-16 Thread Brian M
Bruce - Yeah, I doubt this is file permissions - it doesn't happen on every request, just occasionally though seemingly over time more frequently. Most often seen on ajax requests but occasionally on "regular" page requests too (though since there are many more ajax requests coming in it makes

Re: [web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread Bruce Wade
Split models folder into multiple folders 1 per controller then define tables used for each controler.. for more fine control add folders inside the folders you just created with one per controller action and define only tables used for that action. On Jul 16, 2012 2:47 PM, "Anthony" wrote: > The

[web2py] Re: Can't import external modules

2012-07-16 Thread DonH
Yes, I was running the web2py for OS X. I have switched to the web2py source version and it now works. Thanks for the help! -- Don On Monday, July 16, 2012 9:57:15 AM UTC-4, Massimo Di Pierro wrote: > > Are you running the web2py for OSX? That ships with its own python > interpreter and igno

[web2py] IntegrityError: column email is not unique

2012-07-16 Thread Remco K
Hi everyone, I got stuck in creating an update form for an auth_user. In the auth_user table i made an extra field: Field('email', length=128, default='', unique=True, notnull=True), Now everytime i try to update the user information (the last name) i get the error: IntegrityError: column ema

[web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread Anthony
> > There should be no benefit to moving them to multiple model files. It > would have the same performance (or perhaps slower). > > The models file is processed on every page load, so it can get expensive > if you have a lot of tables defined in it. > I'm sure Bruno can chime in here, but here

[web2py] Re: A blog app with no models - to include in /appliances

2012-07-16 Thread Bruno Rocha
Also, I will change the way datamodels are defined, I learned a good trick from my use of Django. *Instead of:* class Post(object): tablename = "post" def set_propertieds(self): self.fields = [ Field("name"), Field("email"), ] *We can do:*

[web2py] Re: Scheduler: help us test it while learning

2012-07-16 Thread Pystar
I downloaded the app, tried to upload and install it but it always gives an error message "failed to install app". I also renamed it but no changes On Sunday, July 15, 2012 9:02:01 PM UTC+1, Niphlod wrote: > > Maybe if you tell what issues you have we'll be able to help you . > > > > On Sunda

[web2py] error : socket.gethostbyname(http_host)] : gaierror: [Errno -2] Name or service not known

2012-07-16 Thread Carlos
Hi, Every now and then, I see the following error in my server logs: ERROR:web2py:Traceback (most recent call last): File "/home/www-data/web2py/gluon/main.py", line 401, in wsgibase socket.gethostbyname(http_host)] gaierror: [Errno -2] Name or service not known So far today I'm

Re: [web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread Bruno Rocha
You can also download a modelless app here: https://github.com/rochacbruno/web2py_model_less_app/downloads I am using this approach for all my apps ( But I know we have things to improve) On Mon, Jul 16, 2012 at 5:52 PM, Derek wrote: > There should be no benefit to moving them to multiple model

[web2py] Re: response.JSON Decimal problem

2012-07-16 Thread Massimo Di Pierro
fixed. please try it On Monday, 16 July 2012 14:56:16 UTC-5, Derek wrote: > > Jsondecoder does not accept Decimal objects. Take a look at > serializers.py. You could try converting to float. > > See here for workarounds... > > http://stackoverflow.com/questions/1960516/python-json-serialize-a-dec

[web2py] Re: Recommendations on model file size (database tables)

2012-07-16 Thread Derek
There should be no benefit to moving them to multiple model files. It would have the same performance (or perhaps slower). The models file is processed on every page load, so it can get expensive if you have a lot of tables defined in it. I'm sure Bruno can chime in here, but here is his recipe

[web2py] Re: Auth.register() questions

2012-07-16 Thread Massimo Di Pierro
The register function, as all the functions in auch which return a form, call process internally. Therefore if you fo form = auth.register() form.process() you would be calling process twice with undesired consequences. Moreover if the process() called inside it successful and the form was acce

Re: [web2py] How to update the cached value?

2012-07-16 Thread Derek
Right. My point was that you shouldn't concern yourself with getting stale values from the database because you cached them, and they changed short of the refresh interval. I have a website that caches things for 15 minutes, and I just tell my users that they won't see changes (on certain things

[web2py] Recommendations on model file size (database tables)

2012-07-16 Thread wdtatenh
I've got to move a bunch of stuff around to speed up my site particularly on the controller folder. My question is that I have nearly 50+ tables defined in my db.py file. Is there any benefit to splitting these tables into multiple model files? The tables belong to a single database and most

[web2py] Re: Restful authentication and CORS

2012-07-16 Thread rdodev
Massimo, I believe Alec already has one he linked to: Keep an eye on this issue: http://code.google.com/p/web2py/issues/detail?id=872 so I'm assuming you don't need another one for essentially the same feature request. :) On Monday, July 16, 2012 4:41:11 PM UTC-4, Massimo Di Pierro wrote: >

[web2py] Re: Restful authentication and CORS

2012-07-16 Thread Massimo Di Pierro
Please open a ticket. On Monday, 16 July 2012 13:09:29 UTC-5, rdodev wrote: > > Massimo, > > As Alec mentioned above, if not RESTful, OAuth and jsonrpc/jsonp would > work as well. So if this is the preferred approach to non-browser/mobile > authentication I could definitely work with that. > >

[web2py] Re: pg8000 '%' not supported in quoted string

2012-07-16 Thread Derek
So escape it. In Python, % usually refers to a variable that follows the string. If you want a literal percent sign, then you need to double it. %%. Seems like gluon is not escaping it properly. If you can post your whole traceback, I could help you to find out what file you need to add the extra

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
No, the "em" still raises an AttributeError. In the post above, I've included all the code to duplicate the problem... On Monday, July 16, 2012 4:17:48 PM UTC-4, Derek wrote: > > Try to use "em", see if you still get the same problem. > > 1em = 12pt > > http://www.getallfix.com/2011/11/convert-em

[web2py] Re: Want to build a site like flattr on web2py/python?

2012-07-16 Thread lukedc
Thank you very much for that response. Very helpful. thank you so much once again, Luke On Monday, July 16, 2012 12:57:03 PM UTC-5, Massimo Di Pierro wrote: > > Is has been done (in web2py): http://www.ekjaa.org/Ekjaa/default/index > > They do not have legal permission to accept payments outside

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread Derek
Try to use "em", see if you still get the same problem. 1em = 12pt http://www.getallfix.com/2011/11/convert-empxpt-and-in-css/ On Monday, July 16, 2012 1:08:13 PM UTC-7, thinkwell wrote: > > Well, me again. I decided that I wanted to use points as measurements > instead of percentages, so now

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
Well, me again. I decided that I wanted to use points as measurements instead of percentages, so now it barfs with an AttributeError. from gluon.contrib.pyfpdf import FPDF, HTMLMixin from gluon.html import * pets = TABLE(_width="720pt") pets.append(TR(TH('Dogs', _width="72pt", _align="left")

[web2py] Re: response.JSON Decimal problem

2012-07-16 Thread Derek
Jsondecoder does not accept Decimal objects. Take a look at serializers.py. You could try converting to float. See here for workarounds... http://stackoverflow.com/questions/1960516/python-json-serialize-a-decimal-object On Monday, July 16, 2012 7:34:25 AM UTC-7, Vineet wrote: > > Hi ! > From

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Niphlod
You're right, it's 1 query per request more (2 if session is updated), but it's a pkey lookup (and eventually an update) vs scan a dir, open file, lock it, read it, (eventually save) and close it. Without available perftest I tend to agree that file-based session in separate folders is better

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
Storing them in the database will slow down your website depending on which database, how many users and how many sessions you create. On a heavy hit site the DB is going to slow down a lot. I am trying to figure out a way how to handle sessions on the client site as secure as possible so the serv

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Niphlod
I'm storing sessions on database for my app with no apparent problems (1.99.7 stable) for storing them in redis, currently there is no way (sorry). When I implemented cache in redis it seemed that I was the only one using a redis stack along web2py...generally redis adoption is quite sparse

[web2py] Auth.register() questions

2012-07-16 Thread cyan
I have a couple of questions about the provided Auth.register() function (I suppose they also apply to other Auth functions in general): 1. In a controller, if I do: def register(): return dict(form=auth.register()) with the following settings in a model: auth.settings.registration_requir

[web2py] Re: web2py on EC2

2012-07-16 Thread rdodev
Run with 'sudo' in front. On Monday, July 16, 2012 1:46:28 PM UTC-4, lyn2py wrote: > > Hi, > > I have browsed a few older threads on this but didn't manage to find an > answer. Hope I can get help here. > > I started an instance with Ubuntu image, per the instructions here: > http://www.scribd.co

[web2py] Re: Restful authentication and CORS

2012-07-16 Thread rdodev
Massimo, As Alec mentioned above, if not RESTful, OAuth and jsonrpc/jsonp would work as well. So if this is the preferred approach to non-browser/mobile authentication I could definitely work with that. Thanks. On Monday, July 16, 2012 1:59:30 PM UTC-4, Massimo Di Pierro wrote: > > Can you d

[web2py] Re: Restful authentication and CORS

2012-07-16 Thread Massimo Di Pierro
Can you descrive in some details the API's you would like to have? If there is agreement it would not much to add them. On Monday, 16 July 2012 10:18:55 UTC-5, rdodev wrote: > > I'm developing a web2py app that will be used as the back-end for a mobile > app. The mobile app will be making API ca

[web2py] Re: Want to build a site like flattr on web2py/python?

2012-07-16 Thread Massimo Di Pierro
Is has been done (in web2py): http://www.ekjaa.org/Ekjaa/default/index They do not have legal permission to accept payments outside of India. Contact them. Perhaps they are willing to share the code and or parter with you. Massimo On Monday, 16 July 2012 10:20:11 UTC-5, lukedc wrote: > > Can i

Re: [web2py] solicitation for help with public health project for lip reading

2012-07-16 Thread Jason Brower
Sounds fun! Let's talk more about it. skype:super-jason or just use my email... On 07/16/2012 01:23 AM, web-dev-m wrote: I am working on many projects, and I figured I would ask for help on here to see if anyone wants to help with this. We are currently working on a project to help hearing im

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
Thanks Mariano & Alan. Adding width to TD or TH tags did resolve the problem using the original html.py file without the fix implemented.*(Mariano, I tried installing your script and at this point it still fails when no width is specified. Another little issue, os.startfile() seems to be a Wind

[web2py] web2py on EC2

2012-07-16 Thread lyn2py
Hi, I have browsed a few older threads on this but didn't manage to find an answer. Hope I can get help here. I started an instance with Ubuntu image, per the instructions here: http://www.scribd.com/doc/26436821/Howto-deploy-Web2py-on-amazon-Ec2 And got stuck at this command: ./setup-web2py-ub

Re: [web2py] Restful authentication and CORS

2012-07-16 Thread Alec Taylor
On Tuesday, July 17, 2012 2:20:08 AM UTC+10, David Marko wrote: > > +1 from me having this. Btw. On client side i'm using AngularJS and > Trigger.io (instead of PhoneGap) I've been looking around, and will have one of the following setups: - *AngularJS * with *Barrist

Re: [web2py] Restful authentication and CORS

2012-07-16 Thread Alec Taylor
On Tue, Jul 17, 2012 at 2:20 AM, David Marko wrote: > +1 from me having this. Btw. On client side i'm using AngularJS and Trigger.io (instead of PhoneGap) I've been looking around, and will have one of the following setups: - *AngularJS * with *BarristerRPC

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruno Rocha
I tested putting sessions in database, but for some strange reason, when sessions are in db, user are not redirect to login._next after the login, and other issues. Also I think sessions in db gets a bit slower. I am planning to test sessions in redis. On Mon, Jul 16, 2012 at 1:01 PM, Bruce Wade

Re: [web2py] Restful authentication and CORS

2012-07-16 Thread David Marko
+1 from me having this. Btw. On client side i'm using AngularJS and Trigger.io (instead of PhoneGap)

Re: [web2py] Restful authentication and CORS

2012-07-16 Thread Alec Taylor
Hi rdodev, I'm doing the exact same thing (well similar concept... using PhoneGap and remote auth, but using JSONRPC and OAuth2 instead of REST and regular auth) Keep an eye on this issue: http://code.google.com/p/web2py/issues/detail?id=872 When the dev's get the time they'll be adding in diges

[web2py] Restful authentication and CORS

2012-07-16 Thread rdodev
I'm developing a web2py app that will be used as the back-end for a mobile app. The mobile app will be making API calls to the service for anything ranging from login/authentication to CRUD operations. The auth model that comes baked into web2py would suffice, except that it's not RESTful and i

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
That I/o warning shouldn't take down your site I have the same issue with linode. I think sessions need to be done differently especially on high load sites with a load balancer sometimes I find over 400,000 files in the session folder on each server × 4 On Jul 16, 2012 8:14 AM, "Bruno Rocha" wrot

[web2py] Want to build a site like flattr on web2py/python?

2012-07-16 Thread lukedc
Can it be done? And what will I need to know? I am learning Python now, will be learning web2py soon. The site will take points from people, and then use the points given to determine how much money to give to the websites. Can I do all this with web2py? Also, what will I need to learn? I only

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruno Rocha
I am having a related problem. "Your Linode, blouserver, has exceeded the notification threshold (1000) for disk io rate by averaging 1382.77 for the last 2 hours: I receive this message every 2 hour, so my nginx get bas gateway and I need to do "rm sessions/* " and also "/etc/init.d/uwsgi resta

[web2py] Re: Sending emails through Amazon SES

2012-07-16 Thread rdodev
Oh yes, there is: check out boto. They're fairly active and the product is fairly mature. I've helped them with the docs and we use use boto on most of our products. On Monday, July 16, 2012 10:15:19 AM UTC-4, murtaza52 wrote: > > > I can do this by just using the SMTP interface of AWS as no p

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
This may be related to a bug in rocket that was not catching timouterror and occasionally sending/receiving incomplete requests. Try upgrade rocket.py yo trunk. You can leave everything unchanged. Let us know if the error go away. It is also possible that the request is actually invalid (the br

Re: [web2py] Re: Help! IOErrors

2012-07-16 Thread Bruce Wade
I am using the latest stable still. On Mon, Jul 16, 2012 at 7:58 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Which web2py version? The error is from copying the request body into a > tmp object in web2py. Looks like the request declares a size in the header > but it is shorter (t

[web2py] Re: Help! IOErrors

2012-07-16 Thread Massimo Di Pierro
Which web2py version? The error is from copying the request body into a tmp object in web2py. Looks like the request declares a size in the header but it is shorter (truncated). On Friday, 13 July 2012 16:27:51 UTC-5, Brian M wrote: > > I'm having ongoing problems with IOErrors from one of my

[web2py] response.JSON Decimal problem

2012-07-16 Thread Vineet
Hi ! >From a controller, I am trying to return a jsonified resultset (obtained by executing sql directly). resultset = ( ('201207020920', Decimal('5308.20'), Decimal('5308.20'), Decimal('5288.00'), Decimal('5292.40'), ...) ## convertd it to list of lists list_of_tuples = list(resultset) list_o

Re: [web2py] Help! IOErrors

2012-07-16 Thread Bruce Wade
I also get these errors randomly on nginx+uwsgi+ubuntu so I really don't think it is a file permissions problem as it happens randomly. On Mon, Jul 16, 2012 at 12:25 AM, Johann Spies wrote: > On 13 July 2012 23:27, Brian M wrote: > >> I'm having ongoing problems with IOErrors from one of my web2

[web2py] Re: Sending emails through Amazon SES

2012-07-16 Thread murtaza52
I can do this by just using the SMTP interface of AWS as no python wrapper is available for its API! On Monday, July 16, 2012 5:51:22 PM UTC+5:30, murtaza52 wrote: > > Hi, > > I would like to send emails using Amazon SES that have attachments. Any > pointers on how I could do that. > > We are

[web2py] Re: Need a little help with DAL

2012-07-16 Thread Anthony
Can you send your exact code? On Monday, July 16, 2012 8:35:15 AM UTC-4, Aurelijus Useckas wrote: > > Hi, > > I have declared a table 'company' and the Field 'workers' which expects > the number of workers in the company: > > db.define_table('company', > (...) > Field('workers', 'integer'),

[web2py] Re: Can't import external modules

2012-07-16 Thread Massimo Di Pierro
Are you running the web2py for OSX? That ships with its own python interpreter and ignores any other python and module you may have installed. I suggest you use web2py source since you already have python installed. On Sunday, 15 July 2012 14:26:11 UTC-5, DonH wrote: > > I have installed an exte

[web2py] Re: Ajax Records Delete

2012-07-16 Thread Massimo Di Pierro
grid = SQLFORM.grid(db.Cars) does what you ask. Look at the generated code and the source code of the grid in sqlhtml.py On Monday, 16 July 2012 02:38:53 UTC-5, Hassan Alnatour wrote: > > Dear ALL ,, > > I want to delete records and return them in ajax , i have a table like > this : > > db.defi

[web2py] Re: Trunk version: admin not working

2012-07-16 Thread dederocks
Thanks for the feedback. My mistake -- access rights were missing. Sorry for the noise. André Le lundi 16 juillet 2012 09:16:46 UTC+2, dederocks a écrit : > > Hello, > > The trunk version does not allow access to the admin interface (ticket > issued). Is it me only? > > Andre >

Re: [web2py] How to build a modular menu

2012-07-16 Thread Richard Vézina
Johann, I think there is miss closed bracket in the first example of what you want. And, I am not sure that you really want a "+=" to combine your submenu, since they get add to the first level of the menu that way, maybe you want .append() or maybe you can "+=" but you will need some more "[]".

[web2py] Re: Need a little help with DAL

2012-07-16 Thread Niphlod
I can't reproduce the error. What db engine are you using and what web2py version are you running ? On Monday, July 16, 2012 2:35:15 PM UTC+2, Aurelijus Useckas wrote: > > Hi, > > I have declared a table 'company' and the Field 'workers' which expects > the number of workers in the company: >

[web2py] Need a little help with DAL

2012-07-16 Thread Aurelijus Useckas
Hi, I have declared a table 'company' and the Field 'workers' which expects the number of workers in the company: db.define_table('company', (...) Field('workers', 'integer'), The problem arrises when I want to do some computations with this field, for instance select some row. Strange s

[web2py] Sending emails through Amazon SES

2012-07-16 Thread murtaza52
Hi, I would like to send emails using Amazon SES that have attachments. Any pointers on how I could do that. We are deploying on GAE, but need to send emails from non google domains, thus using Amazon SES. The python libs that I have seen till now only allow emails to be sent without attachme

[web2py] How to build a modular menu

2012-07-16 Thread Johann Spies
I want to break up the following code to make it more modular, but I could so far not get it right: r esponse.menu = [ (T('Home'), URL('default', 'index') == URL(), URL('default', 'index'), []), ] akb_menu = [(T('Africa Knowledgebase'), False, None, [ (T('Articles'), False, No

[web2py] pg8000 '%' not supported in quoted string

2012-07-16 Thread KMax
Hello, Seems like an issue for me, pg8000 cant insert into db char '%'. As a result inserting string = 'We did it for 100%' throw an exception. '%'' not supported in quoted string pg8000 checks for '%' in an arguments, so... Thank you. -- Maxim

Re: [web2py] Re: we need testers for new functionalities

2012-07-16 Thread Vladyslav Kozlovskyy
Sorry, but I didn't find a mistake in markmin module. Probably it's a wiki-plugin issue. But I'm not familiar with this module yet. With the best regards, Vladyslav Kozlovskyy (Ukraine) 16.07.12 10:06, Vladyslav Kozlovskyy написав(ла): I known where is a problem. I'll fix it Vladyslav 16.07.

[web2py] Re: how to delete records from table older than 1 day?

2012-07-16 Thread Niphlod
Why write such a query when DAL allows you to use a more (portable, concise) pythonic way ? import datetime yesterday = request.now - datetime.timedelta(days=1) db(db.employee.created_on < yesterday).delete() On Monday, July 16, 2012 12:12:56 PM UTC+2, Amit wrote: > > Hi, > I have created tabl

[web2py] how to delete records from table older than 1 day?

2012-07-16 Thread Amit
Hi, I have created table Employe with following fields: db.define_table( 'Employee', Field('created_on','datetime', default=request.now), Field('emp_id'), Field('emp_age'), Field('emp_address), ) inserting data into the table is working fine but when i am trying to delete data one

[web2py] Re: 1.99.6 can't save, communications error

2012-07-16 Thread davidjensen
the configuration is web2py self install on ubuntu server # changes user and group owners to www-data, not root # because files copied in are root and must be www-data # find uid, gid by os.lstat # os.lchown does not work in windows def run(): import os uid = 33 gid = 33 the_path

Re: [web2py] Trunk version: admin not working

2012-07-16 Thread Johann Spies
On 16 July 2012 09:16, dederocks wrote: > Hello, > > The trunk version does not allow access to the admin interface (ticket > issued). Is it me only? > > > No problem here. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

[web2py] Ajax Records Delete

2012-07-16 Thread Hassan Alnatour
Dear ALL ,, I want to delete records and return them in ajax , i have a table like this : db.define_table('Cars', Field('Name'), Field('Age') ) and i get all the records to my page using a for loop over the object the equals db().select(db.Cars.ALL) what i want is to have a button next to e

Re: [web2py] Help! IOErrors

2012-07-16 Thread Johann Spies
On 13 July 2012 23:27, Brian M wrote: > I'm having ongoing problems with IOErrors from one of my web2py apps > deployed on Windows with Apache & mod_wsgi. Looks to me like the error > maybe happening at a lower level before it even gets to my app code? > > Traceback (most recent call last): > Fi

[web2py] Trunk version: admin not working

2012-07-16 Thread dederocks
Hello, The trunk version does not allow access to the admin interface (ticket issued). Is it me only? Andre

Re: [web2py] Re: we need testers for new functionalities

2012-07-16 Thread Vladyslav Kozlovskyy
I known where is a problem. I'll fix it Vladyslav 16.07.12 06:15, villas написав(ла): Regarding widgets, the trunk version seems to have introduced a problem. In the past I could do this as per the book: `` name:mywidget ``:widget But now this fails because of the first empty line. I can w