[web2py] MySQL insert on table with_alias causing error

2013-04-10 Thread chris_g
I am running web2py.2.0.9 and I get an error on doing INSERTS with MySQL if I define a table with an Alias. Apparently the DAL will attempt to do this SQL: INSERT INTO tbl_favourite_header AS favourite_header(CreationDate,Description,ChangeDate,MemberID) VALUES ('2013-03-01 12:12:10', 'my favo

[web2py] course app case

2013-04-10 Thread 黄祥
hi folks, i want to create a course app that have table room, teacher, student, course and class. in table class have reference to table room, teacher, student, course and also have the field : * field duration that contain duration of the class for example : - 3 months - 1 months * field sched

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Derek
my performance fluctuates depending on the network. i have an Internal site that is a basic wsgi site, and i couldn't figure out why i was getting 200ms times. then one day i worked late, everyone else had gone home. all of a sudden i was getting 10ms. so it may have nothing to do with your c

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Derek
my performance fluctuates depending on the network. i have an Internal site that is a basic wsgi site, and i couldn't figure out why i was getting 200ms times. then one day i worked late, everyone else had gone home. all of a sudden i was getting 10ms. so it may have nothing to do with your c

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Derek
and how much ram and CPU does a simple wsgi server use? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more opti

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-10 Thread Massimo Di Pierro
For the code to be incorporated in web2py (grid/smartgrid/etc.) you should sign the web2py contributor agreement which means you can do what you want with the code but I can too. If you release it under BSD or MIT or Apache or LGPL license, it may be considered for the contrib folder. Massimo

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-10 Thread Cliff Kachinske
Massimo, do you have a preference as far as licensing? I don't want to discourage people from using it, but if anyone makes a much-needed improvement I would like to get benefit of it. If the ideas are worthy of incorporation into grid or smartgrid, that would be great. I don't do works for

[web2py] Re: How to create a "doesn't belong" query, is it possible?

2013-04-10 Thread Tito Garrido
Just figured out: ~db(db.log.severity.belongs((1, 2))).select() Thanks! On Wed, Apr 10, 2013 at 10:11 PM, Tito Garrido wrote: > Hi Folks, > > How can I negate: > > db(db.log.severity.belongs((1, 2))).select() > > > I'd like to create a grid with records that does not belong to a specific > lis

[web2py] How to create a "doesn't belong" query, is it possible?

2013-04-10 Thread Tito Garrido
Hi Folks, How can I negate: db(db.log.severity.belongs((1, 2))).select() I'd like to create a grid with records that does not belong to a specific list... Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You received

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Marco Túlio Cícero de M . Porto
On Apr 10, 2013 9:13 PM, "Ricardo Pedroso" wrote: > > On Thu, Apr 11, 2013 at 12:32 AM, Marco Túlio Cícero de M. Porto > wrote: > > > > 2013/4/10 Ricardo Pedroso > >> > >> On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto > >> wrote: > >> > >> > one thing that caught up my atenti

[web2py] Re: ZeroMQ in web2py

2013-04-10 Thread Derek
If you're talking about a webserver serving a database-backed website, I see no need to use it. Perhaps some esoteric uses could be found for it. On Wednesday, April 10, 2013 4:28:08 PM UTC-7, Massimo Di Pierro wrote: > > I really like 0MQ too but I would like to understand a typical test case >

[web2py] Re: ZeroMQ in web2py

2013-04-10 Thread Derek
I think the more software will esit that has it buil-in, the more easy it will become to build dynamically changing modular software infrastructures I have no idea what you are trying to say there. Anyway, yes, it's cool, you don't worry about message delivery because it's completely out of yo

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Ricardo Pedroso
On Thu, Apr 11, 2013 at 12:32 AM, Marco Túlio Cícero de M. Porto wrote: > > 2013/4/10 Ricardo Pedroso >> >> On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto >> wrote: >> >> > one thing that caught up my atention was that recently (after >> > system/web2py >> > upgrade) I have a h

[web2py] Re: integrating the stripe library into web2py

2013-04-10 Thread Derek
Yes. PCI has a self assessment though so you can check to be sure.. https://www.pcisecuritystandards.org/merchants/self_assessment_form.php On Wednesday, April 10, 2013 4:30:36 PM UTC-7, David Ripplinger wrote: > > Would the fact that the server processes the actual credit card number > (even th

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Marco Túlio Cícero de M . Porto
And if you don't agree with that, ok. Just don't ruin it because you don't like me. (Correcting) 2013/4/10 Marco Túlio Cícero de M. Porto > (continuing - sent it while not concluded) > > So, if I bring this problem to this list, it's mainly because I believe > this is the right place for it. >

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Marco Túlio Cícero de M . Porto
2013/4/10 Ricardo Pedroso > On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto > wrote: > > > one thing that caught up my atention was that recently (after > system/web2py > > upgrade) I have a higher use of memory and CPU. > > > > I was using Apache2 and it was going nuts (near 10

[web2py] Re: integrating the stripe library into web2py

2013-04-10 Thread David Ripplinger
Would the fact that the server processes the actual credit card number (even though it doesn't store it) make it so I would have to deal with PCI compliance stuff? On Wednesday, April 10, 2013 7:24:08 PM UTC-4, Massimo Di Pierro wrote: > > You are right that what web2py does it server side. It d

[web2py] Re: ZeroMQ in web2py

2013-04-10 Thread Massimo Di Pierro
I really like 0MQ too but I would like to understand a typical test case of integration with web2py. Consider the scheduler for example. The bottle neck is not distribution of tasks (which 0MQ would handle great) but the fact that tasks and main app need to access the database. If the workers do

[web2py] Re: integrating the stripe library into web2py

2013-04-10 Thread Massimo Di Pierro
You are right that what web2py does it server side. It does not store the credit card info (not by default) but this allows the server to know if a transaction went through or not. I would like to see a prototype of client-size integration and a server-side notifications of payments success/fail

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Marco Túlio Cícero de M . Porto
(continuing - sent it while not concluded) So, if I bring this problem to this list, it's mainly because I believe this is the right place for it. And if you don't agree with that, ok. Just ruin it because you don't like me. Cheers, Marco Tulio 2013/4/10 Marco Túlio Cícero de M. Porto > Ovid

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Marco Túlio Cícero de M . Porto
Ovidio, if you don't want to help, it's ok. Just don't help. Just don't speak for the others, ok? Also, what I state is that I have a problem with performance, that might be related to web2py (or not). I'm bringing up the environment I'm working with because it may help others to understand and he

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 11:33 PM, Marco Túlio Cícero de M. Porto wrote: > one thing that caught up my atention was that recently (after system/web2py > upgrade) I have a higher use of memory and CPU. > > I was using Apache2 and it was going nuts (near 100% CPU/memory usage). > Traded for Nginx an

Re: [web2py] Server performance (cpu/memory)

2013-04-10 Thread Ovidio Marinho
You got a problem with web2py? , What you report is a performance of their work environment and that you can mount a laboratory or hire a consulting firm. Now if you have problems with web2py this list will help you. Ovidio Marinho Falcao Neto Web Developer

[web2py] Server performance (cpu/memory)

2013-04-10 Thread Marco Túlio Cícero de M . Porto
Hi! I have the following environment: 1. Amazon EC2 instance running Ubuntu 12.10 2. Nginx 1.2.1 3. Web2py 2.4.6-stable+timestamp.2013.04.06.17.37.38 4. PostgreSQL (still 8.4, going to upgrade to 9.1 soon) 5. Installed using setup contained on /scripts directory. Everything is w

[web2py] ZeroMQ in web2py

2013-04-10 Thread Arnon Marcus
I'l like to start a discussion about working-out an integration implementation for ZeroMQ in web2py. If not as a "built-in", than at least as a "contrib". If nothing else, than at the very least a recipe and/or examples, and added documentation about how to activate/deploy the integration. Zero

Re: [web2py] performance issue time to first byte

2013-04-10 Thread BlueShadow
about that time is my aim. On Wednesday, April 10, 2013 11:55:36 PM UTC+2, LightDot wrote: > > I tested a couple of my sites, to get some feel as to what to expect. TTFB > from the first run, tested across half of Europe: > > 1st site: 57ms to 74ms > 2nd site: 57ms to 202ms > > First one is a cor

[web2py] Re: newbie question about digitally signed URLs using hmac

2013-04-10 Thread Tim Richardson
Ah, thank you. I now understand much more about userSignature. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For mor

Re: [web2py] performance issue time to first byte

2013-04-10 Thread LightDot
I tested a couple of my sites, to get some feel as to what to expect. TTFB from the first run, tested across half of Europe: 1st site: 57ms to 74ms 2nd site: 57ms to 202ms First one is a corporate style web page, the second one has a lot of content, thumbnails, etc. Both using apache + mod_wsgi

[web2py] Re: routes in windows service not working??

2013-04-10 Thread Stephen Tanner
Did you ever find a solution to this? I am running web2py from source and have everything setup correctly with an options.py and a routes.py but I see the same thing you do. web2py tries to route to welcome but if you force it to reload the routes it defaults to my app On Monday, August 20, 2

Re: [web2py] performance issue time to first byte

2013-04-10 Thread BlueShadow
yeah I found it. right now pretty much everything is strange to me. but I continue to work on it. On Wednesday, April 10, 2013 11:39:58 PM UTC+2, LightDot wrote: > > Well, this is completely unexpected. I really can't think of what would > cause the compiled code to run slower than the uncompil

Re: [web2py] performance issue time to first byte

2013-04-10 Thread LightDot
Well, this is completely unexpected. I really can't think of what would cause the compiled code to run slower than the uncompiled one. Intriguing!! Anyway, you probably used the admin to compile the app? There is a menu entry "Remove Compiled" there, same place as the "Compile" was. On Wednesd

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Niphlod
let us know what you find : I just tested my production site and (although it runs with uwsgi+nginx and is behind SSL) the max time of TTFB don't go over 150ms. On Wednesday, April 10, 2013 11:14:24 PM UTC+2, Ricardo Pedroso wrote: > > On Wed, Apr 10, 2013 at 8:39 PM, BlueShadow > > > wrote:

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 8:39 PM, BlueShadow wrote: > thanks for all the suggestions I'm trying to work at one after the other: > kompiling it made it a lot worse: > http://www.webpagetest.org/result/130410_9P_14QQ/ > the results now vary a lot from a total of 4 secs to over 11 secs. Very weird...

Re: [web2py] performance issue time to first byte

2013-04-10 Thread BlueShadow
the images are cached with Expire header (access + 1 month) which works quite well. On Wednesday, April 10, 2013 9:39:14 PM UTC+2, Jonathan Lundell wrote: > > On 10 Apr 2013, at 12:34 PM, Anthony > > wrote: > > In your homepage you are serving 10 images, at least, in fast_download >> controller

Re: [web2py] performance issue time to first byte

2013-04-10 Thread BlueShadow
> > thanks for all the suggestions I'm trying to work at one after the other: kompiling it made it a lot worse: http://www.webpagetest.org/result/130410_9P_14QQ/ the results now vary a lot from a total of 4 secs to over 11 secs. -- --- You received this message because you are subscribed to

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Jonathan Lundell
On 10 Apr 2013, at 12:34 PM, Anthony wrote: > In your homepage you are serving 10 images, at least, in fast_download > controller, here it's safe > to put session.forget() if not already. It will allow concurrent request from > the same browser. > > Good point. If those images are being served

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Anthony
> > In your homepage you are serving 10 images, at least, in fast_download > controller, here it's safe to put session.forget() if not already. It will allow concurrent request > from the same browser. > Good point. If those images are being served dynamically from a controller because they w

[web2py] integrating the stripe library into web2py

2013-04-10 Thread David Ripplinger
I'm recently learning about Stripe, and so far it seems like a great option for credit card processing. I noticed that there is a very simple add-on Massimo wrote to do Stripe charges and similar actions, but it does not seem to at all follow the pattern Stripe was intended to be used. Massimo's

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 4:41 PM, BlueShadow wrote: > migrations are false and lazy tables are true. > I tried to do something with cache.ram (for another app) which had no > effekt at all perfhaps I did it wrong. > consider moving code to (imported) modules #I started on it when I > realised I wa

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
On Wed, Apr 10, 2013 at 4:30 PM, BlueShadow wrote: when I did that test application(welcome app) I got an average about 80 ms > which seems pretty slow too (localhost no db requests...). Did you create empty application or you reuse the welcome application? Either way, your server seems to be s

Re: [web2py] Re: Need help with impersonate

2013-04-10 Thread Michael Ellis
SOLVED (6 months later) I put this aside six months ago when I couldn't make it work. Today I really needed it so I dug out pdb and drilled down into auth.has_permission(). Finally, the light dawned on me. The table_name field is a string! Changing it to "auth_user" fixed the problem. May I

[web2py] iOS + web2py

2013-04-10 Thread Jonathan Lundell
I've been working on a news-video iPad app (awards and everything! featured by Apple! brag!) that uses web2py for a back-end server, maintaining a database of videos &c and serving them up to the app via JSONRPC. web2py also implements our internal curation UI to the database. web2py has been a

[web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread ctrlSoft
thanks a lot for your sugetions and quick responses. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: impersonate any user

2013-04-10 Thread Kostas M
Is the reversion back to the initial user working properly? I can impersonate a user, entering a user id in the http://.../user/impersonate form, but when I go back to that form, and entering 0 , although it seems momentarily to change the user name greeting in the upper right of the app, if I

Re: [web2py] performance issue time to first byte

2013-04-10 Thread LightDot
First thing I'd do in this case is compile the app, then test again. ;) Don't try other things before compiling. Next thing I'd do is look into caching, it's usually very much worth it. Depends on your app, though. What db are you using? How is the connection pooling set now? You can find out

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Anthony
Your waterfall showed only static files, which are served before web2py hits any of your application code, so most of those optimizations shouldn't have an impact. Are the high TTFB values only for the static files? Is web2py even serving the static files, or is the web server (e.g., Apache) do

[web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread Anthony
> > class WishList(): > def add_to_wish_list(self,db,table,field1,value1,field2,value2): # or is > better list of **fields,**values ? > try: > db.table.insert(field1=value1,field2=value2) #insert or > validate_and_insert? > Seems fine, but you can't do db.table if "table" is a variable -- it w

Re: [web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread Vinicius Assef
ctrlSoft, I'm working in an architecture similar to yours. See some suggestions here: https://gist.github.com/viniciusban/5355781 On Wed, Apr 10, 2013 at 12:06 PM, ctrlSoft wrote: > > in model dbtables.py > #. > #. > db.define_table('wishlist', > Field('user_id', db.auth_user, > requir

Re: [web2py] performance issue time to first byte

2013-04-10 Thread BlueShadow
migrations are false and lazy tables are true. I tried to do something with cache.ram (for another app) which had no effekt at all perfhaps I did it wrong. consider moving code to (imported) modules #I started on it when I realised I was using request.folder in my sitemap funktion which I current

Re: [web2py] performance issue time to first byte

2013-04-10 Thread BlueShadow
Thanks Ricardo for that idea with curl. I did that 5 times the ttfb is almost the total time. the total time having 0 to 1 ms more than the ttfb. the average time is 201 ms which seems to me pretty big considering its a localhost request. when I did that test application(welcome app) I got an av

[web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread ctrlSoft
in model dbtables.py #. #. db.define_table('wishlist', Field('user_id', db.auth_user, requires=IS_IN_DB(db,'auth_user.id','%(username)s')), Field('offer_id', db.offer, requires=IS_IN_DB(db,'offer.id','%(title)s')), Field('created_on', type='datetime', default=request.now, writable=False))

[web2py] Strange Plugin behaviour

2013-04-10 Thread Matteo Luperto
Dear web2py users, I am novice web2py user and I've recently started developing my first real project. Unfortunately I'm having some issues: - The plugin-controller code is not update when modified, unless the server is restarted. Example: if there's an error at a certain line and I c

[web2py] Re: database query on nested tables

2013-04-10 Thread Niphlod
I did say "see it" prettydate as it is takes a date and calculates automatically the timedelta to "now". You need to have your own prettydate to be able to pass a timedelta of your own. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" gro

[web2py] Re: database query on nested tables

2013-04-10 Thread 黄祥
when i tried to using prettydate it return [invalid date] e.g. *from gluon.tools import prettydate* def __onvalidation_check_out(form): if form.vars.check_in: rows = db(db.check_in.id==form.vars.check_in).select() for row in rows: form.vars.room = row.room

[web2py] Re: database query on nested tables

2013-04-10 Thread Niphlod
check prettydate http://web2py.com/books/default/chapter/29/14?search=prettydate On Wednesday, April 10, 2013 3:45:19 PM UTC+2, 黄祥 wrote: > > brilliant, very simple solution, it's work now. > thank you so much for your solution and suggestion, massimo > i've followed your hints and make it on my

Re: [web2py] db.count()

2013-04-10 Thread Domagoj Kovač
I tried Antonies code and it works. Thanks. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit ht

Re: [web2py] performance issue time to first byte

2013-04-10 Thread Ricardo Pedroso
As always without knowing nothing about your application is hard to give more precise answers. But, first of all, I would do a test in localhost to have a reference unit. For now let's keep the network variable out. If you have a shell account in your server do: curl -o /dev/null -s -w "Conne

[web2py] Re: adding jQuery effects to A helper

2013-04-10 Thread Anthony
Note, you should probably use the URL() helper instead of hard-coding the URL: A('Link', _href="#" _onclick="jQuery(this).fadeOut(); \ web2py_component('%s' , 'myid'); return false;" % URL('default', 'function1', vars=dict(s=parameter))) Anthony On We

Re: [web2py] db.count()

2013-04-10 Thread Marco Mansilla
i think it should be: number_of_records = db(db.countries.id).select().count() haven't tried it, but you must have all the rows selected to count. > Hi, > > i have this line of code: > > number_of_records = db().count(db.countries.id) > > i am receiving an error: > near ";": syntax error > (

[web2py] Re: db.count()

2013-04-10 Thread Anthony
db(db.countries.id > 0).count() On Wednesday, April 10, 2013 9:29:36 AM UTC-4, Domagoj Kovač wrote: > > Hi, > > i have this line of code: > > number_of_records = db().count(db.countries.id) > > i am receiving an error: > near ";": syntax error > (self=, *a=('SELECT count(DISTINCT > countries.id

Re: [web2py] Re: performance issue time to first byte

2013-04-10 Thread Kevin Bethke
Before i had the mod-deflate i had times around 3.5 secs the ttfbs were about the same +- 50 ms Am 10.04.2013 15:49 schrieb "Niphlod" : > probably nothing, just check that they are not sequential. probably is > just how they draw their graphs. > On the TTFB note: did you try timing it without gzip

Re: [web2py] Re: performance issue time to first byte

2013-04-10 Thread Niphlod
probably nothing, just check that they are not sequential. probably is just how they draw their graphs. On the TTFB note: did you try timing it without gzip compression turned on, just to check ? -- --- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py] Re: database query on nested tables

2013-04-10 Thread 黄祥
brilliant, very simple solution, it's work now. thank you so much for your solution and suggestion, massimo i've followed your hints and make it on my controller : def __onvalidation_check_out(form): if form.vars.check_in: rows = db(db.check_in.id==form.vars.check_in).select() f

Re: [web2py] Re: performance issue time to first byte

2013-04-10 Thread Kevin Bethke
There are 6 files which they start to load at the same time. Or what do you did you mean? Am 10.04.2013 15:34 schrieb "Niphlod" : > edit: the real problem on that graph is that there's no concurrency: I > don't know if it's a feature of webpagetest.org, but apparently there's > no new connection u

[web2py] Re: performance issue time to first byte

2013-04-10 Thread Niphlod
edit: the real problem on that graph is that there's no concurrency: I don't know if it's a feature of webpagetest.org, but apparently there's no new connection until the previous one is finished. -- --- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py] Re: pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread Anthony
Can you show some code? You might just be able to pass those objects to the class's methods when they are called. Otherwise, you could add the db object to the current object and import current in you modules, as described here: http://web2py.com/books/default/chapter/29/04#Accessing-the-API-fr

Re: [web2py] Re: performance issue time to first byte

2013-04-10 Thread Kevin Bethke
Thats exactly what i'm saying anthony. Those total times are enormous considering the whole page including images is now a little under 300kb. And i actually dont care if its called ttfb or something else i just want to have quick response times. Am 10.04.2013 15:23 schrieb "Anthony" : > But in th

[web2py] Re: performance issue time to first byte

2013-04-10 Thread Niphlod
I'm keen to think that TTFB in his case is due to buffering (or an inbetween proxy). Overexxagerating, either the user takes 4 seconds to download the full page (which is transmitted as soon as the webserver outputs something) or he takes 2 seconds waiting for the webserver to buffer (TTFB) an

[web2py] db.count()

2013-04-10 Thread Domagoj Kovač
Hi, i have this line of code: number_of_records = db().count(db.countries.id) i am receiving an error: near ";": syntax error (self=, *a=('SELECT count(DISTINCT countries.id) FROM ;',), **b={}) What is wrong? -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: Accessible_query with NoSQL adapters

2013-04-10 Thread Niphlod
please do remember that most of the speedup between rdbms and nosql (yes, I'm over-generalizing, but I'm going to state a simple core-concept) is due to the lack of features like this. While a mongodb for storing incremental updates is probably a better tool for the job, it's not for complex rel

[web2py] Re: adding jQuery effects to A helper

2013-04-10 Thread Stephen McCamy
That works perfect! Yes, I didn't include the actual URL and I was unclear that it is a python variable that I am passing. This works great! Thanks so much! On Wednesday, April 10, 2013 9:09:28 AM UTC-4, Anthony wrote: > > It works for me. Perhaps your URL isn't returning anything -- are you

[web2py] Re: Accessible_query with NoSQL adapters

2013-04-10 Thread Alan Etkin
> - membership > - permission > - end table > with the everybody_group_id logic, probably other 2 queries. Now I understand why there's no accessible_query for NoSQL, not even in the roadmap. No user would accept making 4 or 5 db queries for filtering rows in a single request. This may work in

[web2py] Re: performance issue time to first byte

2013-04-10 Thread Anthony
But in the articule, ttfb was trivial (particularly relative to download time). In the above waterfall, the ttfb values are large (in absolute magnitude as well as relative to the full request time). Anthony On Wednesday, April 10, 2013 8:56:39 AM UTC-4, Niphlod wrote: > > just a note > > h

[web2py] Re: Markmin: How to align text?

2013-04-10 Thread Massimo Di Pierro
Also here: http://web2py.com/init/static/markmin.html On Wednesday, 10 April 2013 07:54:57 UTC-5, Alan Etkin wrote: > > In Markdown I can do this (found on >> http://bywordapp.com/markdown/guide.html): >> > > markmin is documented in web2py/gluon/contrib/markmin/ > > There's a markmin.pdf file

[web2py] Re: newbie question about digitally signed URLs using hmac

2013-04-10 Thread Massimo Di Pierro
No. If you chose to use the hmac key than you have to handle it. Normally you use URL(user_signature=True). In this case the key is per user and per session and managed for you. On Wednesday, 10 April 2013 07:36:14 UTC-5, Tim Richardson wrote: > > the book has an example to use hmac digitally si

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-10 Thread Massimo Di Pierro
Please! On Wednesday, 10 April 2013 06:36:45 UTC-5, Cliff Kachinske wrote: > > Johann, > > I developed an alternative to grid/smartgrid which has most of the > features. > > I can put it on github if you like. > > Caution: not documented. But I'll put up a sample controller that uses it > if

[web2py] Re: database query on nested tables

2013-04-10 Thread Massimo Di Pierro
PS. Anyway, I would copy the price into check_in and check_out tables. I know this is redundant but in any hotel you will have to handle discounts for each individual client (to handle complaints, friends, etc.) This will give you flexibility and make it faster. On Wednesday, 10 April 2013 08:1

[web2py] Re: database query on nested tables

2013-04-10 Thread Massimo Di Pierro
check_in = db.check_in[id] print check_in.room.category.price On Wednesday, 10 April 2013 04:38:08 UTC-5, 黄祥 wrote: > > hi folks, > > i want to get the value of table row that have 3 nested values. my goal is > to get the price value from table room_category from function check_out in > my cont

[web2py] Re: Rocket log colors

2013-04-10 Thread Niphlod
a little bit of a streatch for a web framework http://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output On Wednesday, April 10, 2013 3:07:50 PM UTC+2, Ramos wrote: > > Is it possible to print in rocket console coloured text? > how? > > -- --- You received this messa

[web2py] Re: distinct keyword for SQLFORM.grid

2013-04-10 Thread Massimo Di Pierro
Please open a ticket and we can add this. On Wednesday, 10 April 2013 04:46:14 UTC-5, Calvin wrote: > > Hi > > I have been struggling with how one could get just distinct records to > show with SQLFORM.grid if the query passed to it involved more than one > table? Doing an inner join tends to ge

[web2py] Re: adding jQuery effects to A helper

2013-04-10 Thread Anthony
It works for me. Perhaps your URL isn't returning anything -- are you sure 'http://localhost/app/function1.html/?s=' + parameter generates the correct URL and returns the expected output? In particular, the "parameter" variable should be a previously defined Javascript variable -- does it exist

[web2py] Rocket log colors

2013-04-10 Thread António Ramos
Is it possible to print in rocket console coloured text? how? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more

[web2py] Re: performance issue time to first byte

2013-04-10 Thread Niphlod
just a note http://blog.cloudflare.com/ttfb-time-to-first-byte-considered-meaningles -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr..

[web2py] Re: adding jQuery effects to A helper

2013-04-10 Thread Stephen McCamy
Ok, that makes sense. So how can you write it so the web2py component will not only fade out but will load into a specified id in the DIV as as well? The example you provided forces the link to fadeout but no longer loads the div (which makes sense). I want to do both. This is good inform

[web2py] Re: Markmin: How to align text?

2013-04-10 Thread Alan Etkin
> > In Markdown I can do this (found on > http://bywordapp.com/markdown/guide.html): > markmin is documented in web2py/gluon/contrib/markmin/ There's a markmin.pdf file with a quick start guide and the complete help with examples is included in the markmin2html.py module docstrings. I don't t

[web2py] Re: db.mytab.fieldname.represent = lambda x,row : row[fieldname] how to pass the fieldname to lambda

2013-04-10 Thread Anthony
> > for fieldname in db.mytab.fields: db.mytab.fieldname.represent = lambda x,row:row[fieldname] > Two problems above. First, since "fieldname" is a variable, you cannot do db.mytab.fieldname -- instead it should be db.mytab[fieldname]. Second, in lambda x, row: row[fieldname] the "fiel

[web2py] newbie question about digitally signed URLs using hmac

2013-04-10 Thread Tim Richardson
the book has an example to use hmac digitally signed URLs, where the KEY seems to be a global variable, ie always the same. Is this a good idea? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop rece

[web2py] Re: Difference in headers upload/download vs static file, also in auth.wiki

2013-04-10 Thread Nico de Groot
Same results for 2.4.6 (please ignore the console output for download, not helpful) Nico On Sunday, April 7, 2013 9:49:26 PM UTC+2, Nico de Groot wrote: > > While debugging why the tag behaves differently (at least in Mac > Chrome) depending on specifying (1) a static link to a soundfile or (2)

[web2py] Re: db.mytab.fieldname.represent = lambda x,row : row[fieldname] how to pass the fieldname to lambda

2013-04-10 Thread Anil Nalamalapu
Hi after trying for a long time I finally managed to do the below changes in SQLHTML.py, represent function. def represent(field, value, record): f = field.represent if not callable(f): return str(value) n = f.func_code.co_argcount - len(f.func_defaults or []) if getattr(f

[web2py] Re: performance issue time to first byte

2013-04-10 Thread BlueShadow
I played a little with mod_pagespeed which decreases everything but the ttfb. Here is my waterfall diagram: it doesn't look like a waterfall at all more like a drippling creek :( any

Re: [web2py] Re: .sum() and .count() in grid?

2013-04-10 Thread Cliff Kachinske
Johann, I developed an alternative to grid/smartgrid which has most of the features. I can put it on github if you like. Caution: not documented. But I'll put up a sample controller that uses it if you like. The main drawback is the search widget isn't nearly as slick as smartgrid's. And

[web2py] pass db,tablename,fields ... values to module or define table in module?

2013-04-10 Thread ctrlSoft
my db.tables are defined in model, i have 3 controllers, and i have some functions that are used in all 3, so i decided to create an module. now i'm a little confused, i saw some examples where tables are defined in module, and other posts where is talinkg about import wich is the best way?

[web2py] Markmin: How to align text?

2013-04-10 Thread Johann Spies
In Markdown I can do this (found on http://bywordapp.com/markdown/guide.html ): Alignment To align the data cells on the table, you need to introduce a special row right after the headers, that will determine how the following rows – the data rows – will be aligned. | Header One | Header Two | H

[web2py] Re: database query on nested tables

2013-04-10 Thread 黄祥
sorry the table for check out is db.define_table('check_out', Field('check_in', 'reference check_in'), Field('room'), Field('guest'), Field('description', 'text'), Field('duration'), format='%(guest)s %(room)s') i extract the room and guest value from check_in table and in

[web2py] distinct keyword for SQLFORM.grid

2013-04-10 Thread Calvin
Hi I have been struggling with how one could get just distinct records to show with SQLFORM.grid if the query passed to it involved more than one table? Doing an inner join tends to generate a lot of non-unique rows and hence it would be important to just filter out the unique ones. With select

[web2py] database query on nested tables

2013-04-10 Thread 黄祥
hi folks, i want to get the value of table row that have 3 nested values. my goal is to get the price value from table room_category from function check_out in my controller. how to do this in web2py efficient way? e.g. db.define_table('room_category', Field('category'), *Field('price',

Re: [web2py] Re: How to implement PostgreSQL "ts_rank" function for full text search?

2013-04-10 Thread Johann Spies
I am also using Postgresql's full text search. Any development in Web2py to accommodate that will we very much appreciated. Regards Johann On 9 April 2013 16:02, Massimo Di Pierro wrote: > This is an interest example. Let me think if we can add an API like we did > for PostGIS > > > On Monday

[web2py] db.mytab.fieldname.represent = lambda x,row : row[fieldname] how to pass the fieldname to lambda

2013-04-10 Thread Anil Nalamalapu
hi, I am trying to change the reprsentation of a field value dynamically for each fieldname, for this purpose I need to know the fieldname of the current value that has been passed to the function. Any idea how to achieve this?? I can manage to write a few lines of code in web2py source itself i

Re: [web2py] Re: Server-Sent Events

2013-04-10 Thread Niphlod
On Wednesday, April 10, 2013 12:53:01 AM UTC+2, Arnon Marcus wrote: > > Well, again, Redis IS required for inter-controller communication... (the > notorious "green arrows" in my picture...) Which is, to me, a trivial > requirement for most production use-cases... > I use redis too in standard

[web2py] Re: scheduler on webfaction

2013-04-10 Thread Niphlod
not tested, but did you try with nohup python web2py.py -K statecouncil ? On Wednesday, April 10, 2013 4:20:28 AM UTC+2, Jake Lowen wrote: > > Hi. I have web2py installed on webfaction as my production server. > I followed the web2py documentation on it's scheduler function and built > an app

  1   2   >