[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread kokoyo
Hi Massimo, i did it and get output (test on user_auth table): mongoqry_dict ={'email': 'myem...@gmail.com'} mongofields_dict = SON([('id':1), ('first_name':1), ('last_name': 1), ('email':1), ('password':1), ('registration_key': 1), ('reset_password_key':1), ('registration_id':1) ])

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
WOW not a good idea: for row in db( db.file_properties.id 0 ).select( If you have a lot of records that is going to kill your memory. On Thu, May 10, 2012 at 12:10 AM, szimszon szims...@gmail.com wrote: I wonder if somebody could help me. The following code has eaten up ~1,5GB ram and after

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Yes I know but it happens over type the mem usage is linearly growing and after the successful execution never released and that is why I ask :( 2012. május 10., csütörtök 9:14:14 UTC+2 időpontban Bruce Wade a következőt írta: WOW not a good idea: for row in db( db.file_properties.id 0

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
That is how python is. If you want something to clear the memory as soon as you are done with it you need C++ :D On Thu, May 10, 2012 at 12:27 AM, szimszon szims...@gmail.com wrote: Yes I know but it happens over type the mem usage is linearly growing and after the successful execution never

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Should the garbage collector not free up the memory? 2012. május 10., csütörtök 9:28:48 UTC+2 időpontban Bruce Wade a következőt írta: That is how python is. If you want something to clear the memory as soon as you are done with it you need C++ :D On Thu, May 10, 2012 at 12:27 AM, szimszon

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
http://effbot.org/pyfaq/why-doesnt-python-release-the-memory-when-i-delete-a-large-object.htm That is a little more details On Thu, May 10, 2012 at 12:37 AM, szimszon szims...@gmail.com wrote: Should the garbage collector not free up the memory? 2012. május 10., csütörtök 9:28:48 UTC+2

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
If I understand well then python release the mem. for reuse by itself but not releasing at OS level. Fine. But then if I rerun the function I'll expect that the mem allocated for python is not growing. Because python reuse it. I executed the controller function and my mem usage at OS level 2x

Re: [web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
I've enumerated fields and colnames and they are like this: fields: id text integer string colnames: city age _id name I believe they don't match and thats why there's this error: File /opt/web2py/gluon/dal.py, line 8134, in select return adapter.select(self.query,fields,attributes) File

[web2py] Why does DAL report a syntax error on some executesql queries?

2012-05-10 Thread Johann Spies
I am working with Postgresql and am trying to get a way of working with schemas through web2py. In psql I can do: js=# show search_path; search_path $user,public (1 row)js=# set search_path to toets0; SET js=# \dt List of relations Schema | Name| Type |

[web2py] too many redirect message when using login

2012-05-10 Thread man24
I am new to web2py and has been following the online book to learn it. I was following the 'wiki' example and everything worked fine the first time, however, today when I click on any action that requires login or even the login link in the menu, web browser cannot open the page and gives

[web2py] Problem with auth_login: too many redirects

2012-05-10 Thread man24
Sorry for reposting the question. I am following the 'wiki' example given in the web2py book. After first implementation, it worked fine, however, now when I click on any action that requires login or even clicking the 'login' from the top menu, I get this response from my web browser: 'too

[web2py] problem related to GAE server

2012-05-10 Thread Prakhar Srivastava
what is the max image size we can upload through the img tag ? Because my application is working fine the local server and rock server when i upload my application on GAE server then it's not showing properly www.pixelofn.appspot.com this is my application actually it stack because he one photo

[web2py] GAE Mail Config.

2012-05-10 Thread Prakhar Srivastava
Is there anyone config the mail feature for GAE Server

[web2py] GAE

2012-05-10 Thread Prakhar Srivastava
when i upload my application this waring come up 2012-05-09 23:02:24.992 /pixelofn/static/images/album/thumbs/PixelOfNature_fm_03.jpg 404 27ms 0kb 223.183.189.220 - - [09/May/2012:23:02:24 -0700] GET /pixelofn/static/images/album/thumbs/PixelOfNature_fm_03.jpg HTTP/1.1 404 0

[web2py] Sending files to a controller and nicedit in the view.

2012-05-10 Thread Jason Brower
Is there a way I can build a form on one controller. Then send data to it including a file and various other things And then save that information to a database? Sounds simple right? I want to do it dynamically with my nicEdit integration. That is, I do something just like this...

[web2py] Difference between web2py reference book edition4.0 and Web2py application development cookbook

2012-05-10 Thread Amit
Hi, Can anyone please elaborate what is the difference between Web2py reference book edition 4.0 and Web2py application development cookbook? I have been searching some good coding example of implementation of SOAP web service using web2py but Couldn't get any good example in Web2py reference

[web2py] Re: SQLFORM.smartgrid : error when setting fields to be displayed as a fields dictionary.

2012-05-10 Thread François Delpierre
Houhou ! If works also on the smartgrid : form = SQLFORM.smartgrid( db.t_xlsfile, fields=[ db.t_xlsfile.f_xlsfile, ], ), smartgrid are really powerful, but still missing some docs... I had some difficulties to find

[web2py] Re: Sending files to a controller and nicedit in the view.

2012-05-10 Thread Anthony
Is this correct? I think I can't do this with default settings as there is something stoping CSRF attacks, right? If your get_file function creates a web2py form and calls form.process(), then by default it will add a _formkey token to the form for CSRF protection -- if that key is not

Re: [web2py] Combination of fields must be unique

2012-05-10 Thread Bruno Rocha
db.define_table('nm', Field('a', notnull=True), Field('b', notnull=True), Field('unikey', unique=True)) db.nm.unikey.compute = lambda row: row.a + row.b Em 10/05/2012 02:46, Alec Taylor alec.tayl...@gmail.com escreveu: E.g.: For a letter to be unique and identifiable it needs unique(location

[web2py] Re: Difference between web2py reference book edition4.0 and Web2py application development cookbook

2012-05-10 Thread Anthony
The cookbook is a collection of recipes for implementing specific functionality and generally more advanced than the online reference book. The cookbook does include one SOAP example, and you can see the sample code for it in this app:

[web2py] Re: Difference between web2py reference book edition4.0 and Web2py application development cookbook

2012-05-10 Thread Amit
Thanks Anthony :), let me check it out if it really helps me implement web services in web2py. On Thursday, 10 May 2012 16:16:55 UTC+5:30, Anthony wrote: The cookbook is a collection of recipes for implementing specific functionality and generally more advanced than the online reference

[web2py] Re: Why does DAL report a syntax error on some executesql queries?

2012-05-10 Thread Johann Spies
Problem partly solved: there was a mistake in my database connection: It was configured wrongly using sqlite in stead of postgresql. Now I can do db.executesql('show search_path') and set the search path but I still cannot do: db.executesql('show schema') Regards Johann

Re: [web2py] new feature in trunk: better markmin

2012-05-10 Thread Alan Etkin
That solves it. Even it's possible to populate the input with different :html instances. Perhaps could come handy to reserve a tag for html, saving the extra lambda argument. On Wednesday, May 9, 2012 2:03:00 AM UTC-3, Massimo Di Pierro wrote: You can use MARMIN(...,extra=dict(html=lambda x:

Re: [web2py] Combination of fields must be unique

2012-05-10 Thread Anthony
If inserts into the table will be done via form submission and you don't want to store an extra field in the table, another option is: db.define_table('letter', Field('name'), Field('location', requires=IS_NOT_IN_DB(db(db.letter.name==request.vars.name), 'letter.location')))

Re: [web2py] override smartgrid 'add' button

2012-05-10 Thread Franzé Jr
On Thu, May 10, 2012 at 1:43 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you trying to remove the header? I do not think we have an option for that. You can try hide it using jquery. Yes..I'm trying... I can use jQuery, but I think it may have a option to do this thing... --

[web2py] Re: Looking for web2py help - is there a group for recruiting?

2012-05-10 Thread Anthony
Also here: http://experts4solutions.com/ On Thursday, May 10, 2012 1:27:31 AM UTC-4, David Rager wrote: We will be looking for some web2py programming help in June - curious where the best place is to find folks. Is it here? Thanks!

[web2py] Re: Problem with auth_login: too many redirects

2012-05-10 Thread Anthony
Can you post your exact code (models, controllers, views)? On Thursday, May 10, 2012 1:22:14 AM UTC-4, man24 wrote: Sorry for reposting the question. I am following the 'wiki' example given in the web2py book. After first implementation, it worked fine, however, now when I click on any

Re: [web2py] Combination of fields must be unique

2012-05-10 Thread Johann Spies
I let the database (Postgresql) do the work using a constraint and then do a try: insert-or-update-record except: pass in web2py. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] override smartgrid 'add' button

2012-05-10 Thread Jim Steil
I would really like to see an option to override the default Add button. I have a couple situations where I'd like to provide sort of a dropdown menu button there to give the option to add a couple different things. Kind of like what Outlook offers on the New button. Better yet would be to

[web2py] Re: too many redirect message when using login

2012-05-10 Thread Massimo Di Pierro
Please open a ticket about this. Meanwhile, can you try delete all session files? Any progress? On Wednesday, 9 May 2012 23:27:28 UTC-5, man24 wrote: I am new to web2py and has been following the online book to learn it. I was following the 'wiki' example and everything worked fine the

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
Their is no grantee that python will use that exact same memory. It would also depend how frequently you use that function. http://mg.pov.lt/blog/hunting-python-memleaks.html On Thu, May 10, 2012 at 12:57 AM, szimszon szims...@gmail.com wrote: If I understand well then python release the mem.

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
Please try trunk again. On Thursday, 10 May 2012 01:03:22 UTC-5, kokoyo wrote: Hi Massimo, i did it and get output (test on user_auth table): mongoqry_dict ={'email': 'myem...@gmail.com'} mongofields_dict = SON([('id':1), ('first_name':1), ('last_name': 1), ('email':1), ('password':1),

[web2py] Re: SQLFORM.smartgrid : error when setting fields to be displayed as a fields dictionary.

2012-05-10 Thread Massimo Di Pierro
Still your original code should have worked. Please submit a bug report. On Thursday, 10 May 2012 05:26:57 UTC-5, François Delpierre wrote: Houhou ! If works also on the smartgrid : form = SQLFORM.smartgrid( db.t_xlsfile, fields=[

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
In your for loop, every time you iterate the object instance count is increased. Now if you call that loop again before python garbage collector has time to release memory then your for loop will cause more instances to be increased. Python will not release memory to the os for an object until

[web2py] jqgrid assistance

2012-05-10 Thread Larry Wapnitsky
I'm trying out jqgrid (yes, I finally got plugin_wiki working ;)), but can't seem to get it to display data. Here is my code: *{{=plugin_wiki.widget('jqgrid', db.ips)}}* I see a table with MOST of my fields showing (not all, strangely), but no data. I know for a fact that the database is

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
Still not working. I think Fields order is wrong. At the end of the select() function I write this: a = [] for f in fields: a.append(f.type) return dict(rows=rows, fields=a, colnames=colnames) and I got this: colnames: city age _id name fields: id text

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruno Rocha
Just for curiosity, what happens if you do it in pure sql? for row in db.executesql(select * from file_properties where id 0): # do something Does it have a lower memory usage? On Thu, May 10, 2012 at 4:14 AM, Bruce Wade bruce.w...@gmail.com wrote: for row in db( db.file_properties.id

[web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Bruce Wade
Hi, Have you ever fixed this problem? I am finding it very very hard to handle high load websites, also using postgres. I think the bottle neck is the DB layer as even using the admin tool causes timeout issues. Last night I had 2.3k concurrent users for 5 hours which caused one of the servers

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
I reduced the code in controller to: def autoadjust(): lista = list() last_row = None next_page_number = 0 for row in db.executesql( select * from file_properties where id 0 ): pass lista = TABLE( *lista ) return dict( lista = lista ) And I still have memleak

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
It's postgres:// in a Version 1.99.7 (2012-04-23 11:26:23) dev of web2py, and Python 2.7.3 (default, Apr 20 2012, 22:44:07) [GCC 4.6.3] on linux2 python-psycopg2 2.4.5-1 2012. május 10., csütörtök 15:40:36 UTC+2 időpontban rochacbruno a következőt írta: Just for curiosity, what happens if

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
Using direct sql query or DAL is going to cause the exact same problem in this situation. On Thu, May 10, 2012 at 7:28 AM, szimszon szims...@gmail.com wrote: It's postgres:// in a Version 1.99.7 (2012-04-23 11:26:23) dev of web2py, and Python 2.7.3 (default, Apr 20 2012, 22:44:07) [GCC

[web2py] call for ideas

2012-05-10 Thread Niphlod
Hi all, I'm in the process of releasing an app written in web2py that use extensively the scheduler. It's going to be used on desktops, but I'd like to keep my mind open and if someone will want to load it into apache/nginx/uswgi, why not ? For the intrinsic nature of the app, some logic

[web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Ross Peoples
The DB layer is usually the bottleneck. However, moving from models to modules should reduce any bottleneck caused by the web server.

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Sorry for my dumbness but if something is wrong with my code please point me the right line. I'm not so good in English if it comes to object instance count and so. Yeah I know I should go and do some milkmaid job :) but I'm curious. I'm just define some variable: lista = list() last_row =

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Michele Comitini
Is the high load caused by web2py process or postgresql? Is web2py on the same machine as postgresql? Use top or htop to find which process uses the CPU. If it is web2py *use* the profiler. If it postgres try to find the bad query and try to improve it by using EXPLAIN. Could be also the

[web2py] Re: Problem with auth_login: too many redirects

2012-05-10 Thread man24
Here is the model file - db2.py # coding: utf8 db.define_table('page', Field('title', requires=IS_NOT_IN_DB(db, 'page.title')), Field('body', 'text', requires=IS_NOT_EMPTY()), Field('created_on', 'datetime', default=request.now, readable=False, writable=False),

[web2py] Re: Problems trying to use jqgrid from plugin_wiki

2012-05-10 Thread Larry Wapnitsky
Massimo- I'm still getting this in the latest trunk of web2py. Any ideas? Thanks, Larry On Monday, January 10, 2011 4:13:12 PM UTC-5, Massimo Di Pierro wrote: It took me a while to debug this. The problem is that the ajax service that fills the table requires login. You probably have

Re: [web2py] Looking for web2py help - is there a group for recruiting?

2012-05-10 Thread David Rager
Thanks for the replies! We have a project building a solar monitoring solution to be used by an OM group which is going to be installed for about 10 different solar plants around the world - probably expanded past that next year. It is a system that ingests data from multiple devices on a

[web2py] Re: too many redirect message when using login

2012-05-10 Thread man24
Yes, I will open a ticket. Is there a simpler way of deleting sessions that does not involve command line action and is automated? I am on mac and using the compiled web2py. Also, by mistake, I have posted this question twice -'Problem with auth_login: too many redirects' - so there are now

Re: [web2py] Re: Reloading modules

2012-05-10 Thread howesc
i use the persistent local datastore on GAE SDK as well. i have not tried to turn on dynamic module re-loading on GAE, but i have a shell script that starts/stops GAE and i just restart that. it's not as fast as auto-reloading but it has been ok for me (though now that i'm doing more and

Re: [web2py] Re: Reloading modules

2012-05-10 Thread Alex BENFICA
Hi... When you say now that i'm doing more and more in modules it does slow things down... are you talking about development time, right? is not about the performace of you web2py app... is that? The performance increase when using modules instead put code on models worth all this extra work? Do

Re: [web2py] Re: Reloading modules

2012-05-10 Thread Christian Foster Howes
yes, sorry, i meant in development time. in one project i moved models to modules and shaved about 33% off of the GAE production request time. another project is in test this week and i will hopefully have numbers soon. note that when you don't need auth (not all of my requests use auth)

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Richard Vézina
You can't manage what you want to achieve with join? Richard On Thu, May 10, 2012 at 10:48 AM, szimszon szims...@gmail.com wrote: Sorry for my dumbness but if something is wrong with my code please point me the right line. I'm not so good in English if it comes to object instance count and

[web2py] Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-10 Thread Remco K
Hello everyone, I'm looking for a way to get an auto-complete field combined with adding non-existing item to the DB. I've seen a website which uses this functionality (demo: http://www.tellmehow.nl/video.html ) I have already tried SELECT_OR_ADD_OPTION but i don't like drop-downs... Thanks in

[web2py] External database query for authentication (RBAC)

2012-05-10 Thread BoleroDan
We're looking to use Web2py as our framework for developing a couple applications. However we already have a massive database for our research project, and almost all of the information is integrated into this database (including usernames, passwords, group names etc) so it would be nice to

[web2py] why so many instances of console-kit-daemon?

2012-05-10 Thread Carlos
Hi, My web2py app runs on ubuntu server 10.04, with postgresql, nginx, uwsgi-python. With htop, I notice there are 64 instances of the following (each with MEM 0.3%): console-kit-daemon --no-daemon Does anybody know what's that about?. Does this mean they are using almost 20% of memory

[web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread pbreit
Is your traffic from serving ads or users coming to your web site? Have you exhausted caching opportunities?

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Sorry I don't understand. What do you mean achieve with join? There is an empty for loop with db.executesql() without join. And it is eating up the memory. :( 2012. május 10., csütörtök 19:12:30 UTC+2 időpontban Richard a következőt írta: You can't manage what you want to achieve with join?

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Bruce Wade
Web2py is on 3 different servers/nodes, postgresql is on it's own node with 8GB ram. CPU is being used by uwsgi so web2py. The slowness I think is from DB queries as when you load a page without the DB involved much it loads quickly The serving ads part is not a problem it is the other pages on

[web2py] Re: Javascript file in static folder not refreshed

2012-05-10 Thread Niphlod
Expiring headers wouldn't be smart what if you changed the html trusting that the new javascript will be fetched instead of the cached one ? Or, you choose to set expire headers 2 days in the future, and you need to make a change to the code, but need to wait 2 days to wait for

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Bruce Wade
Sorry, you really need to read more about how python works. If you learn how for loops work and memory you will understand the problem. One solution do the query before the for loop then loop through the objects. This may help at bit. Research xrange vs range On Thu, May 10, 2012 at 11:30 AM,

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Is there a doc already known by you explaining this? Can you post a link? 2012. május 10., csütörtök 20:42:22 UTC+2 időpontban Bruce Wade a következőt írta: Sorry, you really need to read more about how python works. If you learn how for loops work and memory you will understand the problem.

Re: [web2py] Combination of fields must be unique

2012-05-10 Thread Alec Taylor
On Thursday, May 10, 2012 8:36:18 PM UTC+10, rochacbruno wrote: db.define_table('nm', Field('a', notnull=True), Field('b', notnull=True), Field('unikey', unique=True)) db.nm.unikey.compute = lambda row: row.a + row.b Thanks, but that didn't work. I am able to push in multiple duplicates

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
In book it is a recommended way to iterate over sql results: http://web2py.com/books/default/chapter/29/6 You can do all the steps in one statement: 1. 2. 3. for row in db(db.person.name=='Alex').select(): print row.name Alex 2012. május 10., csütörtök 20:42:22 UTC+2 időpontban

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Richard Vézina
I didn't read enough your logic, but since it was implicated a other table I thougth you just want to do a kind of computed field. Also, what you seems to do is a kind of paging fonction, why you can't achieve this with count()? Richard On Thu, May 10, 2012 at 2:30 PM, szimszon

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Richard Vézina
Yes but in this case it is not for the entire records... Why would you return a full list of all the records? I don't understand what is the purpose of listar that you return in the view under a html table, why do you need to return all the 10+ entries? Richard On Thu, May 10, 2012 at 2:56

[web2py] Centralised CRUD form for all referenced tables

2012-05-10 Thread Alec Taylor
I have 4 tables which I would like to create a form for. As a test-case I have greatly simplified them and only included two: db.define_table('product', Field('name','string'), Field('category','string') ) db.define_table('product_list', Field('product_id', 'list:reference

[web2py] PyCon Argentina 2012: Call for Proposals: talks, tutorials, scientific papers and student works contest

2012-05-10 Thread Mariano Reingart
PyCon Argentina 2012 - Fourth Spanish-speaking National Python Conference November 12th - 17th, 2012 UNQ - National University of Quilmes - Buenos Aires http://ar.pycon.org/?lang=en PyAr, the Argentina Python User Group, is proud to present the 4th annual PyCon Argentina, in Buenos Aires this

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
I had to store files and a lot of properties for it. It was in csv. But after I processed it we figured out that not all value was correct in csv but it was a bit redundant. So I can correct it by go through all the records row by row. So that was a one time trip. I just realized after the

[web2py] Re: External database query for authentication (RBAC)

2012-05-10 Thread Massimo Di Pierro
In the scaffolding app there is a file db.py which defines for you everything you need for RBAC. If you do not want to use this built-in functionality simply delete the file and use your own API. There is nothing that really depends on it. On Thursday, 10 May 2012 08:17:35 UTC-5, BoleroDan

[web2py] Re: jqgrid assistance

2012-05-10 Thread Massimo Di Pierro
If you use chrome check the developer tools. There should be some ajax request to get data. Does it fail? Why? To check you can also delete your tickets in errors/* and see if any new one shows up. On Thursday, 10 May 2012 08:31:15 UTC-5, Larry Wapnitsky wrote: I'm trying out jqgrid (yes, I

[web2py] Re: jqgrid assistance

2012-05-10 Thread Larry Wapnitsky
This is what's showing up in the source code: http://pastie.textmate.org/3891282 On Thursday, May 10, 2012 3:44:49 PM UTC-4, Massimo Di Pierro wrote: If you use chrome check the developer tools. There should be some ajax request to get data. Does it fail? Why? To check you can also delete

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Richard Vézina
Ok, you don't need it to works all the time. Did you get it to update your records? If not, and if as you said it is a one trip, you can just treat the whole records batch by batch... Look here : http://web2py.com/books/default/chapter/29/14#Populating-database-with-dummy-data for i in

[web2py] Re: Javascript file in static folder not refreshed

2012-05-10 Thread Derek
I think the second option is the better one. Even better would be to support the If-Modified-Since or use ETAG. On Thursday, May 10, 2012 11:36:01 AM UTC-7, Niphlod wrote: Expiring headers wouldn't be smart what if you changed the html trusting that the new javascript will be fetched

[web2py] Moving away from define_table

2012-05-10 Thread Christopher Baron
Hi, I've been using web2py for a few years now. What I find most annoying is the DAL. I understand that its easy for people who don't have a programming background, but anytime I want to make changes to columns - I run into issues large and small. I'd simply prefer to manage my database

[web2py] Re: Moving away from define_table

2012-05-10 Thread simon
Can't you just set migrate=false? On Thursday, 10 May 2012 20:55:14 UTC+1, Christopher Baron wrote: Hi, I've been using web2py for a few years now. What I find most annoying is the DAL. I understand that its easy for people who don't have a programming background, but anytime I want to

[web2py] Re: jqgrid assistance

2012-05-10 Thread Larry Wapnitsky
Also just found this via the dev tools:: Request URL: http://127.0.0.1:8000/rbl_web2py/plugin_wiki/jqgrid?columns=ipaddress%2Cattacknotes%2Cb_or_w%2CupdCountfieldname=fieldvalue=Nonetablename=ips_search=falsend=1336679760463rows=10page=1sidx=sord=asc

Re: [web2py] Re: Moving away from define_table

2012-05-10 Thread Richard Vézina
db=DAL('postgres://USER:PWD@127.0.0.1:5432/database', \ *migrate_enabled=False*) Or as simon wrote : db.define_table(...,migrate=False) Richard On Thu, May 10, 2012 at 4:01 PM, simon simo...@gmail.com wrote: Can't you just set migrate=false? On Thursday, 10 May 2012 20:55:14

[web2py] Re: Moving away from define_table

2012-05-10 Thread Anthony
You can turn off migrations globally for the entire db connection via DAL(..., migrate_enabled=False). Anthony p.s., Even people with a programming background find the DAL useful. :-) On Thursday, May 10, 2012 4:01:18 PM UTC-4, simon wrote: Can't you just set migrate=false? On Thursday, 10

[web2py] Re: jqgrid assistance

2012-05-10 Thread Larry Wapnitsky
Even this fails on a wiki page: `` name: jqgrid table: db.ips col_width: 80 width: 700 height: 300 ``:widget Traceback (most recent call last): File /home/lwapnitsky/web2py/applications/rbl_web2py/models/plugin_wiki.py, line 635, in render_widget html =

[web2py] Re: too many redirect message when using login

2012-05-10 Thread Derek
from admin, click 'clean'. On Thursday, May 10, 2012 9:10:58 AM UTC-7, man24 wrote: Yes, I will open a ticket. Is there a simpler way of deleting sessions that does not involve command line action and is automated? I am on mac and using the compiled web2py. Also, by mistake, I have

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
This helps. I have another attempt to fix this in trunk. Hard to test it since I do not have mongodb installed. On Thursday, 10 May 2012 08:39:22 UTC-5, Francisco Costa wrote: Still not working. I think Fields order is wrong. At the end of the select() function I write this: a = []

[web2py] Re: jqgrid assistance

2012-05-10 Thread Larry Wapnitsky
the whole plugin_wiki thing is really starting to get my goat. Now I'm getting errors trying to delete my test wiki page: class 'gluon.contrib.pymysql.err.IntegrityError' (1452, u'Cannot add or update a child row: a foreign key constraint fails (`rbl`.`plugin_wiki_page_archive`, CONSTRAINT

[web2py] Re: Javascript file in static folder not refreshed

2012-05-10 Thread Anthony
When web2py serves static files, it does set the Last-Modified header, but I'm not sure that's enough to prompt an If-Modified-Since request -- we may need to add a max-age=0 and/or must-revalidate directive as well. Anthony On Thursday, May 10, 2012 3:54:54 PM UTC-4, Derek wrote: I think

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Okay. It's clear. I'm only puzzled about why the memory didn't get freed or reused after execution is finished. And if I execute the controller function in 1-2min interval mem is still not reused. So I understand it can eat up the memory but why is all memory locked forever and didn't get

[web2py] Re: Problem with auth_login: too many redirects

2012-05-10 Thread Anthony
@auth.requires_login() def user(): Don't require login to get to the user() function -- if you're not logged in, it redirects to the user() function, which will result in an infinite redirect loop. Anthony On Thursday, May 10, 2012 11:33:34 AM UTC-4, man24 wrote: Here is the model file -

[web2py] Re: too many redirect message when using login

2012-05-10 Thread Anthony
Solved, I think: https://groups.google.com/d/msg/web2py/EzSNrQt4SZk/ZggJrIqad5UJ On Thursday, May 10, 2012 12:27:28 AM UTC-4, man24 wrote: I am new to web2py and has been following the online book to learn it. I was following the 'wiki' example and everything worked fine the first time,

[web2py] Re: Manual image upload

2012-05-10 Thread 王康
hi, have you guys solved this problem? Because now I'm in the same problem _ On Sunday, December 26, 2010 4:15:54 AM UTC+8, mdipierro wrote: Email me your app. On Dec 25, 2:08 pm, Arun K.Rajeevan the1.a...@gmail.com wrote:

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread szimszon
Could it be related? https://groups.google.com/forum/#!topic/web2py/hmsupVHdDHo/discussion (Memory leak in standalone DAL (issue #731), can you please help test?) 2012. május 10., csütörtök 22:32:53 UTC+2 időpontban szimszon a következőt írta: Okay. It's clear. I'm only puzzled about why

[web2py] Re: Vertical lines around database string values

2012-05-10 Thread Yarin
This was because I accidentally had trailing commas on some insert param statements, causing them to be tuples instead of strings. My bad. On Sunday, April 15, 2012 9:41:28 AM UTC-4, Yarin wrote: This went away, don't know why or how.. On Saturday, April 14, 2012 11:17:51 AM UTC-4, Yarin

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Michele Comitini
The high load on web2py nodes seems to point to code in web2py. If it were a problem with postgres you would have a high load on postgresql and a lot of wait state and little CPU time resulting in little uptime on web2py nodes but long page rendering times. I suggest to try to convert some logic

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-10 Thread Bruce Wade
Yes there are a LOT of wait state on the web2py nodes and high CPU I will try your suggestions. Thanks, Bruce On Thu, May 10, 2012 at 2:10 PM, Michele Comitini michele.comit...@gmail.com wrote: The high load on web2py nodes seems to point to code in web2py. If it were a problem with

Re: [web2py] why so many instances of console-kit-daemon?

2012-05-10 Thread Michele Comitini
That is for managing the consoles nothing to do with web2py. IIRC there was a bug with console-kit eating too many resources, try to see if updating it works. mic 2012/5/10 Carlos carlosgali...@gmail.com: Hi, My web2py app runs on ubuntu server 10.04, with postgresql, nginx, uwsgi-python.

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
Just add a '\' at the end of line 4664 and your are done! Great job Massimo! On Thursday, May 10, 2012 9:12:48 PM UTC+1, Massimo Di Pierro wrote: This helps. I have another attempt to fix this in trunk. Hard to test it since I do not have mongodb installed. On Thursday, 10 May 2012

Re: [web2py] Need a little help in code review (a function eating up all memory)

2012-05-10 Thread Martín Mulone
The problem is fetchall(), is getting all the records to memory. If you want to iterate a large dataset or not so heavy, but have a table with many fields, perhaps you can do it by blocks. For example using raw sql with dal: example: this fetch by 1000 records queryraw = select * from mytable

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
I found another problem!! if you do this: mongo.user.insert(name='Jim', age=18, city='Detroit') mongo.user.insert(name='Jack', age=18) and then select users = mongo(mongo.user.age==18).select() you don't have the field city in one of the rows, so you get this error: users =

[web2py] Setup web2py in virtualenv

2012-05-10 Thread mrtn
I have installed virtualenv and setup an environment for a web2py project. I came across a post before where people say you can use pip to install web2py, but it is still experimental and possibly not working well. I wonder if I can just copy the whole web2py source folder to somewhere (/bin,

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
What's the model? On Thursday, 10 May 2012 16:27:51 UTC-5, Francisco Costa wrote: I found another problem!! if you do this: mongo.user.insert(name='Jim', age=18, city='Detroit') mongo.user.insert(name='Jack', age=18) and then select users = mongo(mongo.user.age==18).select()

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
i didn't understand your question.. This is the complete code import sys import time from gluon.dal import DAL, Field mongo = DAL('mongodb://localhost:27017/sapo') mongo.define_table('user', Field('name', 'text'), Field('age', 'integer'),

[web2py] Load data from sqlite file?

2012-05-10 Thread Dave
Any examples or suggestions on how to load data from a user-uploaded .sqlite database? I will have the database structure of the uploaded files ahead of time (they are being generated by a mobile app), so I need a way to transfer the data from an uploaded .sqlite file to my web2py tables. is

  1   2   >