[web2py] Error in trunk?

2010-07-21 Thread David Marko
Applying latest trunk I'm getting following error on console when navigating the first page e.g. http://localhost:8000 ERROR:root:Traceback (most recent call last): File "c:\java\google_appengine\web2py\gluon\main.py", line 384, in wsgibase if static_file: UnboundLocalError: local variable

[web2py] Re: please explain this twitter post

2010-07-21 Thread mdipierro
Sorry. There are copyright issues. The slides and code are published. http://web2py.com/examples/static/supercomputing2009.zip On Jul 21, 7:27 pm, Scott wrote: > Any chance you might publish the paper on the web2py site? > > On Jul 21, 5:54 pm, mdipierro wrote: > > > Oops. It seems the link got

[web2py] Re: SQLite Logging

2010-07-21 Thread Yarin
By using web2py's default sqlite db, I was able to solve the threading issues(Thanks Iceberg)- however, for whatever reason the only record being inserted into the db is the initial one from log.py when logging gets initiated. Any subsequent attempts to log from controllers don't show up in the db

[web2py] Re: SQLite Logging

2010-07-21 Thread Yarin
By using web2py's default sqlite db, I was able to solve the threading issues- however, for whatever reason the only record being inserted into the db is the initial one from log.py when logging gets initiated. Any subsequent attempts to log from controllers don't show up in the db- no error, just

[web2py] Having problem accessing admin thru ssh tunneling

2010-07-21 Thread Narendran
Hi, As widely recommended, 1. I have removed the parameters_*.py on my prod server. 2. Established an ssh connection to my prod server from my local host on my_port. 3. Started web2py locally on that port with -a ' option. 4. Now, if I try to access http://localhost:my_port/admin, I get this messa

[web2py] Re: plugin_wiki

2010-07-21 Thread Chris S
It's available on the download page of the web2py site: http://www.web2py.com/examples/default/download Additionally, I check out cube2py from the google code repository and copy the source files from there. If you want to be able to download the latest trunk and see what's changed. On Jul 21, 11

[web2py] Re: plugin_wiki / roles

2010-07-21 Thread Chris S
I've been really exploring plugin_Wiki since it's launch and I can at least answer what the Role: box does. If a group is listed in this box for a page ONLY that group can then access the page. Notice I say group because while "user_1" is the default group for a specific user you can just as easi

[web2py] Re: SQLite Logging

2010-07-21 Thread Yarin
Disregard that last post I found it: web2py/applications/{app}/ databases/storage.sqlite I used that and looks like it solved the threading issues! Thanks Iceberg... testing now to see if I can get the whole thing working... On Jul 21, 11:41 pm, Yarin wrote: > @Iceberg, that seems like a really

Re: [web2py] Re: plugin_wiki

2010-07-21 Thread Bruno Rocha
Where can I download standalone plugin_wiki to include in my running web2py app? 2010/7/21 Tim Michelsen : >> What does the roadmap look like for >> the future? > Yes, that's exactly my question at the moment. > > I mean there were a numbert of attempts: > t1, t2, c9, cube2py and now just plugin_w

Re: [web2py] Wiki in Chap 3 of Documentation

2010-07-21 Thread Bruno Rocha
I have this app working fine, but I had to change the search to: controller: def search(): "an ajax wiki search page" return dict(form=FORM(INPUT(_id='keyword', _onkeyup="ajax('bg_find', ['keyword'], 'target');")), target_div=DIV(_id='target')) def bg_find()

[web2py] Re: SQLite Logging

2010-07-21 Thread Yarin
@Iceberg, that seems like a really good idea but I'm not sure how I'm supposed to do that- what is the 'web2py db instance'? An instance of what? Or is it a path to a db file that already exists in the web2py heirarchy? Could you possibly provide an example? Thanks-- On Jul 21, 10:37 pm, Iceberg

[web2py] Re: SQLite Logging

2010-07-21 Thread Iceberg
Just a quick thought. Since web2py itself already handles SQLite db well under multi-thread situation, so a quick tweak to your sqlitehandler.py may be putting the web2py db instance, rather than a filename, to initialize your SQLiteHandler() class. Best regards, Ice

[web2py] SQLite Logging

2010-07-21 Thread Yarin
I'd like to elicit some help in putting together a SQLite-based logging solution for web2py. Logging to a file was covered earlier in this forum (See "Global logging to file"): http://groups.google.com/group/web2py/browse_thread/thread/e20d0bd2e542aa14/e248314770225225 log.py: https://sites.google

[web2py] Wiki in Chap 3 of Documentation

2010-07-21 Thread Jeff S
Does someone have an uploadable version of the wiki application found in chapter 3? The search page does not work on my computer, but I can't understand why. My best guess would be a security feature in Internet Explorer, but I would like to exclude the possibility of an error in my code. The be

Re: [web2py] Re: rocket performance issues

2010-07-21 Thread Jonathan Lundell
On Jul 21, 2010, at 2:03 PM, mdipierro wrote: > The fact that you are having the problem with static files is giving > me an idea for a test. > Can you please try the web2py I just posted in trunk? That seems like a nice optimization, but (assuming it fixes the symptom) does it explain the 20-25

[web2py] Re: please explain this twitter post

2010-07-21 Thread Scott
Any chance you might publish the paper on the web2py site? On Jul 21, 5:54 pm, mdipierro wrote: > Oops. It seems the link got > truncatedhttp://www.computer.org/portal/web/csdl/doi/10.1109/MCSE.2010.97

[web2py] Re: memcache error

2010-07-21 Thread Scott
Massimo, please add the import: from gluon.cache import CacheAbstract to the top of gluon\contrib\memcache\__init__.py. Thanks! On Jul 21, 7:24 pm, Scott wrote: > Massimo, > > I just checked out the trunk and I'm seeing an issue preventing the > loading of the Welcome app: > >   File "C:\Users

[web2py] Re: memcache error

2010-07-21 Thread Scott
Massimo, I just checked out the trunk and I'm seeing an issue preventing the loading of the Welcome app: File "C:\Users\scott\Documents\workspace\web2py-dev\gluon\main.py", line 384, in wsgibase if static_file: UnboundLocalError: local variable 'static_file' referenced before assignment I

[web2py] plugin_wiki / roles

2010-07-21 Thread aure
Hi everyone, Massimo, thanks a lot for the last video. I have just tried everything on a webfaction web2py website and this is really fast and easy to build applications this way! :D I have questions considering roles though. At the bottom of the Pages when we build them using plugin_wiki, I can

[web2py] Re: rocket performance issues

2010-07-21 Thread MikeEllis
Alas, no change with Version 1.81.4 (2010-07-17 16:14:44) One more little observation: In general, I can load a page from either, but not both, of the browsers repeatedly and not get the problem. It happens with alternation, as discussed previously, but I now notice that I seem to be able to ca

[web2py] Re: Access other middleware and business logic from web2py

2010-07-21 Thread mdipierro
Honestly web2py is not for everybody. I am not very well versed in JEE and unless you can separate the JEE app and the web2py and connect them exclusively by sharing a database and /or web services, a Python framework may not be a good solution for you. On Jul 21, 4:30 pm, ChristophW wrote: > Hel

[web2py] Access other middleware and business logic from web2py

2010-07-21 Thread ChristophW
Hello, I am currently looking into web2py to more efficiently build a complex web interface for an even more complex server application. Just FYI, I don't have much experience with Python and nil with web2py so far. Currently my concern is the business logic, where it is located and where the data

[web2py] Re: please explain this twitter post

2010-07-21 Thread mdipierro
Oops. It seems the link got truncated http://www.computer.org/portal/web/csdl/doi/10.1109/MCSE.2010.97

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Thank you Thadeus. This seems a good approach. Massimo On Jul 21, 4:33 pm, Thadeus Burgess wrote: > I try. > > I have several copies of web2py core that I have modified in attempt to fix > these issues, attempting to narrow down the cause, to no avail yet. I want > to do two more tests. The firs

[web2py] please explain this twitter post

2010-07-21 Thread Tim Michelsen
What do you want to say by RT @computingnow: [cise] PrePrint: web2py for Scientific Applications: The needs of scientists to communicate effectively, collaborate.. ?

Re: [web2py] Re: Executing applications from web2py

2010-07-21 Thread Jonathan Lundell
On Jul 21, 2010, at 2:09 PM, mdipierro wrote: > Welcome Hector, > > using os.system is fine if the the commands are short and independent. One caveat: in general, os.system is deprecated in favor of the subprocess module. http://docs.python.org/library/subprocess.html http://www.python.org/dev

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Thadeus Burgess
I try. I have several copies of web2py core that I have modified in attempt to fix these issues, attempting to narrow down the cause, to no avail yet. I want to do two more tests. The first one, make flask use the web2py DAL so we can compare core to core. Make sure web2py has all of the fancy opt

[web2py] Re: rpxauth

2010-07-21 Thread mdipierro
There are multiple ways to login with web2py and one of them, which you point out is OpenID. The problem is setting these things up is usually more complex than needs to be. RPX allows developers to outsource this problem, configure multiple login methods in one place, keeps statistics about logged

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread Michael Toomim
Great! I want to understand it too! Your breakdown helps me think about how to look into this. I will do some more analysis, but for now: - I'm not using forms - I had migrate=True and the app was not compiled earlier. now it's compiled and migrate=False and I have a bigger machine, things

[web2py] Re: plugin_wiki

2010-07-21 Thread Tim Michelsen
> What does the roadmap look like for > the future? Yes, that's exactly my question at the moment. I mean there were a numbert of attempts: t1, t2, c9, cube2py and now just plugin_wiki. How much is the core team dedicated to make this more that just a demo project? Web development at my company

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Which os? fcgi? On Jul 21, 4:02 pm, Vidul Petrov wrote: > I am in doubt that web2py is the bottleneck. > My recent tests on a modest cloud server (2GHz CPU, 1G RAM): > 1_000, 5_000, and 10_000 requests in total, 100 concurrent requests - > 16 milliseconds per request with no HTTP server errors. >

[web2py] Re: Executing applications from web2py

2010-07-21 Thread mdipierro
Welcome Hector, using os.system is fine if the the commands are short and independent. I would recommend creating a database table of tasks to be executed db.define_table('task_queue',Field('status'),Field('command')) The web app would queue commands (status=queued) and a web2py shell script wou

[web2py] Re: rocket performance issues

2010-07-21 Thread mdipierro
The fact that you are having the problem with static files is giving me an idea for a test. Can you please try the web2py I just posted in trunk? Massimo On Jul 21, 2:08 pm, MikeEllis wrote: > One more detail.  As you would hope, it's generally not the case that > both browsers stall at the same

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Vidul Petrov
I am in doubt that web2py is the bottleneck. My recent tests on a modest cloud server (2GHz CPU, 1G RAM): 1_000, 5_000, and 10_000 requests in total, 100 concurrent requests - 16 milliseconds per request with no HTTP server errors. The RDBMS and the HTTP server in question were Postgres and Cheroke

[web2py] Executing applications from web2py

2010-07-21 Thread Hector Oron
Hello, I am new to the group: Hi all! I am evaluating web2py to use it on a project, and I like it very much so far, but I am not (yet) a python guru. Let me explain a little bit what I want to do, I have several embedded machines, which I would like to program issuing shell commands which call

[web2py] Re: pycloud, cool!

2010-07-21 Thread mdipierro
They let you make outbound connections and they let you build your own binary modules. On Jul 21, 3:07 pm, MikeEllis wrote: > I see the list of packages includes urllib, so this might be a useful > and easy way to massively stress test a web app, e.g. deploy a few > thousand function instances th

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread mdipierro
I have seen this once. I fixed is by limiting the number of requests served by each apache process. migrate=True will lock the app for the time it takes to check whether tables have migrated. For slow traffic it is not an issue but for high traffic it can be. On Jul 21, 1:09 pm, Michael Toomim w

[web2py] Re: generic.load question

2010-07-21 Thread mdipierro
The idea of load is to render the content of the pay without the layout. On Jul 21, 1:57 pm, Rob wrote: > Hi Massimo, > > Yea, setting ajax=True makes it work fine.  I haven't tested trunk > yet. > > Sorry for being dense, but what is the use case for the .load version? > > {{=LOAD(request.contro

[web2py] Re: memcache error

2010-07-21 Thread mdipierro
Please check trunk again. Thanks for your help. On Jul 21, 1:25 pm, Scott wrote: > OK, I got an error, unknown global variable 'app' in > gluon.contrib.memcache.__init__.py.  Here are the proposed code fixes > to memcache.__init__.py which I've tested locally and know to work: > > Add this impo

[web2py] Re: pycloud, cool!

2010-07-21 Thread MikeEllis
I see the list of packages includes urllib, so this might be a useful and easy way to massively stress test a web app, e.g. deploy a few thousand function instances that request a page after a random delay, time the response, and return the delta-t. Assuming of course they let you make requests o

[web2py] Re: rocket performance issues

2010-07-21 Thread MikeEllis
One more detail. As you would hope, it's generally not the case that both browsers stall at the same time. While stalled on either laptop I can keep reloading on the other. On Jul 21, 3:03 pm, MikeEllis wrote: > I tried changing to cron=False in web2py.py.  No impact on problem. > Same two-lapt

[web2py] Re: rocket performance issues

2010-07-21 Thread MikeEllis
I tried changing to cron=False in web2py.py. No impact on problem. Same two-laptop setup as described previous. Happens even on pages that contain very little. Chrome DevTools shows same problem as before: One or more the .js/.css/.png files are delayed by 20 to 25 seconds latency. The proble

Re: [web2py] Re: Error in wsgi/apache

2010-07-21 Thread Thadeus Burgess
For the record, I never really had any issues with web2py filling up my RAM, mostly just crashing while processing a certain number of requests. Even after the ab tests, when looking at RAM usage, it would only spike to maybe 150MB for all apache+mod_wsgi+web2py processes, and then go back down to

[web2py] Re: generic.load question

2010-07-21 Thread Rob
Hi Massimo, Yea, setting ajax=True makes it work fine. I haven't tested trunk yet. Sorry for being dense, but what is the use case for the .load version? {{=LOAD(request.controller,'p_view_list')}} renders the full view. {{=LOAD(request.controller,'p_view_list.load')}} just returns the raw data

[web2py] Re: memcache error

2010-07-21 Thread Scott
OK, I got an error, unknown global variable 'app' in gluon.contrib.memcache.__init__.py. Here are the proposed code fixes to memcache.__init__.py which I've tested locally and know to work: Add this import at the top of the file: from gluon.cache import CacheAbstract In class _MemcacheClient(Cli

[web2py] Re: Error in wsgi/apache

2010-07-21 Thread Michael Toomim
Great! I want to understand it too! Your breakdown helps me think about how to look into this. I will do some more analysis, but for now: - I'm not using forms - I had migrate=True and the app was not compiled earlier. now it's compiled and migrate=False and I have a bigger machine, things

Re: [web2py] Re: rocket performance issues

2010-07-21 Thread Kuba Kucharski
yes, but I am on the GPRS connection now, I am not able to test it so the results be reliable, I will try to do that asap

[web2py] Re: rpxauth

2010-07-21 Thread Yarin
Massimo, can you explain why you are using RPX/Janrain vs a straight- up OpenID implementation? It seems Janrain provides the same set of features OpenID was meant to provide? How do the two relate? I was playing around with w2p-openID (http://w2popenid.appspot.com/ init/default/wiki/main) - Sho

[web2py] Re: rocket performance issues

2010-07-21 Thread mdipierro
Kuba, please try set cron=False in web2py.py. Does it make things better? Massimo On Jul 21, 10:33 am, Kuba Kucharski wrote: > "sometimes, once every few hits, page loads significantly slower > weirdest thing is when you re-click the link it loads instantly, when > you left it working to load on

[web2py] Re: Problems changing table definition

2010-07-21 Thread mdipierro
In these cases you can still do the migrations in web2py but you have to do them in two steps: 1) remove the column 2) run appadmin 3) add the new column 4) run appadmin if you do migrations that involved a change in a column in one step, web2py tries to port the data and that is not always possi

[web2py] Re: Problems changing table definition

2010-07-21 Thread howesc
I agree with massimo about using web2py's migration features where possible. Unfortunately there are some migrations that web2py just cannot do if there is data in the table (at least that was true in postgres a while ago). Such things include making a previous nullable field not nullable, and i

[web2py] Re: Problems changing table definition

2010-07-21 Thread Paul Gerrard
Thanks - I already do nightly backups of data and code (been stung too many times before). I want to use Web2p as you say, but I've had problems in the past. 2-3 times, no matter what I've tried, I couldn't edit the DB.py file and avoid crashes. Ended up deleting tables, massaging data with MS Acc

[web2py] rocket performance issues

2010-07-21 Thread Kuba Kucharski
"sometimes, once every few hits, page loads significantly slower weirdest thing is when you re-click the link it loads instantly, when you left it working to load on itself, it is slow.. like 4 to 8 seconds" some people report more, 20 seconds, 1 minute. Tim, can you reproduce this? Have you trie

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
I propose closing this thread and opening two different threads: Rocket performance issues (Tim/Kuba please open it) uWSGI performance issues (Thadeus please open it) Otherwise this is getting more confused that needs to be. Massimo On Jul 21, 9:44 am, Timbo wrote: > Can you get me a debug l

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
Thank you Thadeus for your help with these tests. I did not see a open_session(request) in your Flask code. Where does Flask save sessions? filesystem or client? If they are saved on the client that is closer to session.forget() in web2py since filling the filesystem with one question file for ev

[web2py] Re: memcache error

2010-07-21 Thread mdipierro
Please try trunk again and let me know. On Jul 21, 9:11 am, Scott wrote: > Massimo, > > That fixed the " > ValueError: invalid literal for int() with base 10: 'NOT_FOUND' " > error for missing sessions.  Thanks! > > The " > AttributeError: '_MemcacheClient' object has no attribute 'storage'" > er

[web2py] is None

2010-07-21 Thread Jonathan Lundell
From time to time we see advice to use 'is' when testing against None in Python. I was reminded of that by this checkin (which I should say I don't think is actually a problem) -self.default = default or update # default value for field +self.default = default==None and update or

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread Vidul Petrov
Thank you Massimo. After your answer I checked the custom auth_table and it turns out that one of the fields is the issue: # wrong Field('age', 'integer', default='') # right Field('age', 'string', default='') # because the validator is: auth_table.age.requires = IS_IN_SET(('',) + tuple(range(16

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Thadeus Burgess
I will make said changes, and add my Flask-DAL extension to the flask app, so at least the database layer will be the exact same. Flask handles sessions too. I shouldn't disable web2py sessions while letting flask use sessions, that would be an unfair test too. The good news is, that even with mi

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Timbo
Can you get me a debug log of the problem as I described earlier? On Jul 21, 8:49 am, Kuba Kucharski wrote: > >> therefore your problem is not the same that some other > >> problems experienced with apache/WSGI. > exactly, > > look at Iceberg, Rahul, MikeEllis in this thread > > I was just pointi

[web2py] Re: memcache error

2010-07-21 Thread Scott
Massimo, That fixed the " ValueError: invalid literal for int() with base 10: 'NOT_FOUND' " error for missing sessions. Thanks! The " AttributeError: '_MemcacheClient' object has no attribute 'storage'" error remains. Maybe the code block and imports from gluon/cache.py need to be added to gluo

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
I agree with your assessment. The problem you, Iceberg, Rahul, and MikeEllis are having with Rocket appears distinct from the problem Thadeus is having uwsgi+cherokee. In my previous email I tried to suggest changes in Thadeus code to isolate the cause of his problem. Going back to your problem.

[web2py] Re: The one video you should watch

2010-07-21 Thread MikeEllis
Massimo, It's either in your environment (eg RF from fluorescent lights or perhaps a wireless phone on the table) or in your audio circuitry. Assuming you're using your MacBook's built-in video cam and mic, what happens if you make a recording in a different room or building? On Jul 21, 12:20 a

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Kuba Kucharski
>> therefore your problem is not the same that some other >> problems experienced with apache/WSGI. exactly, > look at Iceberg, Rahul, MikeEllis in this thread I was just pointing out that I am not the only one seeing "rocket-specific-problem"

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread mdipierro
I just tried this and I cannot reproduce the problem with this model. On Jul 21, 8:26 am, Vidul Petrov wrote: > # the action > def __insert_default_sm(form): >     db.some_table.insert(val1=1, val2=2, created_by=form.vars.id) > > auth.settings.register_onaccept = __insert_default_sm > > def user(

[web2py] Re: CRUD and controllers

2010-07-21 Thread mdipierro
There are two uses of crud. The typical use is this: form=crud.create(db.table) form=crud.update(db.table,record_id) table=crud.select(db.table) form,table=crud.search(db.table) You can also do this def data(): return dict(form=crud()) This exposes everything and it intended mostly as an examp

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Kuba Kucharski
> You said: "I moved to apache/WSGI from Rocket. For me the problem > disappears." therefore your problem is not the same that some other > problems experienced with apache/WSGI. look at Iceberg, Rahul, MikeEllis in this thread >You also said you cache.ram all > requests. Can you try remove the cac

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread Vidul Petrov
# the action def __insert_default_sm(form): db.some_table.insert(val1=1, val2=2, created_by=form.vars.id) auth.settings.register_onaccept = __insert_default_sm def user(): return dict(form=auth()) # the model ... # the other auth settings auth.settings.registration_requires_verification

Re: [web2py] Re: CRUD and controllers

2010-07-21 Thread Running Clam
Hi Massimo, On 21/07/10 13:46, mdipierro wrote: Crud does not determine in which controller it is called. You need to do crud.settings.controller = 'MyController' I may be able to change this behavior anyhow. Aha - I had not realised this. Links in the data returned by "crud.tables()" are

[web2py] Re: plugin_wiki

2010-07-21 Thread mdipierro
> I hope it is another tool and not something that replaces the current model: > view: layout, controller: default.py, etc. .. I read in previous post I > intend to leave as mdipierro plugin, to coexist with existing It will remain a plugin and it will not replace the existing web2py as you know

[web2py] Re: auth.settings.register_onaccept issue

2010-07-21 Thread mdipierro
the error is not in the above code. Can you post the exact model and action? On Jul 21, 8:09 am, Vidul Petrov wrote: > Hi all, > > I am trying to insert default value in "some_table" for new users: > > # init/controllers/default.py > def __insert_default_val(form): >     db.some_table.insert(val1

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
I am not ruling it out. I believe some people are having the problem but not everybody has having this problem. I am trying help isolate the possible causes. You said: "I moved to apache/WSGI from Rocket. For me the problem disappears." therefore your problem is not the same that some other proble

Re: [web2py] Re: plugin_wiki

2010-07-21 Thread Luis Díaz
Greetings, my personal and humble opinion about plugin_wiki: You're on the right track and if it remains as "plugin", I congratulate you in advance! Plugin_wiki I hope to keep growing and allow more people to become part of Community shows I hope it is another tool and not something that re

[web2py] Re: load_action information

2010-07-21 Thread JmiXIII
Sorry I have just find what I wanted: Let's say I have: `` name: load_action action: saisie controller: default ajax: True ``:widget where : def saisie(): return dict(stuff=stuff) saisie.html is : {{extend 'layout.html'}} {{=Selection}} {{=CArt}}{{=ArtOF}}. I just needed to do this in

[web2py] Re: plugin_jqgrid and events

2010-07-21 Thread mdipierro
If you want to be able to click on a record and go somewhere you can do: db.table.id.represent=lambda id: A('edit',_href=URL(r=request,f='edit_record',args=id)) On Jul 21, 7:45 am, Massimiliano wrote: > Massimo, > > thank you for your fast reply. > > unfortunately with setGridParm I get the same

[web2py] auth.settings.register_onaccept issue

2010-07-21 Thread Vidul Petrov
Hi all, I am trying to insert default value in "some_table" for new users: # init/controllers/default.py def __insert_default_val(form): db.some_table.insert(val1=1, val2=2, created_by=form.vars.id) auth.settings.register_onaccept = __insert_default_val but I get the following exception:

[web2py] Re: CRUD and controllers

2010-07-21 Thread mdipierro
I made some change in trunk about this right now you can do crud=Crud(globals(),db,controller='default') and controller has to be the controller that exposes: def download(): ... #necessary def data(): return dict(form=crud()) #optional But you can also use crud in other controllers and r

Re: [web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread Kuba Kucharski
On Wed, Jul 21, 2010 at 1:54 PM, mdipierro wrote: >> On the other hand, Kuba, who started this thread, later said "I moved to >> apache/WSGI from Rocket. For me the problem disappears."  So I guess there >> is a standalone rule #5: Use apache/WSGI etc. instead of the built-in Rocket >> ? > > I

[web2py] Re: CRUD and controllers

2010-07-21 Thread mdipierro
Crud does not determine in which controller it is called. You need to do crud.settings.controller = 'MyController' I may be able to change this behavior anyhow. Massimo On Jul 21, 7:34 am, Running Clam wrote: > Hi, > > I've been trying to get to grips with CRUD after previously doing things >

Re: [web2py] Re: plugin_jqgrid and events

2010-07-21 Thread Massimiliano
Massimo, thank you for your fast reply. unfortunately with setGridParm I get the same behavior. What are your "best practice" to edit a record using jqgrid for selection? Thank you and thank you again for you work. Massimiliano On Wed, Jul 21, 2010 at 1:59 PM, mdipierro wrote: > The jQuery(

[web2py] pycloud, cool!

2010-07-21 Thread mdipierro
http://www.picloud.com/

[web2py] CRUD and controllers

2010-07-21 Thread Running Clam
Hi, I've been trying to get to grips with CRUD after previously doing things mostly manually, but I seem to have fallen at the first hurdle with "crud.tables()". If I call crud.tables() from a function called tables in MyController and just let the generic template render it, I do get the ex

[web2py] Re: memcache error

2010-07-21 Thread mdipierro
I do not remember who wrote that code but I just looked at it and I am bit confused by it. Anyway, I think I have a fix. Please try replace gluon/contribmemcache/ memcache.py with this file: http://web2py.googlecode.com/hg/gluon/contrib/memcache/memcache.py Massimo On Jul 21, 7:27 am, Scott wro

[web2py] Re: memcache error

2010-07-21 Thread Scott
One other thing I've noted is that by setting this, attempting to view /welcome/appadmin/ccache will generate the following ticket: Traceback (most recent call last): File "/home/scott/Projects/web2py/gluon/restricted.py", line 178, in restricted exec ccode in environment File "/home/scott

[web2py] memcache error

2010-07-21 Thread Scott
I'm running Ubuntu 10.04 and installed memcached which works fine locally. I installed the web2py stable 1.84.1 build and the stable wiki plugin from web2py.com. I followed the instructions at: http://web2py.com/book/default/section/11/12 to store the sessions in memcache for the provided Welcome

[web2py] Re: load_action information

2010-07-21 Thread mdipierro
I do not understand the question On Jul 21, 7:00 am, JmiXIII wrote: > Now I've tried this after updating to the last version and after > having seen What is going on with web2py. > `` > name: load_action > action: saisie.load > controller: default > ajax: True > ``:widget > > and it works fine. T

[web2py] Re: load_action information

2010-07-21 Thread JmiXIII
Now I've tried this after updating to the last version and after having seen What is going on with web2py. `` name: load_action action: saisie.load controller: default ajax: True ``:widget and it works fine. Thanks Massimo Now does any body knows if there is a way to keep the initial view saisie.

[web2py] Re: Need help with virtualfields

2010-07-21 Thread mdipierro
They the virtaulfields using the nighty build from here http://www.web2py.com/examples/default/download On Jul 21, 6:37 am, Adi wrote: > http://groups.google.com/group/web2py/browse_thread/thread/c5fc516718... > > Seems represent would work only with SQLFORM and SQLTABLE. > > I got it to work by

[web2py] Re: plugin_jqgrid and events

2010-07-21 Thread mdipierro
The jQuery(...).jqGrid is already called by the plugin. You cannot call it twice. I think you can use jQuery(...).setGridParam({...}) to change grid parameters. On Jul 21, 6:39 am, Massimiliano wrote: > Hi, > > I'm trying to play with cube2py, is amazing. > > I've a little problem with the jqgr

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
> On the other hand, Kuba, who started this thread, later said "I moved to > apache/WSGI from Rocket. For me the problem disappears."  So I guess there is > a standalone rule #5: Use apache/WSGI etc. instead of the built-in Rocket ? I do not think it is a web server issue as much as an issue wit

[web2py] Re: web2py and tomcat on same server possible?

2010-07-21 Thread mdipierro
Why would IIS be disabled when running web2py? There are conflicts only if two servers use the same port. The best setting if you need to run apps that need incompatible servers is to run both on different ports and have one proxy the other. On Jul 21, 6:00 am, Andrew Buchan wrote: > Hi all, > >

[web2py] Re: web2pyslices registration problem

2010-07-21 Thread mdipierro
I am going to move the online book to RPX. Perhaps web2lyslices should do the same. On Jul 21, 5:45 am, "mr.freeze" wrote: > It looks like you've already clicked the link. Have you tried logging > in? > > On Jul 21, 4:25 am, David Marko wrote: > > > I just tried to register athttp://web2pyslices

[web2py] Re: web2py performance issue or rather my fault?

2010-07-21 Thread mdipierro
The issue is that every web app eventually starts dropping requests when the server exceeds its capacity. That capacity depends on the web framework, the details of the app, the ram and speed of the server. It is more likely if the web app an exclusive lock on some file and keeps it locked for some

[web2py] plugin_jqgrid and events

2010-07-21 Thread Massimiliano
Hi, I'm trying to play with cube2py, is amazing. I've a little problem with the jqgrid plugin, problem that didn't appears using jqgrid standalone (declaring the grid in template and using json to retrieve the data). When I try to set an event, for example ondblClickRow, the grid's row disappear

[web2py] Re: Need help with virtualfields

2010-07-21 Thread Adi
http://groups.google.com/group/web2py/browse_thread/thread/c5fc516718573e9/215b12bb0e7e6fa3?lnk=gst&q=represent#215b12bb0e7e6fa3 Seems represent would work only with SQLFORM and SQLTABLE. I got it to work by the explicit call example given in that discussion Thanks! On Jul 21, 4:27 pm, Adi wro

[web2py] Re: Need help with virtualfields

2010-07-21 Thread Adi
whoa! new word "represent". Doesn't work for me (although no error shown) Any documentation of what "represent" does? I added the line to the end of my db.py file and accessed using the same v.created_on field - it shows the database date field. On Jul 21, 3:50 pm, "mr.freeze" wrote: > I wouldn'

[web2py] Re: Customizing auth.login form to specify class or id other than default value

2010-07-21 Thread mr.freeze
You are modifying the field after you display it. This line: {{=logForm.custom.widget.email}} needs to come after you set the attributes. On Jul 21, 2:40 am, Abhinav S wrote: > Okay, I am trying to do the same thing and I employed the method > suggested by Mr.Freeze but I'm still stuck.. > > he

[web2py] web2py and tomcat on same server possible?

2010-07-21 Thread Andrew Buchan
Hi all, We've got someone coming next week to install a tool which requires tomcat, and the plan is to put that on the same (Windows 2003) server where web2py is currently running as a service. I know that IIS should be disabled when running web2py, and was wondering whether there were any similar

[web2py] Re: Need help with virtualfields

2010-07-21 Thread mr.freeze
I wouldn't use a virtualfield for this since you're only interacting with one field. You can use do: db.video.create_on.represent = lambda v: gluon.tools.prettydate(v) On Jul 21, 5:17 am, Adi wrote: > What version of web2py are you on? I am on 1.79.2 - and there's no > local variable situation h

[web2py] Re: web2pyslices registration problem

2010-07-21 Thread mr.freeze
It looks like you've already clicked the link. Have you tried logging in? On Jul 21, 4:25 am, David Marko wrote: > I just tried to register athttp://web2pyslices.com. I have received > verification email with link, But when clicking on link I'm getting > this in browser: '404 NOT FOUND', and regi

  1   2   >