[web2py] Re: Horrifically slow AJAX -- how to debug?

2013-07-03 Thread Joe Barnhart
Here is something odd. I was looking through the logs of nginx and uwsgi to see if there are any smoking guns there. In the uwsgi log file I can at least see the log contains the same time I experience in "real time" when I select the page: [pid: 2767|app: 0|req: 700/1896] 67.161.165.180 () {

[web2py] Re: New Auth and general database management functionality in appadmin

2013-07-03 Thread Loïc
Hello Anthony, I have some questions about the new feature you present here : "Just create an Auth group that is to be allowed access to this page and > specify the "role" of that group in auth.settings.auth_manager_role" > I think the correct spelling is *auth.settings.manager_group_role*, am

[web2py] Re: Horrifically slow AJAX -- how to debug?

2013-07-03 Thread Massimo Di Pierro
Ajax aside, you should be able to start web2py locally and call http://127.0.0.1:8000/swim_smarter/results/meetevents/?meet=4232&event=22F&; pf=f If you see the slow down you can eliminate problems with uwsgi and nginx On Wednesday, 3 July 2013 02:00:40 UTC-5, Joe Barnhart wrote: > > Here is som

[web2py] Re: SQLFORM hide some fields

2013-07-03 Thread VickTor
El miércoles, 16 de febrero de 2011 18:57:27 UTC-5, Ed Greenberg escribió: > > I'd like to suppress some fields in a SQLFORM. > > Imagine that a user is filling out a form to create or edit a record, > and his user_id is a column in the record. We need to populate the > user_id, but he should

[web2py] Re: SQLFORM hide some fields

2013-07-03 Thread VickTor
I have the same problem, this is my code and when to update shows me the following error user is tampering with form's record_id: {'productid': None}! = {'productid': 'p01'} --> p01 is my idproducto this is my action: def productos_update(): record = db(db.producto.idproducto=="p01").se

[web2py] Re: SQLFORM hide some fields

2013-07-03 Thread villas
Suggest you try using newer format: http://www.web2py.com/books/default/chapter/29/07#SQLFORM if form.process().accepted: response.flash = 'form accepted' elif form.errors: response.flash = 'form has errors' else: response.flash = 'please fill out the form' You can e

[web2py] Re: curious how you all handle database engine migrations

2013-07-03 Thread villas
Yes, but only when the alternative method is at least as good. Many agree with this (from Python Zen): There should be one -- and preferably only one -- obvious way to do it. :) On Monday, 1 July 2013 07:00:43 UTC+1, Massimo Di Pierro wrote: > > That is true. But it is nice to see other ways

[web2py] Re: New Auth and general database management functionality in appadmin

2013-07-03 Thread Anthony
> > "Just create an Auth group that is to be allowed access to this page and >> specify the "role" of that group in auth.settings.auth_manager_role" >> > I think the correct spelling is *auth.settings.manager_group_role*, am I > right? > No, this was changed in trunk, please read the above po

[web2py] Re: New Auth and general database management functionality in appadmin

2013-07-03 Thread Loïc
Sorry I read too fast... Thank you Anthony Le mercredi 3 juillet 2013 15:32:47 UTC+2, Anthony a écrit : > > "Just create an Auth group that is to be allowed access to this page and >>> specify the "role" of that group in auth.settings.auth_manager_role" >>> >> I think the correct spelling is *aut

[web2py] routing problem nginx + uwsgi

2013-07-03 Thread keiser1080
Hi all, I need to configure a webserver with multiples web2py instances. Each instance is linked to a python virtualenv in home folder of each users (3 users) - I have no access to the dns and the proxy - and can't ask to modify the dns and webproxy - and can't install a local dns se

[web2py] Importing modules not recognized unless the path is explicitely added to sys.path

2013-07-03 Thread nour.sawas
In my db.py I want to import a module called for example test_module.py and located in applications/application_name/modules like following: from test_module import * this was not working on my Web2py installation, while it was working on another installation. It seems web2py is not looking ins

Re: [web2py] Re: How to set permissions for db table loaded from flat file

2013-07-03 Thread Jordan Ladora
Hi Alan, Thanks for the help! For some reason, I did not have 'auth.define_tables()' in the model. Adding it fixed the problem. Thanks again! -jl -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop re

[web2py] Re: Can view, but can't edit files

2013-07-03 Thread Woody
Okay, I'm still struggling with this. I opened up ports on my router, so now I'm accessing w2p admin using https from the outside world. Admin functions seem normal, except that editing files is extremely flaky. I can open a file and edit it once, but the next file I open gives a communicat

[web2py] Re: Horrifically slow AJAX -- how to debug?

2013-07-03 Thread Joe Barnhart
Yes, you're right. The site overall feels much quicker when talking to it directly, bypassing nginx and uwsgi. The query below takes in the 0.5-1 second range -- still somewhat slower than expected, but much quicker than thru port 80. This does indicate some shenanigans going on in my server

Re: [web2py] routing problem nginx + uwsgi

2013-07-03 Thread Jonathan Lundell
On 3 Jul 2013, at 8:08 AM, keiser1080 wrote: > and routes.py > > # -*- coding: utf-8 -*- > > # default_application, default_controller, default_function > # are used when the respective element is missing from the > # (possibly rewritten) incoming URL > # > default_application = 'init'# ordi

[web2py] Re: websockets

2013-07-03 Thread shartha
Thank you Recardo. I am sorry for being late to reply back. I appreciate your time and help. On Thursday, June 13, 2013 8:36:31 PM UTC-5, shartha wrote: > > Hello. Some questions about websockets: > 1) Can websockets be implemented within web2py without any in-socket > server side component? >

Re: [web2py] routing problem nginx + uwsgi

2013-07-03 Thread Icham Achtir
Thanks can you give my an example ? -- --- 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 https://gr

[web2py] SQLFORM.smartgrid works as expected up to web2py 2.4.2, but not later versions

2013-07-03 Thread Otto Domínguez
I have a working app since web2py 1.99 times, and I have been upgrading to later versions periodically. Today I noticed my app does not work in 2.5.1 in some simple uses of SQLFORM.smartgrid. I took time this morning to check versions from 2.3.2 up to latest to check in which version it stopped

Re: [web2py] routing problem nginx + uwsgi

2013-07-03 Thread Jonathan Lundell
On 3 Jul 2013, at 12:38 PM, Icham Achtir wrote: > Thanks can you give my an example ? > > > For path_prefix, you mean? Just specify path_prefix = 'user1' in your router. The router will strip that from incoming URLs, so the rest of the URL can include an application. routers = dict( BA

Re: [web2py] routing problem nginx + uwsgi

2013-07-03 Thread Icham Achtir
thanks you. I mean an example of the pattern-based router. Before I leave my office, I have try tu use the pattern-based router. And i don't find the solution, for example when i request the url mydomain/user1/myApp that work but when I click on home Home point to mydomain/user1/myApp/user1/myAp

[web2py] Re: Horrifically slow AJAX -- how to debug?

2013-07-03 Thread Derek
You're returning 72 rows, which equates to a 10k file, it's gzipped, so there's latency on the server side which has to gzip it. If you can get it under 5k the server may decide not to gzip it, thus speeding it up. Also, you are returning invalid attributes in your td tags. If you want to have

Re: [web2py] routing problem nginx + uwsgi

2013-07-03 Thread Jonathan Lundell
On 3 Jul 2013, at 1:13 PM, Icham Achtir wrote: > thanks you. > > I mean an example of the pattern-based router. > Before I leave my office, I have try tu use the pattern-based router. > And i don't find the solution, for example when i request the url > mydomain/user1/myApp that work but when

[web2py] Re: Horrifically slow AJAX -- how to debug?

2013-07-03 Thread Derek
Forgot to add, if your nginx is setup to do reverse ip lookups, you could speed that up by adding an entry in the hosts file of the servers. On Wednesday, July 3, 2013 1:17:32 PM UTC-7, Derek wrote: > > You're returning 72 rows, which equates to a 10k file, it's gzipped, so > there's latency on

[web2py] Re: Horrifically slow AJAX -- how to debug?

2013-07-03 Thread Joe Barnhart
Hi Derek -- That's great information. I didn't know about the "data-" part of custom tags -- I thought any tags were legal as long as I didn't use "id" or "class" or something else reserved. But I'm a newcomer to HTML 5 and I want to be as compliant as possible. That 10K number sounds too la

[web2py] SQLFORM.grid custom applications

2013-07-03 Thread Kamil
Hello guys, I tried SQLFORM.grid for a while and couldn't figure out if it's possible to do the following: 1) Let's say we have a tables: db.define_table('shop', Field('shop_name'), Field('city_id', 'reference city') ) db.define_table('city', Field('city_name') ) and grid = SQLFO

[web2py] Re: SQLFORM.grid custom applications

2013-07-03 Thread Rohitraj Sharma
Try This Hope this will help you db.define_table('city', Field(''city_name'),format='%('city_name)s') db.define_table('shop', Field('name'), Field('city','reference parent')) db.children.city.requires = IS_IN_DB(db, db.parent.id,'%(name)s') On Thursday, 4 July 2013 04:26:56 UTC+5:30, Kam

[web2py] Can Sql (sqlite) injections occur if normal html forms are used?

2013-07-03 Thread qwer qwer
I have used normal html forms instead of web2py forms at many places.Does this make sql injections possible? Can someone please give an example of such an injection, if possible. thanks -- --- You received this message because you are subscribed to the Google Groups "web2py-users" grou

Re: [web2py] Can Sql (sqlite) injections occur if normal html forms are used?

2013-07-03 Thread Jason (spot) Brower
If your not validating the data some how on the server then oh yes, very bad thing. On Thu, Jul 4, 2013 at 8:43 AM, qwer qwer wrote: > I have used normal html forms instead of web2py forms at many places.Does > this make sql injections possible? Can someone please give an example of > such an i

Re: [web2py] Can Sql (sqlite) injections occur if normal html forms are used?

2013-07-03 Thread Jason (spot) Brower
Never tried myself but I found this... https://sites.google.com/site/0x7674/home/sqlite3injectioncheatsheet On Thu, Jul 4, 2013 at 8:45 AM, Jason (spot) Brower wrote: > If your not validating the data some how on the server then oh yes, very > bad thing. > > > On Thu, Jul 4, 2013 at 8:43 AM, qw

Re: [web2py] Can Sql (sqlite) injections occur if normal html forms are used?

2013-07-03 Thread Jason (spot) Brower
Another issue is the cross site scripting attempts. I can make a site that can enter massive amounts of data on your system. Or make a website that looks like yours and lead a victim to use my site thinking they are filling in your form and take their information in the process but let the user co

[web2py] Re: Select table in drop down import the file and edit

2013-07-03 Thread Rohitraj Sharma
http://127.0.0.1:8000/appname/default/form On Tuesday, 2 July 2013 12:01:54 UTC+5:30, Anthony wrote: > > Your code includes: > > web2py_component("{{=URL('default', 'form.load')}}" + "/" + > jQuery(this).val(), target='form') > > That will is