Re: [web2py] Re: Twisted client/server system with web2py as frontend

2011-01-22 Thread Vasile Ermicioi
isn't gevent easier to use? http://groups.google.com/group/gevent/browse_thread/thread/ee4cf5fb088b4fd7?pli=1 http://blog.gevent.org/2009/12/05/more-comet-with-gevent/

[web2py] Re: web2py: So easy, even a zombie can use it

2011-01-22 Thread GoldenTiger
Nice game! joined On 23 ene, 05:58, Anthony wrote: > http://game.scadzombies.org > > Possible new tagline? Worked for GEICO > (http://en.wikipedia.org/wiki/GEICO_Cavemen).  :-)

[web2py] web2py: So easy, even a zombie can use it

2011-01-22 Thread Anthony
http://game.scadzombies.org Possible new tagline? Worked for GEICO ( http://en.wikipedia.org/wiki/GEICO_Cavemen). :-)

Re: [web2py] Re: Shell & controllers & views

2011-01-22 Thread mikech
>From a beginners standpoint, both in Python and web2py, it might be useful to use the shell to see the results from the controllers and views. Wrapping it in some easy to launch form would also be helpful. I've tried using the above code in the shell but with little success. Maybe this would m

[web2py] using plugin_wiki for a blog

2011-01-22 Thread Plumo
http://web2py.com/book/default/chapter/13#plugin_wiki The welcome app plus the plugin_wiki can be thought of as a development environment in itself that is suitable for building simple web applications such as a blog. Is there an example that uses plugin_wiki to make a blog?

[web2py] Re: passing varibales

2011-01-22 Thread Rick
Thanks a lot! It works now. On Jan 23, 4:37 am, Jason Brower wrote: > Ok here is what I see as the problem. > What you are doing is setting variable as 0 every time you start a webpage. > Every time you start a webpage this entire file is look over as if it > was never seen before. Doing so is a

Re: [web2py] Re: Adding restructuredtext support for plugin_wiki or translating to markmin

2011-01-22 Thread Offray Vladimir Luna Cárdenas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, El 22/01/11 19:28, Massimo Di Pierro escribió: > I cannot find that code any longer. Anyway, it is as easy as I thought > because the extensions are critical to make plugin wiki work and > although both markmin and a rest can be extended, there ar

Re: [web2py] Re: passing varibales

2011-01-22 Thread Jason Brower
Ok here is what I see as the problem. What you are doing is setting variable as 0 every time you start a webpage. Every time you start a webpage this entire file is look over as if it was never seen before. Doing so is a great thing but you have to take the approch differently knowing this. For

[web2py] Re: passing varibales

2011-01-22 Thread Rick
Here is some code from the controller file: variable = 0 def index() some operations with the variable... def minorvar(): variable-=1 redirect(URL('index')) I also tried with this code, but the variable isn't changed after

Re: [web2py] Re: passing varibales

2011-01-22 Thread Jason Brower
I would recommend that you use session.variable if that's what you want to do. Could we see the controller for the page before? I wonder if there is a way we could put the action in there to make your code a bit cleaner. BR, JB On 01/23/2011 01:04 AM, Rick wrote: Thanks for the replies. I wro

[web2py] Re: step-by step instructions installing web2py on a CentOS server with cPanel installed

2011-01-22 Thread stargate
I have already python installed on my server and its a dedicated server running cPanel and CentOS. I just need step by step instructions installing web2py on the server On Jan 22, 12:49 am, pbreit wrote: > Do you have ssh access? Perhaps try the Ubuntu setup > script:http://code.google.com/p/web

Re: [web2py] Re: article on django vs web2py

2011-01-22 Thread Albert Abril
Just a joke :) El 23/01/2011 1:20, "Massimo Di Pierro" escribió: I think there is no flame because I did not post it and I did not comment. And I will try stay out of it. Massimo On Jan 22, 5:30 pm, pbreit wrote: > No flamewar yet. I don't think a flame...

[web2py] Re: How to make the src directory appear under web2py?

2011-01-22 Thread JoeCodeswell
Thanks, Anthony. Love and peace, Joe On Jan 22, 3:04 pm, Anthony wrote: > On Saturday, January 22, 2011 5:45:13 PM UTC-5, JoeCodeswell wrote: > > > Dear web2py users, > > > I am trying to use the Wing IDE with web2py. I am following the > > instructions athttp://www.wingware.com/doc/howtos/web2

[web2py] Re: Adding restructuredtext support for plugin_wiki or translating to markmin

2011-01-22 Thread Massimo Di Pierro
I cannot find that code any longer. Anyway, it is as easy as I thought because the extensions are critical to make plugin wiki work and although both markmin and a rest can be extended, there are differences that are difficult to reconcile (think of cross page references). On Jan 22, 8:13 am, Offr

[web2py] Re: article on django vs web2py

2011-01-22 Thread Massimo Di Pierro
I think there is no flame because I did not post it and I did not comment. And I will try stay out of it. Massimo On Jan 22, 5:30 pm, pbreit wrote: > No flamewar yet. I don't think a flamewar will break out since there's no > appearance of promotion (yet) in the article or in comments.

Re: [web2py] Hassle-Free Application Hosting?

2011-01-22 Thread Stef Mientki
On 09-01-2011 18:04, Bruno Rocha wrote: > > > hello Bruno, > do have an easy recipy to setup a web2py site on alwaysdata ? > (deploying is one of the scaring tasks for beginners) > > thanks, > Stef > > > > Its in French -> > http://wiki.alwaysdata.com/wiki/D%C3%A9ployer_une_app

Re: [web2py] Re: article on django vs web2py

2011-01-22 Thread pbreit
No flamewar yet. I don't think a flamewar will break out since there's no appearance of promotion (yet) in the article or in comments.

[web2py] Re: passing varibales

2011-01-22 Thread Rick
Thanks for the replies. I wrote a special def for the operation: def minorvar(): variable-=1 redirect(URL('index')) ...but I get an error that says that: local variable 'variable' referenced before assignment ...even though I've defined the variable as global at the beginning of the

[web2py] Re: How to make the src directory appear under web2py?

2011-01-22 Thread Anthony
On Saturday, January 22, 2011 5:45:13 PM UTC-5, JoeCodeswell wrote: > > Dear web2py users, > > I am trying to use the Wing IDE with web2py. I am following the > instructions at http://www.wingware.com/doc/howtos/web2py which say in > part: > -to debug web2py code, you need the web2py sources

[web2py] Re: Internal error Ticket issued: unrecoverable

2011-01-22 Thread Massimo Di Pierro
Run it once without GAE launcher. The problem is that it is failing to create missing folders. This may be a due to a permission issue or to gaelauncher blocking write access to file system. On Jan 22, 3:29 pm, devGS wrote: > I'm getting "Internal error Ticket issued: unrecoverable" after running

[web2py] How to make the src directory appear under web2py?

2011-01-22 Thread JoeCodeswell
Dear web2py users, I am trying to use the Wing IDE with web2py. I am following the instructions at http://www.wingware.com/doc/howtos/web2py which say in part: -to debug web2py code, you need the web2py sources. Download and unpack these... -add the following path under Python Path: /path/

[web2py] Re: Some Database Tables Not Created

2011-01-22 Thread Anthony
As others have mentioned, you should have 'db' set in only one place, not in each model file (assuming it's supposed to represent the same database connection). If you actually want to connect to two separate databases (or even have two separate connections to the same database), then use differ

[web2py] Re: Middleware code

2011-01-22 Thread Anthony
On Saturday, January 22, 2011 4:38:35 PM UTC-5, walter wrote: > > It is the web2py/site-packages. OK! Many thanks. See http://web2py.com/book/default/chapter/04#Third-Party-Modules. Depending on your needs, you can import Python modules from 'site-packages' or put the code in your application

[web2py] Re: Middleware code

2011-01-22 Thread walter
It is the web2py/site-packages. OK! Many thanks.

[web2py] Re: Truncated Data on Migration

2011-01-22 Thread Jonathan Z.
Thanks for checking it out. In the mean time, I'm working around the problem by overriding maxcharlength right after setting db, like this: db = DAL(...) db._adapter.maxcharlength = 65535 Now I just need to restore a bunch of truncated data :-( On Jan 22, 1:06 pm, Massimo Di Pierro wrot

[web2py] Re: Middleware code

2011-01-22 Thread walter
In the model? Really? It's curiously enough. I have thought I should to create file with my code and place it in a certain, according to the specification, place.

[web2py] Re: Some Database Tables Not Created

2011-01-22 Thread cjrh
On Jan 22, 8:13 pm, dominatus wrote: > Workout.py heading: > > # coding: utf8 > db = DAL('sqlite://storage.sqlite') try: db except NameError: db = DAL('sqlite://storage.sqlite') > Messaging.py heading: > > # coding: utf8 > db = DAL('sqlite://storage.sqlite') try: db except NameErro

[web2py] Re: driver string regex issues

2011-01-22 Thread Loren McGinnis
Thanks for the tip! Worked great, except I used decode_credentials=True as the last argument. This was in version 1.91.6. On Jan 21, 5:30 pm, Massimo Di Pierro wrote: > The proper way to handle this is the following: > > from urllib import quote, unquote > > db = DAL('mssql://%s:%s@hostname:pas

[web2py] Re: Middleware code

2011-01-22 Thread cjrh
On Jan 22, 1:06 pm, walter wrote: > Where can I placed my middleware code that is common for the different > controllers and would used by them? If the code is short (and fast-running), the model file is fine (db.py), but if the code is longer, put it in the web2py/site-packages folder and import

[web2py] Re: Truncated Data on Migration

2011-01-22 Thread Massimo Di Pierro
I agree that is the problem: Field("description", "string", length=2048), according to: http://dev.mysql.com/doc/refman/5.0/en/char.html "Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and la

[web2py] Re: What am I doing wrong

2011-01-22 Thread cjrh
On Jan 21, 11:32 pm, Kenneth Lundström wrote: > This returns -5.68434188608e-14 not 0 as you would expect, or? >>> 0.1 0.10001 >>> 1/10, and many other values, are not precisely representable in 64-bit floating point. Worse, adding or subtracting two floating-point numbers of very

[web2py] Re: Truncated Data on Migration

2011-01-22 Thread Jonathan Z.
It's probably also important to note that the "before" table existed since 1.85.x. I keep the "migrate=False" flag set on it, until I make a change. As I noted previously, the change happened on 1.91.6. So the issue is data loss affected by changes in the web2py DAL. I've been digging around, a

Re: [web2py] Re: Twisted client/server system with web2py as frontend

2011-01-22 Thread Jason Brower
I just wrote an email on my twisted server setup. It was very nice as I have one definition I created that was called when ever I needed to send a message. Very easy code on both ends. I will look at tornado adn this anyserver.py sshhhtuff soon. :) BR, Jason On 01/22/2011 10:24 PM, Massimo Di

Re: [web2py] Twisted client/server system with web2py as frontend

2011-01-22 Thread Jason Brower
Yup I do it. I built a twisted server that handled real time interactivity and logic of my robot. I used amp protocal and build my messages there. Then I made web2py send request with a small function. As a hint, there is ampy which is python amp protocal without twisted. I used that to send

[web2py] Re: Twisted client/server system with web2py as frontend

2011-01-22 Thread Massimo Di Pierro
If you just want to run web2py with twisted as web server, look into web2py/anyserver.py. There is already a handler for that. If you are looking at using twisted to handle asynchronous calls, I guess it can be done as with tornado in web2py/gluon/contrib/ comet_messaging.py Any higher level of int

Re: [web2py] Re: passing varibales

2011-01-22 Thread Jason Brower
Yup... I think you should do that in the controller before you pass it. It's a two second job so not hard to do. That and session.variable=-1 is well... -1 it should be variable-=1. On the other had, you may be going for -1 :P and you may be using a special loop or something that needs to change

[web2py] Re: Middleware code

2011-01-22 Thread Arun K.Rajeevan
in a model file

[web2py] Re: Twisted client/server system with web2py as frontend

2011-01-22 Thread Peter L
Thanks for the answer Massimo. I will look at it as Twisted supports websockets. I guess you know about the Twisted framework. Would it be possible to integrate it into web2py or does this not make sence at all? It was the thread about long running processes which made me think that using Twisted

[web2py] Re: Some Database Tables Not Created

2011-01-22 Thread Massimo Di Pierro
You cannot have db=... in one more and another db=... in another model because they are executed in the same environment. By defining the second you lose the reference to the first connection and it does not get committed. On Jan 22, 12:13 pm, dominatus wrote: > Only one of my model files, workou

[web2py] Re: Apache, Wsgi problem

2011-01-22 Thread Massimo Di Pierro
Not yet. I do not have the problem on my production server. I need to setup a new VM to test this. Hopefully tomorrow. Massmimo On Jan 22, 1:13 pm, VP wrote: > Massimo: > Have you gotten a chance to look into this issue (related to > scalability)? > > Thanks.

[web2py] Re: Truncated Data on Migration

2011-01-22 Thread Jonathan Z.
Massimo, Here is an example of one of the tables that got a truncated field: before... db.define_table("thing", Field("user_id", db.auth_user, notnull=True, readable=False, writable=False), Field("title", "string", length=128, notnull=True, unique=True, required=True), Field("slug",

[web2py] Re: Apache, Wsgi problem

2011-01-22 Thread VP
Massimo: Have you gotten a chance to look into this issue (related to scalability)? Thanks.

[web2py] Re: Truncated Data on Migration

2011-01-22 Thread Massimo Di Pierro
Can you tell us what the model was before and after migration? Massimo On Jan 22, 10:02 am, "Jonathan Z." wrote: > I have a number of fields specifying a length > 255 (some as large as > 2K).  On a recent schema migrate, web2py truncated all of these fields > to 255, resulting in substantial dat

Re: [web2py] Some Database Tables Not Created

2011-01-22 Thread Kenneth Lundström
To me it sounds like your are recreating the db variable with every .py file. You should have only one db = row no matter how many files you have. And it should be in the first model that is read. An easy way of knowing in what order files are read is to name them 0_something.py 1_something_el

[web2py] Some Database Tables Not Created

2011-01-22 Thread dominatus
Only one of my model files, workout.py, has tables which are being created. All other models, including db.py, are not created. I have been trying to figure this out for the past two days, I do not know why they are not working now, as they were working before. Workout.py has the same format/imp

Re: [web2py] wolfram alpha api

2011-01-22 Thread Vasile Ermicioi
great product, it can be used in many ways e.g. http://www.wolframalpha.com/input/?i=7+day+weather+forecast

[web2py] Truncated Data on Migration

2011-01-22 Thread Jonathan Z.
I have a number of fields specifying a length > 255 (some as large as 2K). On a recent schema migrate, web2py truncated all of these fields to 255, resulting in substantial data loss. My database is mysql. I'm on version 1.91.6 of web2py. I'm pretty sure this has something to do with the new DA

[web2py] wolfram alpha api

2011-01-22 Thread Massimo Di Pierro
http://blog.programmableweb.com/2011/01/21/wolfram-alpha-api-now-free-and-open-to-all/

Re: [web2py] Re: Adding restructuredtext support for plugin_wiki or translating to markmin

2011-01-22 Thread Offray Vladimir Luna Cárdenas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, El 21/01/11 12:54, Massimo Di Pierro escribió: > Actually, yes, there is an easy way but I am not home and I do not > have immediate access to my files. Will post a solution asap. > > On Jan 21, 10:46 am, mart wrote: >> As I recently learned...

[web2py] Re: passing varibales

2011-01-22 Thread b0j3
On 22 jan., 11:47, Rick wrote: > Hi, > My problem is that I want to make a {{=A...}} tag that also changes > the value of the variable session.variable, and I don't know how to do > this. I tried with: > {{=A(("[ < ]"), session.variable=-1,  _href=URL('function'))}} > ...but it didn't work. Hi.

Re: [web2py] Re: article on django vs web2py

2011-01-22 Thread Albert Abril
Did you say Reddit? Flamewar in 3,2,1 :P On Sat, Jan 22, 2011 at 7:24 AM, pbreit wrote: > Better me than Massimo! :-)

[web2py] Middleware code

2011-01-22 Thread walter
Where can I placed my middleware code that is common for the different controllers and would used by them?

[web2py] passing varibales

2011-01-22 Thread Rick
Hi, My problem is that I want to make a {{=A...}} tag that also changes the value of the variable session.variable, and I don't know how to do this. I tried with: {{=A(("[ < ]"), session.variable=-1, _href=URL('function'))}} ...but it didn't work.

[web2py] Re: Question about DAL

2011-01-22 Thread LightOfMooN
No, it generates one row by each thumbnail, like: [{'rolic': {'id':1, 'name':'name1'}, thumbnails: [{'id':1, image:'...'}]}, {'rolic': {'id':1, 'name':'name1'}, thumbnails: [{'id':2, image:'...'}]} So, I think, this problem impossible to solve by SQL. Just by Python. Thx On 22 янв, 09:16, Ma