[web2py] Re: How to get request

2011-02-05 Thread walter
Where can I find a description of the framework, or UML diagrams? I'm not quite clear about its architecture. On 5 фев, 03:25, Jonathan Lundell wrote: > On Feb 4, 2011, at 2:28 PM, walter wrote: > > > > > I define a decorator into the modules folder and try get request.args. > > How to do correct

Re: [web2py] drop support for python 2.4?

2011-02-05 Thread Jason Brower
Similar with me as well. Dreamhost comes with 2.4 and 2.5 is what I installed to work with my existing code. BR, Jason Brower On 02/05/2011 08:15 AM, Martin Weissenboeck wrote: Me too. Martin 2011/2/5 Kenneth Lundström > I´m using CentOS on all my s

Re: [web2py] drop support for python 2.4?

2011-02-05 Thread Martín Mulone
People this is important, please review your hosting. If the decision is made, you are not going to upgrade web2py in the future. There are good reasons on why dropping support of 2.4, in favor of better code and features. I think the python 2.4 is too old. Appengine has python 2.5 already. Make y

Re: [web2py] Re: How to get request

2011-02-05 Thread Martín Mulone
Like jonathan said if you want args in module you have to pass it. === controller/default.py === def index(): name = request.args[0] mymodule = local_import("mymodule") myclass = mymodule.MyClass(name) = modules/mymodule.py ===

Re: [web2py] web2py working on my iPad! :vD

2011-02-05 Thread Martín Mulone
Great. Have to jailbreak to install python? omg, this why I hate apple things. 2011/2/5 kgingeri > I have renewed interest in using web2py for simple Google gadgets and > CRUD updates to a web database, and in exploring it, wondered if I > could load and use it on my iPad. Well, sure enough, I

Re: [web2py] drop support for python 2.4?

2011-02-05 Thread Vasile Ermicioi
never used python2.4

[web2py] Taking a look at angularjs

2011-02-05 Thread Luther Goh Lu Feng
I am trying to use web2py to build a SPA http://en.wikipedia.org/wiki/Single-page_application Along the way, I discovered angularjs http://angularjs.org/ I thought that it has some really forward thinking that web2py developers should take a look to see if there is any good ideas to learn from or

Re: [web2py] drop support for python 2.4?

2011-02-05 Thread Marin Pranjic
+1 for dropping support If shared hosting providers want web2py users, they will enable python >=2.5. There are many cheap VPS hosting services with root access. There is also web2pyslices.com with some easy setup scripts. If dropping support leads to code improvement and faster/easier developme

[web2py] Nice Error Screens

2011-02-05 Thread Tito Garrido
Hi Folks, Is there a way to configure the error ticket screen to have a good looking? Today it just appears a white screen with the ticket number and a link... also, can I change the "invalid function" screen? Thanks, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . .

[web2py] Re: IS_NOT_IN_DB failing to create a dropdown?

2011-02-05 Thread DenesL
The default widget for a field with an IS_NOT_IN_DB requires is a text box. Your interpretation of how it should work is just one of possibly many. Think of it this way, the values in the db are a definite set, so you can create a list to choose one or many among them; the values that are not part

[web2py] Re: How do I explicitly close a database connection?

2011-02-05 Thread Massimo Di Pierro
I assumed he was planning to use db...close() outside web2py in some python script. In the web2py context you should not close the db. Not because you lose auth_user since the connection will be reopened at the next request, but because of speed issues (the connection has to be re- established) an

[web2py] Re: pending issues?

2011-02-05 Thread dlypka
More issues 1. # dlypka Mod in dal.py: had to move this try .. except up here in front of class NoSQLAdapter because gae is needed in class NoSQLAdapter try: from new import classobj from google.appengine.ext import db as gae from google.appengine.api import namespace_manager # from

[web2py] Re: web2py working on my iPad! :vD

2011-02-05 Thread Kgingeri
Yeah, afraid so Martin. Just another update. If you use SSH Term Pro, instead of pTerm, SSH Term Pro does support multitasking so you can start web2py and return to another iPad browser and call up the web interface just fine. If you turn off the iPad, you loose the ssh session. Karl On Feb 5

[web2py] Re: web2py working on my iPad! :vD

2011-02-05 Thread Massimo Di Pierro
Sorry. I could not resist: http://groups.google.com/group/web2py/browse_thread/thread/c0bb9c4f1b2353cd# On Feb 5, 10:25 am, Kgingeri wrote: > Yeah, afraid so Martin. > > Just another update.  If you use SSH Term Pro, instead of pTerm, SSH > Term Pro does support multitasking so you can start web

[web2py] Re: web2py working on my iPad! :vD

2011-02-05 Thread Noah McIlraith
Wow, all that for something that can't even run in the background? It was easier installing Debian on Android to achieve the same thing (sans the cant-work-in-background-mode).

[web2py] Re: web2py working on my iPad! :vD

2011-02-05 Thread Massimo Di Pierro
Wong link... Sorry I could not resist: http://www.reddit.com/r/Python/comments/ffu1x/hey_apparently_web2py_runs_on_ipad/ On Feb 5, 10:25 am, Kgingeri wrote: > Yeah, afraid so Martin. > > Just another update.  If you use SSH Term Pro, instead of pTerm, SSH > Term Pro does support multitasking so

[web2py] Re: drop support for python 2.4?

2011-02-05 Thread cjrh
On Feb 4, 10:37 pm, Massimo Di Pierro wrote: > Who strongly opposes? Make your case. I use shared hosts, but I always choose a host that allows SSH access. Then, I build my own Python (usually 2.6) in ~/local/bin (I follow the HostMonster guide at web2pyslices) so the fact that 2.4 is usually pr

[web2py] Re: web2py working on my iPad! :vD

2011-02-05 Thread Kgingeri
Actually it does! I created a script... #!/bin/sh # start--- web2py startup for background # web2py/web2py.py wrote: > Wow, all that for something that can't even run in the background? It was > easier installing Debian on Android to achieve the same thing (sans the > cant-work-in-ba

[web2py] MongoDB and Web2Py: global variables / session problem

2011-02-05 Thread marcovic
Hi guys, I'm trying to build a simple web app where you can upload a file into MongoDB (using GridFS) and then get the file with one-click. This is my model: Model: mongo.py --- from pymongo import Connection from gridfs import GridFS class MongoInterface: """Initialize MongoDB

[web2py] Re: GAE Query

2011-02-05 Thread bee
I think I understand that. I have GAE on my primary domain, I have one sub domain with a very basic site that I was referring all traffic to before I was ready to deploy my web2py app. app.yaml is set to ignore all applications except my website app. routes.py is set to have my website app as the d

[web2py] Re: Form to Email

2011-02-05 Thread bee
Thank you I will give that a try! On Feb 4, 4:29 pm, Alexandre Andrade wrote: > a sample (in portuguese, just change the name or fields): > > in controller: > > def fale_conosco(): >     form = SQLFORM.factory( >         Field('nome', requires=IS_NOT_EMPTY(error_message='Preencha o seu > nome')),

[web2py] Re: Form to Email

2011-02-05 Thread pbreit
Make sure to config your mail settings in db.py. Gmail is easiest. mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = 'y...@gmail.com' # your email mail.settings.login = 'y...@gmail.com:password' # your credentials or None

[web2py] Re: How do I explicitly close a database connection?

2011-02-05 Thread mart
makes sense, thanks :) On Feb 5, 11:16 am, Massimo Di Pierro wrote: > I assumed he was planning to use db...close() outside web2py in some > python script. > > In the web2py context you should not close the db. Not because you > lose auth_user since the connection will be reopened at the next > r

[web2py] Re: IS_NOT_IN_DB failing to create a dropdown?

2011-02-05 Thread SethKinast
Thank you for the clarification. Previous messages on the list seemed to imply that IS_NOT_IN_DB would also be represented as a dropdown, but glad to know I made the correct choice in the end. Cheers! On Feb 5, 9:43 am, DenesL wrote: > The default widget for a field with an IS_NOT_IN_DB requires

[web2py] Autocomplete Widget - contains() instead of startswith()

2011-02-05 Thread Unyo
Hi, The autocomplete widget currently searches for fields starting with whatever the user puts in. Is there any way to change this behavior to be like contains() rather then startswith()? A section of my db.py is below: db.define_table('building', Field('name'), format='%(name)s') db.define_

[web2py] Re: Autocomplete Widget - contains() instead of startswith()

2011-02-05 Thread Massimo Di Pierro
In gluon/sqlhtml.py there is the autocomplete widget. Copy it somewhere with another name and replace def callback(self): if self.keyword in self.request.vars: field = self.fields[0] rows = self.db(field.like(self.request.vars[self.keyword] +'%'))\ .

[web2py] GAE timeout when wsgihandler.py is missing

2011-02-05 Thread Charles Law
I am uploading an app to GAE. Through some experimentation I've found that if I don't include wsgihandler.py, the app loads very slowly. It feels like it's looking for this file and them timing out. Besides the slow loading, everything works perfectly without wsgihandler.py, so I want to know if th

Re: [web2py] Re: IS_MATCH() changing a valid value ?

2011-02-05 Thread Jonathan Lundell
On Feb 4, 2011, at 6:17 PM, Ken wrote: > > That change would have prevented my problem. However, would it > guaranty that the returned (accepted) match.group() value would never > differ from the input value? I am worried about more complex queries > now. I still think that if IS_MATCH() finds tha

[web2py] Re: GAE timeout when wsgihandler.py is missing

2011-02-05 Thread Massimo Di Pierro
This is very odd. The file wsgihandler.py is never called is you start web2py with gaehandler.py (what is normal behavior on GAE). massimo On Feb 5, 5:12 pm, Charles Law wrote: > I am uploading an app to GAE. Through some experimentation I've found > that if I don't include wsgihandler.py, the a

[web2py] Re: pending issues? This bug is significant for gae

2011-02-05 Thread dlypka
5. In dal.py: class NoSQLAdapter(BaseAdapter): def represent(self, obj, fieldtype): if type(obj) in (types.LambdaType, types.FunctionType): obj = obj() if isinstance(fieldtype, SQLCustomType): return fieldtype.encoder(obj) if isinstance(obj, (Ex

[web2py] Re: pending issues?

2011-02-05 Thread dlypka
6. in dal.py class Table around line 5900: def _drop(self, mode = ''): return self._db._adapter._drop(self, mode) def drop(self, mode = ''): return self._db._adapter._drop(self, mode) # dlypka patch. was: self._db._adapter.drop(self,mode) On Feb 5, 10:36 pm, dlypka wrot

[web2py] Getting started

2011-02-05 Thread stargate
i was wondering if there a step by step tutorial that will show me how to build a web2py website. Coming from php I am use to using includes how would I get started.

[web2py] Re: Getting started

2011-02-05 Thread Anthony
On Saturday, February 5, 2011 11:05:46 PM UTC-5, stargate wrote: > > i was wondering if there a step by step tutorial that will show me how > to build a web2py website. Coming from php I am use to using includes > how would I get started. What have you looked at so far? Have you tried the bo

[web2py] Re: Getting started

2011-02-05 Thread Anthony
On Saturday, February 5, 2011 11:16:35 PM UTC-5, Anthony wrote: > > On Saturday, February 5, 2011 11:05:46 PM UTC-5, stargate wrote: >> >> i was wondering if there a step by step tutorial that will show me how >> to build a web2py website. Coming from php I am use to using includes >> how woul

Re: [web2py] Re: Getting started

2011-02-05 Thread Panupat
if you also need to learn basic python, Dive into Python is a very good free book. http://diveintopython.org/ make sure you read the right version. web2py works on python 2.7 On Saturday, February 5, 2011 11:16:35 PM UTC-5, Anthony wrote: On Saturday, February 5, 2011 11:05:46 PM UTC-5, s

[web2py] Re: pymysql gives Broken Pipe

2011-02-05 Thread Massimo Di Pierro
Here is a proposed solution in trunk import mysqldb from gluon.dal import MySQLAdapter MySQLAdapter.adapter=mysqldb before calling db=DAL('mysql://...')

[web2py] Re: pending issues?

2011-02-05 Thread Massimo Di Pierro
This will take some time but it is on my todo lists. I opened a google- code ticket about it. On Feb 2, 11:57 pm, VP wrote: > Well, one possible issue is the "premature end of wsgi script" thing. > > It'd be nice if that issue gets resolved.   I think it goes way back.

[web2py] Re: pending issues?

2011-02-05 Thread Massimo Di Pierro
This should already be in stable. Just edit admin/models/0.py I am sure it can be improved. Please send feedback. On Feb 3, 10:03 am, VP wrote: > Another possible feature I hope to see in this or upcoming releases is > an official support for the admin app to have different users > (different use

[web2py] Re: pending issues?

2011-02-05 Thread Massimo Di Pierro
Can you please send me all the changes as a patch file to the latest dal.py? I am lost because of google groups breaks indentation. On Feb 5, 9:40 pm, dlypka wrote: > 6. in dal.py class Table around line 5900: > >     def _drop(self, mode = ''): >         return self._db._adapter._drop(self, mode

[web2py] any published book?

2011-02-05 Thread Panupat
Are there any web2py published books besides the free official online book?

[web2py] Re: any published book?

2011-02-05 Thread Massimo Di Pierro
No. We have a contract with packt and new one may come after summer.Some of us are (should be) working on it. On Feb 5, 11:47 pm, Panupat wrote: > Are there any web2py published books besides the free official online book?

[web2py] Re: is this possible with computed

2011-02-05 Thread Massimo Di Pierro
Long ago I made a widget for that. It got lost. If I cannot find it will re-write it. On Feb 4, 11:47 am, Richard Vézina wrote: > Hello Dear web2py users, > > I would like to achieve this. > > I have a referenced field 1 to many > > The referenced table is mostly for storing the dropdown option.

[web2py] Re: IS_MATCH() changing a valid value ?

2011-02-05 Thread Massimo Di Pierro
In trunk IS_MATCH(...,strict=True) # true is default now and it does append the '$' is missing. On Feb 4, 8:17 pm, Ken wrote: > That change would have prevented my problem. However, would it > guaranty that the returned (accepted) match.group() value would never > differ from the input value? I

[web2py] Rocket with urllib2 behavior [BUG?]

2011-02-05 Thread vihang
Hi, Code: import urllib2 url = 'http://127.0.0.1/server/default/index' response = urllib2.urlopen(url) Here 127.0.0.1 is the same web2py from which this code is being called. On doing so, the web2py hangs. I debugged the issue to Rocket, where it does not allocate a new thread to reques

[web2py] Re: web2py working on my iPad! :vD

2011-02-05 Thread Christopher Steel
lol! On Feb 5, 11:48 am, Massimo Di Pierro wrote: > Wong link... > > Sorry I could not resist: > > http://www.reddit.com/r/Python/comments/ffu1x/hey_apparently_web2py_r... > > On Feb 5, 10:25 am, Kgingeri wrote: > > > Yeah, afraid so Martin. > > > Just another update.  If you use SSH Term Pro, i