[web2py] question about processing db entries in chunks

2012-04-11 Thread weheh
I need to limit my processing of db entries to chunks of, let's say, 100. So I want to first get the data: data = db(db.mytable.flag == False).select(limitby=(0,100)) for d in data: # do something Then I want to set mytable.flag to True after the above loop is done, but only for the same 1

[web2py] Query or Expression for excluding certain values from DAL selection on GAE

2012-04-11 Thread Sathvik Ponangi
>From http://stackoverflow.com/q/10117143/937891 I'm trying to exclude posts which have a tag named meta from my selection, by: meta_id = db(db.tags.name == "meta").select().first().id not_meta = ~db.posts.tags.contains(meta_id) posts=db(db.posts).select(not_meta) But those posts still show up

[web2py] ImportError: cannot import name PickleableStorage after upgrading to 1.99.7

2012-04-11 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 After upgrade to 1.99.7. I started receiving this error: Traceback (most recent call last): File "/opt/web2py/gluon/restricted.py", line 194, in restricted in code it raises a RestrictedError containing the traceback. layer is File "/opt/web2p

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread Bruce Wade
I am having the exact same problem with uwsgi 2012/04/12 06:16:49 [error] 9428#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 108.172.101.4, server: 50.18.67.206, request: "GET / HTTP/1.1", upstream: "uwsgi://127.0.0.1:9001", host: "50.18.67.206"

[web2py] Adding a copy option to a SQLFORM.grid

2012-04-11 Thread Mike Veltman
Well I would like to have besides edit delete etc in my SQLFORM.grid also a copy option that copies the record and then gives me the edit so I can modify it. Anyone a idea how to do that ? Mike

[web2py] Browser back button: Reloading database results

2012-04-11 Thread pbreit
This article is sort of old but might help: http://www.mnot.net/cache_docs/

[web2py] Well So long to Google App_Engine

2012-04-11 Thread pbreit
Maybe too late for you but for anyone else trying to scale up, Cloudflare provides free CDN and a bunch more security and performance features, almost all free.

[web2py] Re: Add conditional sub-menu

2012-04-11 Thread Cliff
I have something like this working: sub_menu = [] if (auth.user_id != None) and ((auth.has_membership(role = 'admin'))): sub_menu = [('Admin', False, URL('admin')), ] response.menu = [('Home', False, URL('home','default','index'), []), (SPAN('Price List',_style='color:yellow'), True, UR

[web2py] Plugin Wiki, jqgrid, crud.create error

2012-04-11 Thread Simon Ashley
Just playing with the plugin wiki and jqgrid with a simple example below, but it return an error: Not sure why, any ideas? # List of Plant `` name: jqgrid table: plant fields: Code,Description,SMU,Date col_width: 80 width: 700 height: 300 ``:widget # New Plant `` name: create t

[web2py] Well So long to Google App_Engine

2012-04-11 Thread chawk
I am going to be moving my application off of the Google App Engine cloud. I liked some of the things that app engine did for www.noobmusic.com, but it is clear that I will end up spending an ass load of money trying to host a resource hog like noobmusic.com. I plan to put it on a dedicated

[web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-11 Thread greenpoise
Gotcha! Will try thanks On Wednesday, 11 April 2012 18:34:16 UTC-7, Massimo Di Pierro wrote: > > yes and not and what I said needs clarification. > > grid = SQLFORM.grid(create=False,update=False) is not a form. If > create=True or update=True then it contains a form when you are creating or >

[web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-11 Thread Massimo Di Pierro
yes and not and what I said needs clarification. grid = SQLFORM.grid(create=False,update=False) is not a form. If create=True or update=True then it contains a form when you are creating or updating a record. you must avoind a form within a form and you can do so in the view: {{if grid.create_

[web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-11 Thread greenpoise
A bit confused..I thought SQLFORM.grid was itself a form? Also, can I add more than one link per grid? Reading from the book, it creates a column so technically sounds as if I could??? On Wednesday, 11 April 2012 16:27:17 UTC-7, Massimo Di Pierro wrote: > > You can put the grid in a form and you

[web2py] Re: Can't rebuild database files

2012-04-11 Thread Massimo Di Pierro
I suspect the online docs is incorrect and fake_migrate does not work without migrate. I need to double check. Massimo On Wednesday, 11 April 2012 19:40:17 UTC-5, Yarin wrote: > > Massimo, this worked and I was able to get everything restored- thanks. > However I could use an explanation. Setti

[web2py] Re: Can't rebuild database files

2012-04-11 Thread Yarin
Massimo, this worked and I was able to get everything restored- thanks. However I could use an explanation. Setting both migrate *and* fake_migrate to True is not something prescribed in the documentation nor is it intuitive- how/why does this work? On Wednesday, April 11, 2012 7:25:21 PM UTC-4

[web2py] Re: How to add an input field in SQLFORM.grid??

2012-04-11 Thread Massimo Di Pierro
You can put the grid in a form and you add SQLFORM.grid(..., link=[lambda row: INTPUT(...)]) On Wednesday, 11 April 2012 17:07:58 UTC-5, greenpoise wrote: > > Is this possible?? I have a products table that shows all the products. I > also created an add to cart button in it problem is if I wan

[web2py] Re: Can't rebuild database files

2012-04-11 Thread Massimo Di Pierro
Can you true setting both migrate=True, fake_migrate_all=True? then call appadmin. What happens? On Wednesday, 11 April 2012 17:05:14 UTC-5, Yarin wrote: > > I corrupted my web2py -myql mapping and am trying to rebuild the web2py > database files from scratch. > > Starting point: > >- The

[web2py] Re: Mimicking HTML5 pattern attribute for inputs

2012-04-11 Thread Anthony
For server-side pattern validation, you can use the IS_MATCH() validator. For example: IS_MATCH('[A-F0-9]{11}|[A-F0-9]{14}', strict=True) That will match from the beginning of the string, and setting strict=True also requires matching the end of the string (equivalent to adding a "$" to the

[web2py] Re: Meteor web framework

2012-04-11 Thread Anthony
> > It seems to be the antithesis of web2py - it's made without any > considerations into security - those come after the basic functionality. If > you are interested in meteor, I suggest you have a look at > http://www.wakanda.org/ > It's more mature, and a lot better documented. > Not sure t

[web2py] Re: Mimicking HTML5 pattern attribute for inputs

2012-04-11 Thread Anthony
If you want to stick with client side validation, you might also consider a Javascript polyfill library like Webshims Lib ( http://afarkas.github.com/webshim/demos/), which lets you use HTML5 features in older browsers. Also note that although client-side validation improves the user experience,

[web2py] How to add an input field in SQLFORM.grid??

2012-04-11 Thread greenpoise
Is this possible?? I have a products table that shows all the products. I also created an add to cart button in it problem is if I want to add 100 items I would have to press the button 100 times. Is there a way to add a quantity text field??? Thanks Dan

[web2py] Re: Browser back button: Reloading database results

2012-04-11 Thread Anthony
> > Although one does wonder if Web2Py shouldn't default to the > Post/Redirect/Get design pattern... > http://en.wikipedia.org/wiki/Post/Redirect/Get > As long as you pass the session to form.process() (which is done by default), the form will include a single use _formkey, which prevents both

[web2py] Can't rebuild database files

2012-04-11 Thread Yarin
I corrupted my web2py -myql mapping and am trying to rebuild the web2py database files from scratch. Starting point: - The mysql database tables already exist. Some tables were working correctly under the old mapping, and some were never mapped. - I've already deleted everything from

Re: [web2py] Re: Browser back button: Reloading database results

2012-04-11 Thread Sebastian Jayaraj
Caching saves the results on the server side and makes return access to db select faster but not on the client browser. On Wed, Apr 11, 2012 at 5:34 PM, Derek wrote: > Although one does wonder if Web2Py shouldn't default to the > Post/Redirect/Get design pattern... > http://en.wikipedia.org/wiki

[web2py] Re: Browser back button: Reloading database results

2012-04-11 Thread Derek
Although one does wonder if Web2Py shouldn't default to the Post/Redirect/Get design pattern... http://en.wikipedia.org/wiki/Post/Redirect/Get On Wednesday, April 11, 2012 2:29:46 PM UTC-7, Derek wrote: > > Cache the results? > > On Wednesday, April 11, 2012 2:07:50 PM UTC-7, DJ wrote: >> >> Hel

[web2py] Re: Add a Add To Cart button in SQLFORM.grid

2012-04-11 Thread greenpoise
Nevermind, got it to work like this: links = [lambda row: A('+',callback=URL('cart_callback',vars=dict(id=row.id, action='add')))] On Wednesday, 11 April 2012 13:06:49 UTC-7, greenpoise wrote: > > Based on the online example, POS Online Store, I want to add a button to > add to cart in the

[web2py] Re: Browser back button: Reloading database results

2012-04-11 Thread Derek
Cache the results? On Wednesday, April 11, 2012 2:07:50 PM UTC-7, DJ wrote: > > Hello W2People, > > This may be a simple setting that I am unaware of - how does one retain > the database search results when you click the Back Button on the browser > without having to refresh the page and confirm

[web2py] Browser back button: Reloading database results

2012-04-11 Thread DJ
Hello W2People, This may be a simple setting that I am unaware of - how does one retain the database search results when you click the Back Button on the browser without having to refresh the page and confirming? Thank you, Sebastian

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread Michele Comitini
To handle static request using "alias" instead of "root" with regexp should work better set $web2pyroot location ~ ^/(.*)/static/(.*) { alias $web2pyroot/applications/$1/static/$2; } mic Il 11 aprile 2012 18:23, pbreit

[web2py] Re: process args

2012-04-11 Thread Derek
Correct. You'd need to url encode those characters... http://docs.python.org/library/urllib.html#urllib.urlencode and then use the 'unquote' to get back the original characters. On Monday, April 9, 2012 8:29:43 PM UTC-7, pbreit wrote: > > I don't think you can have those characters in a URL. And

[web2py] Re: [OT] Re: Spatial / GIS support in DAL

2012-04-11 Thread Tim Michelsen
Wow, old URL! Where's your current roadmap? Maybe I go and pickup something.

[web2py] Mimicking HTML5 pattern attribute for inputs

2012-04-11 Thread RKS
I'm looking to validate all of my forms with HTML5 and the pattern attribute, but as always, nothing is perfect on the internet and I still need a backup to catch those users who do not use HTML5 friendly browsers. I'm having trouble finding exact representations of the regular expressions in t

[web2py] Add a Add To Cart button in SQLFORM.grid

2012-04-11 Thread greenpoise
Based on the online example, POS Online Store, I want to add a button to add to cart in the SQLFORM.grid. So if my grid goes like this: def store(): fields = [db.product.name,db.product.product_code,db.product. productcategory,db.product.description,db.product.price] orderby =db.product.n

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Bruno Rocha
On Wed, Apr 11, 2012 at 4:56 PM, pbreit wrote: > Yeah, something simple like Tumblr would be nice. tumblr has a lot of social networking features -- Bruno Rocha [http://rochacbruno.com.br]

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread pbreit
Yeah, something simple like Tumblr would be nice. On Wednesday, April 11, 2012 9:22:33 AM UTC-7, Gour wrote: > > We just need general-purpose CMS without neeed for socila network stuff. > > >

[web2py] Re: Meteor web framework

2012-04-11 Thread Derek
It seems to be the antithesis of web2py - it's made without any considerations into security - those come after the basic functionality. If you are interested in meteor, I suggest you have a look at http://www.wakanda.org/ It's more mature, and a lot better documented. On Wednesday, April 11, 2

Re: [web2py] Re: issue tracker application CSC438

2012-04-11 Thread Richard Vézina
For the id I think there is missing represent here and there... I would use it in near future also, but I didn't get time to improve it... I will do, when I find time. Richard On Wed, Apr 11, 2012 at 3:09 PM, Derek wrote: > Looks like there are more issues in that issue tracker - trying to add

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Bruce Wade
Thanks that will be helpful, I liked the idea of paths also. However if you have 200,000 + nodes in a tree the paths might be coming hard to work with. On Wed, Apr 11, 2012 at 11:58 AM, villas wrote: > I've just been working with a tree myself. Database recursion (CTE) seems > very effective an

[web2py] Re: issue tracker application CSC438

2012-04-11 Thread Derek
Looks like there are more issues in that issue tracker - trying to add an issue I get a ticket. global name 'ccitem' is not defined Traceback (most recent call last): File "C:\Temp\web2py\gluon\restricted.py", line 205, in restricted exec ccode in environment File "C:/Temp/web2py/applicat

[web2py] issue tracker application CSC438

2012-04-11 Thread Derek
I downloaded the "issue tracker" since I have a need to track issues in software that I write. it seems usable, though when I go to app admin, and go to database administration, those queries don't seem to automatically populate. I don't know what's up with that. Also, when creating a new projec

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread villas
I've just been working with a tree myself. Database recursion (CTE) seems very effective and is now supported by most of the larger DBs (although sadly not Sqlite yet, I don't think). This is the reference link for Postgres and a SQL query I wrote for Firebird, I thought it might vaguely h

Re: [web2py] Add conditional sub-menu

2012-04-11 Thread Omi Chiba
Thank Bruno, but both shows some errors. *1st one* Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 205, in restricted exec ccode in environment File "C:\web2py\applications\home\views\default/index.html", line 64, in File "C:\web2py\gluon\globals.py", lin

[web2py] College Park, Maryland

2012-04-11 Thread Massimo Di Pierro
April 26-28 I will be in College Park, Maryland. I will be free in the evening. Anybody around there up for a beer? Massimo

Re: [web2py] Re: web2py: encrypt uploaded files

2012-04-11 Thread Massimo Di Pierro
Perhaps this can be useful: http://stackoverflow.com/questions/6309958/encrypting-a-file-with-rsa-in-python (look at code in first answer) On Wednesday, 11 April 2012 12:35:05 UTC-5, naveed wrote: > > Thanks Massimo for getting back. I can’t use an encrypted file system > as when the file syste

Re: [web2py] Meteor web framework

2012-04-11 Thread Nicolas Palumbo
Looks good! On Wed, Apr 11, 2012 at 2:35 PM, mikech wrote: > Looks very interesting! > > > On Wednesday, April 11, 2012 9:09:04 AM UTC-7, Richard wrote: >> >> The site is pretty unstable, it keeps reloading the page all the time. >> >> Richard >> >> On Wed, Apr 11, 2012 at 11:11 AM, Francisco Cos

[web2py] Re: new web2py cheatsheet

2012-04-11 Thread villas
It looks very interesting and I will try it. I see Bruno says that it would also edit text files. I am sure that could be very useful. In the past, I often made use of INI files and the Windows registry (although maybe that wasn't always such good practice!). And thanks for this Cheatshee

Re: [web2py] Meteor web framework

2012-04-11 Thread mikech
Looks very interesting! On Wednesday, April 11, 2012 9:09:04 AM UTC-7, Richard wrote: > > The site is pretty unstable, it keeps reloading the page all the time. > > Richard > > On Wed, Apr 11, 2012 at 11:11 AM, Francisco Costa wrote: > >> http://www.meteor.com >> Meteor is a set of new technologi

Re: [web2py] Re: web2py: encrypt uploaded files

2012-04-11 Thread Naveed Ahmed
Thanks Massimo for getting back. I can’t use an encrypted file system as when the file system is mounted, it’s totally open. Every file can be encrypted with the same master password. I’m thinking of storing this master password which is itself encrypted using the user’s password (or it’s hash)

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Gour
On Wed, 11 Apr 2012 14:15:32 -0300 Bruno Rocha wrote: > have you done it first? Opps, forgot it. :-( Thank you...it works now. ;) Sincerely, Gour -- Never was there a time when I did not exist, nor you, nor all these kings; nor in the future shall any of us cease to be. http://atmarama.

[web2py] Re: Cart handling

2012-04-11 Thread Gour
On Wed, 11 Apr 2012 09:15:28 -0700 (PDT) pbreit wrote: > There are a lot of pre-made shopping cart solutions, most of them in > PHP. If you don't want to build your own, then certainly consider an > existing one (like OpenCart, Magento, CubeCart, ZenCart, etc). We use Concrete5's own ecommerce

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Bruno Rocha
have you done it first? - http://localhost:8000/appname/setup/install ?? It is needed to populate the config db On Wed, Apr 11, 2012 at 2:07 PM, Gour wrote: > On Wed, 11 Apr 2012 13:09:17 -0300 > Bruno Rocha wrote: > > > Movu.ca is a general purpose CMS with focus on social network > > fea

[web2py] Re: web2py: encrypt uploaded files

2012-04-11 Thread Massimo Di Pierro
What are the specs? Can you store them in an encrypted file system? can you encrypt them with the same password? Should every file be encrypted with a different password? Where should the passwords be stored? On Wednesday, 11 April 2012 11:54:24 UTC-5, naveed wrote: > > I need to encrypt uploade

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Gour
On Wed, 11 Apr 2012 13:09:17 -0300 Bruno Rocha wrote: > Movu.ca is a general purpose CMS with focus on social network > features (as likes, shares, users and connections...) Tried to install according to: https://github.com/rochacbruno/Movuca#readme but got error ticket: 'NoneType' object has

[web2py] web2py: encrypt uploaded files

2012-04-11 Thread naveed
I need to encrypt uploaded files in web2py (for a HIPAA compliant application) preferably with AES. How can I accomplish this?

[web2py] Re: new web2py cheatsheet

2012-04-11 Thread Ross Peoples
This new cheat sheet is great! I saw the one page version, but I agree there is too much information to fit on to one page. I'm glad a second page was added. On Monday, April 9, 2012 4:44:22 PM UTC-4, Massimo Di Pierro wrote: > > http://dl.dropbox.com/u/18065445/Tmp/web2py_cheatsheet.pdf >

[web2py] Re: default value for upload Fields

2012-04-11 Thread Massimo Di Pierro
This comes up once in a while. I will try to make it easy. Anyway: The problem is if you need a default image, perhaps you do not want to copy it for every record the needs it. The proper way would be to upload it once and the set the default to the value of the upload field for that record. db

Re: [web2py] Re: Cart handling

2012-04-11 Thread Massimo Di Pierro
I agree posonlinestore does not compare but the shopping chart logic in it is fine. It was built as an example not as a fullly developed estore application. On Wednesday, 11 April 2012 11:15:28 UTC-5, pbreit wrote: > > There are a lot of pre-made shopping cart solutions, most of them in PHP. >

[web2py] Re: new web2py cheatsheet

2012-04-11 Thread Massimo Di Pierro
Try this (requires trunk) if not session.d: session.d = {'name':'anonymous','age':99,'sports':[]} def index(): form=SQLFORM.dictform(d).process() if form.accepted: response.flash = 'session.d was updated' return locals() On Wednesday, 11 April 2012 08:37:07 UTC-5, vill

Re: [web2py] Add conditional sub-menu

2012-04-11 Thread Bruno Rocha
response.menu = [('Home', False, URL('home','default','index'), []), (SPAN('Price List',_style='color:yellow'), True, URL('pricelist','default','index'), [('Guideline', False, URL('pricelist','default','guideline')), ('Multiplier Tables', False, URL('pricelist','default','multitabl

[web2py] Re: Error in online purchase of web2py pdf 4th edition

2012-04-11 Thread Massimo Di Pierro
I emailed you personally about this. On Wednesday, 11 April 2012 09:44:56 UTC-5, netcode wrote: > > Hello, > Please i wanted the pdf of the web2py 4th edition. I already entered > details of my credit card and I've submitted the details. I received a > message from my bank saying that I've been

Re: [web2py] Re: creating a shopping cart using session

2012-04-11 Thread pbreit
I think that should work but I haven't tried it. What happens if you delete the first line "session.cart_items=..."? That's going to keep overwriting cart_items each time the controller is called. You might have to ensure that cart_items is a list: items = session.cart_items if request.

[web2py] Add conditional sub-menu

2012-04-11 Thread Omi Chiba
The following menu works. It's add "Admin" menu next to "Price List" if the user has role "admin". Now, I want to add the "Admin" menu as sub-menu of "Price List" where it's right after the "Cut Charge Tables". How can I do this ? response.menu = [('Home', False, URL('home','default','index'),

[web2py] Re: default value for upload Fields

2012-04-11 Thread Anthony
On Wednesday, April 11, 2012 5:15:51 AM UTC-4, Hassan Alnatour wrote: > > Dear ALL, > > how can i make a default image for a image upload field in db i tried this > but its not working : > > Field('Cover','upload',default="URL('static','images')/no-user-image.gif"), > I haven't tried it, but ma

[web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread pbreit
Looks like it is having trouble with a file in /static. This is how I serve /static: location /static { root /opt/web2py/applications/myapp/; } You may just need to add the appname to: root /home/www-data/web2py/applications/ Also, I don't know if you need that extr

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Gour
On Wed, 11 Apr 2012 13:09:17 -0300 Bruno Rocha wrote: > Movu.ca is a general purpose CMS with focus on social network > features (as likes, shares, users and connections...) We just need general-purpose CMS without neeed for socila network stuff. > By now Movu.ca is in Alpha release, there are

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread praveen krishna
yes richard i have installed the source version and thanks Burno the command sudo python web2py.py is working to run web2py On Wed, Apr 11, 2012 at 5:53 PM, Richard Vézina wrote: > Yes Bruno is right I should had seen that I get OSError: [Errno 13] > Permission denied just yesterday... > > Did

[web2py] Re: auth.requires membership hide html

2012-04-11 Thread Anthony
On Wednesday, April 11, 2012 9:46:21 AM UTC-4, BlueShadow wrote: > > Hi I like to hide a couple links on my page if users are not logged in and > in the group of authors. > I tried the following > in the html page: > {{if auth.requires_membership('Author')==True: =A('new Article' , > _href=URL(r=

Re: [web2py] Re: Cart handling

2012-04-11 Thread pbreit
There are a lot of pre-made shopping cart solutions, most of them in PHP. If you don't want to build your own, then certainly consider an existing one (like OpenCart, Magento, CubeCart, ZenCart, etc). I would stay away from PosOnlineStore. > >

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Bruno Rocha
Movu.ca is a general purpose CMS with focus on social network features (as likes, shares, users and connections...) By now Movu.ca is in Alpha release, there are a lot of work to be done and some areas to improve, but now it is a nice base to start any development which needs social+CMS features.

Re: [web2py] Meteor web framework

2012-04-11 Thread Richard Vézina
The site is pretty unstable, it keeps reloading the page all the time. Richard On Wed, Apr 11, 2012 at 11:11 AM, Francisco Costa wrote: > http://www.meteor.com > Meteor is a set of new technologies for building top-quality webapps in a > fraction of the time, whether you're an expert developer o

[web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-04-11 Thread Gour
On Tue, 7 Feb 2012 15:06:26 -0200 Bruno Rocha wrote: Hello, > I want every one to be able to use it, customize it and deploys, sell > support, sell as a service. But I want to keep it Open Source (I > mean, I dont want someone to take the code and release a tool called > "blablabla" which is not

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread Richard Vézina
Yes Bruno is right I should had seen that I get OSError: [Errno 13] Permission denied just yesterday... Did you install web2py with the script in contrib folder? If yes your user name should be www-data. Did it works with the built-in dev web server? Richard On Wed, Apr 11, 2012 at 11:38 AM, Br

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread Bruno Rocha
web2py works well with any Python 2.5+ You have permission problem. Go to your terminal, access the location where web2y folder is and try. $ sudo chown -R youruser:youruser web2py or run web2py with superuser $ sudo python web2py.py On Wed, Apr 11, 2012 at 12:30 PM, praveen krishna < prav

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread Richard Vézina
Install a lower version of python with synaptic or new package manager and use python2.X web2py ... (replace X by the python version you pick) to start web2py. Richard On Wed, Apr 11, 2012 at 11:30 AM, praveen krishna < praveenchitne...@gmail.com> wrote: > I have python 2.7.2 in my system I thin

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread praveen krishna
I have python 2.7.2 in my system I think its not compatible how to make my web2py compatible to my python. On Wed, Apr 11, 2012 at 5:23 PM, Richard Vézina wrote: > Maybe your python version is not fully compatible with web2py, since you > use the installed python version... You should check whic

Re: [web2py] Re: Cart handling

2012-04-11 Thread Khalil KHAMLICHI
Thanks Massimo.

Re: [web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread Richard Vézina
Maybe your python version is not fully compatible with web2py, since you use the installed python version... You should check which version of python is installed. import sys sys.version_info I ran web2py under (2, 6, 5, 'final', 0) and Ubuntu server LTS with no problem. Richard On Wed, Apr 11

[web2py] Meteor web framework

2012-04-11 Thread Francisco Costa
http://www.meteor.com Meteor is a set of new technologies for building top-quality webapps in a fraction of the time, whether you're an expert developer or just getting started. I think this is something worth checking out

[web2py] error in loading web2py source code version in ubuntu 11.10

2012-04-11 Thread praveen krishna
Hii, I have downloaded the source code version of web2py from http://www.web2py.com/examples/default/download i have unzipped it and tried to run the web2py by using the comand 'python web2py.py' but it generating following error in terminal Traceback (most recent call last): File "web2py

Re: [web2py] Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread Johann Spies
On Wednesday, 11 April 2012 16:08:07 UTC+2, rochacbruno wrote: Thanks for your reply Note that in some versions uwsgi files are located at /etc/*uswgi-python* > /apps-available/filename.xml > > Which version os Linux and uwsgi are you using? > Debian testing/sid with the uwsgi that come with D

Re: [web2py] Re: new web2py cheatsheet

2012-04-11 Thread Bruno Rocha
On Wed, Apr 11, 2012 at 10:37 AM, villas wrote: > >> form=SQLFORM.dictform(d) > > Is that something new? > Yes this is a upcoming feature, it is being discussed on developer list. basically it can create forms to edit dictionaries and text files. -- Bruno Rocha [http://rochacbruno.com.br]

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Richard Vézina
Maybe need some code optimisation... Also I would look at the database level and make sure you have index on the right columns. Those links could helps : http://www.python.org/doc/essays/list2str.html http://wiki.python.org/moin/PythonSpeed/PerformanceTips#Loops Richard On Wed, Apr 11, 2012 at

[web2py] Error in online purchase of web2py pdf 4th edition

2012-04-11 Thread netcode
Hello, Please i wanted the pdf of the web2py 4th edition. I already entered details of my credit card and I've submitted the details. I received a message from my bank saying that I've been debited but on the site, i get errors saying my card number was rejected. It would be greatly appreciat

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Bruce Wade
Yeah probably is I already have it with web2py but it is slow with 20,000 nodes takes around 5-10 seconds to load the results. On Wed, Apr 11, 2012 at 7:29 AM, Richard Vézina wrote: > I made a lot of that last year... Sometimes it was driving me nuts, > needing to have the same columns for each

Re: [web2py] auth.requires membership hide html

2012-04-11 Thread Richard Vézina
I think you need to make it with writable=False or readable=False, search in the book. You can do something like this at models level : Field('fielname','fieltype',readable=lambda: auth.requires_membership('Author')) So if the lambda return False the field will not be readable in select or in fo

[web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread Johann Spies
On Wednesday, 11 April 2012 15:54:46 UTC+2, Johann Spies wrote: > > > lister 80; > That must be listen 80; I have corrected it in the configuration file but that did not solve the problem. Regards Johann

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Richard Vézina
I made a lot of that last year... Sometimes it was driving me nuts, needing to have the same columns for each table in the union... Good naming convention helps to make thing clearer when you get back to the code... Note, I would try to make it with web2py first if I were needing to write those co

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Bruce Wade
Yeah not sure have never used recursion at the database level. However it seems to be the only option, none of the other options in that chapter fit my needs. On Wed, Apr 11, 2012 at 7:05 AM, Richard Vézina wrote: > Recursion is slow because the union... But it may fit yours need better I > don'

Re: [web2py] Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread Bruno Rocha
Note that in some versions uwsgi files are located at /etc/*uswgi-python* /apps-available/filename.xml Which version os Linux and uwsgi are you using? Here are a working example: https://gist.github.com/2359513 -- Bruno Rocha [http://rochacbruno.com.br]

Re: [web2py] Re: default value for upload Fields

2012-04-11 Thread hasan alnator
No Villas , i tried it , its not working , now as i know , the value that a browse button takes is a path and i tried to pass it a path but still its not working On Wed, Apr 11, 2012 at 4:57 PM, villas wrote: > Maybe should be: > > Field('Cover','upload',default=URL('static','images',args=[

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Richard Vézina
Recursion is slow because the union... But it may fit yours need better I don't know. Richard On Wed, Apr 11, 2012 at 9:45 AM, Bruce Wade wrote: > Ok so I have read the chapter I think the best option is postgres > recursive queries. > > On Tue, Apr 10, 2012 at 10:39 AM, Richard Vézina < > ml.r

[web2py] Re: default value for upload Fields

2012-04-11 Thread villas
Maybe should be: Field('Cover','upload',default=URL('static','images',args=['no-user-image.gif']),

[web2py] Cookbook recipe for nginx/uwsgi woes

2012-04-11 Thread Johann Spies
I get '*502 Bad Gateway' *errors with the following setup: /etc/nginx/sites-available/web2py: server { lister 80; server_name $hostname; location ~* /(\w+)/static/ { root /home/www-data/web2py/applications/; } location / { uwsgi_pass 127.0.0.1:9001;

[web2py] auth.requires membership hide html

2012-04-11 Thread BlueShadow
Hi I like to hide a couple links on my page if users are not logged in and in the group of authors. I tried the following in the html page: {{if auth.requires_membership('Author')==True: =A('new Article' , _href=URL(r=request,f='newArticle'))}} but I only get syntax errors

Re: [web2py] Re: Scaling web2py

2012-04-11 Thread Bruce Wade
Ok so I have read the chapter I think the best option is postgres recursive queries. On Tue, Apr 10, 2012 at 10:39 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Yes AntiPattern cover 4 or 5 kind of tree representation, classify them > depending of usage and gives pros and cons. > > I

[web2py] Re: new web2py cheatsheet

2012-04-11 Thread rdodev
Excellent! Thx Massimo. On Monday, April 9, 2012 4:44:22 PM UTC-4, Massimo Di Pierro wrote: > > http://dl.dropbox.com/u/18065445/Tmp/web2py_cheatsheet.pdf >

[web2py] Re: Cart handling

2012-04-11 Thread Massimo Di Pierro
This has a shopping cart and credit card processing: https://github.com/mdipierro/web2py-appliances/tree/master/PosOnlineStore On Wednesday, 11 April 2012 01:46:55 UTC-5, Khalil KHAMLICHI wrote: > > Hi, > I m starting work on a new project in which I have to deal with a shopping > cart, at firs

[web2py] Re: unordered list and pagination

2012-04-11 Thread Massimo Di Pierro
fields=(db.Organization.name ) should be fields=(db.Organization.name , ) # <<< the commma or fields=[db.Organization.name ] On Wednesday, 11 April 2012 00:37:39 UTC-5, Annet wrote: > > Massi

Re: [web2py] Re: Design question. Opinions please

2012-04-11 Thread Cliff
Good point. I also realized this morning that this solution doesn't work if the user just opens tab 2 without changing anything, then leaves. There would still be unsubmitted work on tab 1. On Wednesday, April 11, 2012 4:06:24 AM UTC-4, Johann Spies wrote: > > On 11 April 2012 02:40, Cliff wr

[web2py] Re: reference of table in auth user with drob down menu

2012-04-11 Thread BlueShadow
for some reason it worked right after I saved it again and reloaded a couple times (I only removed a couple comments I didn't fiddle with the code. One doesn't need the requires=IS_IN_DB(db,'db.country') sry for the trouble. On Wednesday, April 11, 2012 2:51:37 PM UTC+2, BlueShadow wrote: > > H

  1   2   >