[web2py] Detecting test vs. production environments

2011-02-01 Thread Dane
Hello, what's the best property to use on 'request' for determining what environment the app is running in? I've tried request.env.remote_addr but it doesn't appear to be a reliable way to distinguish. Currently I'm just using sys.platform since I'm developing on windows and my server is linux--ob

[web2py] Re: web2py exec in the new again

2011-02-01 Thread cjrh
On Feb 1, 10:16 pm, Massimo Di Pierro wrote: > From the usual source: > http://lucumr.pocoo.org/2011/2/1/exec-in-python/ His post is pretty good and informative. > What would really be useful to us is an example of how to overcome > that problem by showing how to break those implicit self refere

[web2py] execfile

2011-02-01 Thread desfrenes
hey ! How about that ? http://lucumr.pocoo.org/2011/2/1/exec-in-python/ Is there any real threat for web2py or is it just expert whining ? I don't really care about theory and things being pythonic or not, as long as it's efficient. So, any situation where this can really be a problem ? See you.

[web2py] Re: Can any help me with new dal in trunk?

2011-02-01 Thread Fran
This is now fixed in Trunk - thanks Massimo :) F

[web2py] Re: Kudos for web2py!

2011-02-01 Thread Rahul
Hi All, Indeed this is the best web framework out there. I started with Django and web2py simultaneously. Stopped working with Django midway (as things went more complicated) and went ahead with web2py, the results were simply astonishing. I could complete a full desktop project with more features

[web2py] Support for Drizzle in web2py

2011-02-01 Thread Rahul
Hi All, http://drizzle.org/Home.html Not really sure if web2py should support Drizzle (opensource MYSQL forked Database). Will pymysql work with Drizzle? What do you think? Also is MySQL free for professional development now? or we need to pay a fee. Oracle - MySQL site does show us l

Re: [web2py] Creating subdomain on user registration

2011-02-01 Thread Jonathan Lundell
On Feb 1, 2011, at 9:23 PM, Kenneth Lundström wrote: > > >> Also user1 must be able to point user1.mydomain.com to his own domain ( > >> custom domain feature) for the application interface. How can I achieve > >> this? > >> I'm not sure what you mean by that. > > I understod it like that a us

Re: [web2py] Creating subdomain on user registration

2011-02-01 Thread Kenneth Lundström
>> Also user1 must be able to point user1.mydomain.com to his own domain ( custom domain feature) for the application interface. How can I achieve this? I'm not sure what you mean by that. I understod it like that a user should have the ability to in settings add a custom domain (myowndoma

Re: [web2py] Re: migration from 1.88.2 to 1.91.6 problem

2011-02-01 Thread Marin Pranjic
### this happens because FROM has no knowledge of writable ### and thinks that a missing boolean field is a None if self.table[fieldname].type == 'boolean' and self.vars[fieldname]==None: del self.vars[fieldname] these are in red

Re: [web2py] Creating subdomain on user registration

2011-02-01 Thread Jonathan Lundell
On Feb 1, 2011, at 8:50 PM, Prashanth wrote: > > Im new to web2py .. I'm building an application which requires to > create subdomain which will be the username.. (like wordpress.com) . > So for example.. user1.mydomain.com will be user1's area in my > website. > > I have set the cname records f

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-02-01 Thread Massimo Di Pierro
The wizard convention is the following: - table and field names are lower case - table names have a t_ prefix - field names have a f_ prefix - reference fields have the same name as the table being referenced (but with f_, not t_) you can then use shortcuts: Person = db.define_table('t_person',F

[web2py] Creating subdomain on user registration

2011-02-01 Thread Prashanth
Im new to web2py .. I'm building an application which requires to create subdomain which will be the username.. (like wordpress.com) . So for example.. user1.mydomain.com will be user1's area in my website. I have set the cname records for *.mydomain.com to point mydomain.com Now my question is

[web2py] Re: web2py is running on dotCloud

2011-02-01 Thread Anthony
Cool. Thanks for putting up that demo. Everyone, the DotCloud CEO recently offered folks on this list beta invites: https://groups.google.com/d/msg/web2py/eRARkDuYGn4/VJ9twwOA3-cJ They also recently added a web2py setup tutorial to their documentation: http://docs.dotcloud.com/static/tutorial

Re: [web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-02-01 Thread Martin Barnard
I'd be cautious about some of those field names. I'm not about to look them up, but they look suspiciously like they may collide with reserved words. I'm looking particularly hard at 'type' and 'text'. You may want to check that. Martin. I don't mind typing the extra characters now that work boug

[web2py] Re: adding tables instead of merging?

2011-02-01 Thread mart
Hi Villas - you know it is quite possible i overlooked the obvious ;) Ok, yeah had to check what I had asked back then. Yup, that was great! and it still works great, no doubt about that. the thing is in this case, we can create tables alright (even recreate them if need be, or import them). T

[web2py] Re: jQuery 1.5 released

2011-02-01 Thread Massimo Di Pierro
Usually there is a 1.X.1 a few days after...;-) On Feb 1, 10:04 pm, ron_m wrote: > I took the min version and renamed it the same name as the 1.4.4 file in > 1.91.6 and tested both the welcome app and the video system controller I am > writing. No noticeable differences that I could see. I also u

Re: [web2py] Re: Kudos for web2py!

2011-02-01 Thread Marco Mansilla
Agree on that, i used to work with django and turbogears (both versions 1.5 and 2), last year a knew about web2py, and met Massimo on October, since then i have improved my work a lot!, hopefully in a short time i would be able to contribute with some apps and plugins. Thanks Massimo! > Ok a link

Re: [web2py] jQuery 1.5 released

2011-02-01 Thread ron_m
I took the min version and renamed it the same name as the 1.4.4 file in 1.91.6 and tested both the welcome app and the video system controller I am writing. No noticeable differences that I could see. I also use jQueryUI but am back at 1.8.6, current is 1.8.9 and did not see anything broken. I

[web2py] web2py is running on dotCloud

2011-02-01 Thread Bruno Rocha
Take it a look: http://www.web2py.dotcloud.com/welcome/default/index definitely the 'heroku' for web2py So easy $dotcloud deploy -t python myweb2pyapp.www $ln -s wsgihandler.py wsgi.py $cd path/to/my/web2py $dotcloud push myweb2pyapp.www $... rsync

Re: [web2py] jQuery 1.5 released

2011-02-01 Thread Bruno Rocha
Nice! Lets test it with web2py welcome app. 2011/2/2 ron_m > I was poking around and found jQuery 1.5 is released. They substantially > improved the ajax portion of the library as well as big performance > improvements when finding sibling DOM objects .prev(), .next(). Just thought > I would

[web2py] jQuery 1.5 released

2011-02-01 Thread ron_m
I was poking around and found jQuery 1.5 is released. They substantially improved the ajax portion of the library as well as big performance improvements when finding sibling DOM objects .prev(), .next(). Just thought I would mention it since web2py embeds jQuery.

[web2py] Re: Returning the Row after insert;

2011-02-01 Thread KMax
Actualy do the same action, but select allow to choose columns On 1 фев, 05:36, Vasile Ermicioi wrote: > db(db.auth_user.id=id).select() will give you a list of rows (of one element > :) ) > > easier is > > row = db.auth_user[form.vars.id]

[web2py] Re: Kudos for web2py!

2011-02-01 Thread Massimo Di Pierro
Thanks Mikech. I think we removed "written by ..." from the web site because so many people have contributed that my job is more that of fixing bugs and rejecting backward incompatible patches. ;-) Massimo On Feb 1, 6:41 pm, mikech wrote: > This was unexpected!  I was reading thru a blog post on

[web2py] Re: web2py exec in the new again

2011-02-01 Thread Massimo Di Pierro
There is no problem if they have no __del__ method. On Feb 1, 5:24 pm, Jonathan Lundell wrote: > On Feb 1, 2011, at 12:16 PM, Massimo Di Pierro wrote: > > > > > I agree with Armin that in the case of exec (and web2py uses exec), > > the self references are created whether you want them or not. T

[web2py] Re: web2py exec in the new again

2011-02-01 Thread Massimo Di Pierro
Not quite like that. It is more like (web2py specific): "Do not declare classes with a __del__ method in web2py models or controllers or instances of those classes will cause memory leaks" AND (for any python program) "Do not declare classes with a __del__ method in any Python program unless you

[web2py] Re: web2py exec in the new again

2011-02-01 Thread Massimo Di Pierro
You are correct. There ar no problems using trunk (and future web2py versions) if classes have no __del__ method. On Feb 1, 5:00 pm, Anthony wrote: > On Tuesday, February 1, 2011 3:16:12 PM UTC-5, Massimo Di Pierro wrote: > > In web2py you cannot store instances of objects into session. While > >

[web2py] Re: adding tables instead of merging?

2011-02-01 Thread villas
Hi Mart, I thought you'd already solved that one in a previous thread named 'tables created dynamically'? I am just reminding you of the thread in case you'd overlooked that interesting answer by Massimo. Sorry if that hasn't helped, I do not know of any better answer. Best regards, David On Feb

[web2py] Re: Kudos for web2py!

2011-02-01 Thread mikech
Ok a link would be useful: http://smalltalkzen.wordpress.com/2011/02/01/a-secret-passion-and-your-choice-of-web-framework/

[web2py] Kudos for web2py!

2011-02-01 Thread mikech
This was unexpected! I was reading thru a blog post on how wonderful Seaside - a Smalltalk web framework was, and lo and behold the author says about half way down: = Now it’s time for a confession: the fastest-to-develop in, most prototype-friendly framework that I’ve had the pleasure to

[web2py] Re: adding tables instead of merging?

2011-02-01 Thread mart
interesting.. so may turn being a lack of planning on my part... I can assue the SQLite fall in the group of those no being able to see tables outside its own area... So, given this problem (the need to collect the generated tables who share the same names), would you have any suggestion? BTW, I a

[web2py] Re: Can't deal with MemcachedKeyLengthError in caching selects

2011-02-01 Thread kenji4569
Thanks! That's the right way. It worked. On 2月1日, 午後11:37, Massimo Di Pierro wrote: > I think have a solution in trunk. You will not need to specify length > and should work. > > On Jan 31, 8:40 pm, kenji4569 wrote: > > > When I run the following code: > > > db(db.xxx.id==1).select(cache=(cache.

[web2py] Re: External Access to web2py (uWSGI + Cherokee)

2011-02-01 Thread greenpoise
Ok..it was my ISP blocking port 80...apparently it is a common practice by ISPs. Worked fine after I changed the port..thanks d On Feb 1, 2:15 pm, greenpoise wrote: > Ok, I was able to deploy web2py using uWSGI & Cherokee. I can access it > locally but not from the outside of the network. T

Re: [web2py] web2py exec in the new again

2011-02-01 Thread Jonathan Lundell
On Feb 1, 2011, at 12:16 PM, Massimo Di Pierro wrote: > > I agree with Armin that in the case of exec (and web2py uses exec), > the self references are created whether you want them or not. That > means one should not define classes in Models and Controllers. I have > issued that warning already t

[web2py] Implement Share this Button of Facebook

2011-02-01 Thread Andrew Evans
How would you go about implemeting the "Share This" button of Facebook by pulling out a query from a database table. for example: Thanks in Advance

[web2py] Re: migration from 1.88.2 to 1.91.6 problem

2011-02-01 Thread Massimo Di Pierro
Which ones are in red? On Feb 1, 1:13 pm, Richard Vézina wrote: > Hello, > > If I change erase those line (in red) in /gluon/sqlhtml.py > >  if not self.ignore_rw and not self.table[fieldname].writable: >                 ### this happens because FROM has no knowledge of writable >                

[web2py] Re: web2py exec in the new again

2011-02-01 Thread VP
If what I thought above is true, a warning like this sufficient: "Global objects/variables in controllers might (will?) cause memory leaks". If this is what the criticism of web2py amounts to, I think it's a storm in a tea cup.

[web2py] Re: web2py exec in the new again

2011-02-01 Thread VP
It's interesting to note that even the variable "c" in my example above is properly destroyed with execfile('test.py', {}). What does this mean? I think this means that YES you can define classes inside a web2py controller without memory leaks, as long as there are no global (within the controll

[web2py] Re: web2py exec in the new again

2011-02-01 Thread Anthony
On Tuesday, February 1, 2011 3:16:12 PM UTC-5, Massimo Di Pierro wrote: > In web2py you cannot store instances of objects into session. While > Armin makes it tool like this is a web2py problem this is more complex > and general than that. In Python if you pickle and object that is > instanc

[web2py] Re: web2py exec in the new again

2011-02-01 Thread VP
Maybe unnecessary, but here's another test: + In foo.py: class Foo(object): def __del__(self): print 'Deleted' def bar(self): print "bar::" b = Foo() def f(): print "local_func::" c = Foo() + In test.py: from foo import * a = Foo() a.bar() f() + Then,

Re: [web2py] pymysql gives Broken Pipe

2011-02-01 Thread Fran
Thanks - fine for this currently low-volume site now but we definitely want to take advantage of this feature for scalability (the site may suddenly start getting a lot of traffic): http://www.web2py.com/book/default/chapter/06#Connection-Pooling Also see: http://www.web2py.com/book/default/chap

[web2py] Re: Can any help me with new dal in trunk?

2011-02-01 Thread Fran
Cool, thanks :) This function: http://bazaar.launchpad.net/~flavour/sahana-eden/trunk/view/head:/modules/s3/s3gis.py#L381 maxResolution & maxExtent don't get copied into output as maxresolution & maxextent are in the Rows... The relevant model: http://bazaar.launchpad.net/~flavour/sahana-eden/tr

[web2py] Re: web2py exec in the new again

2011-02-01 Thread Anthony
But what if 'local_import' is used (instead of 'from a import Foo') -- does local_import work the same as regular Python imports? On Tuesday, February 1, 2011 5:09:25 PM UTC-5, Massimo Di Pierro wrote: > I run this test (following Armin's example): > > # in file a.py > class Foo(object): >

[web2py] External Access to web2py (uWSGI + Cherokee)

2011-02-01 Thread greenpoise
Ok, I was able to deploy web2py using uWSGI & Cherokee. I can access it locally but not from the outside of the network. The connection basically times out when I try to access it. Any setting on cherokee that I am not aware of? I open the firewall to see if that was it but did not solved the p

[web2py] [SOLVED] Re: Default Web2Py Application on GAE

2011-02-01 Thread Gary Bee
I do apologize. I have found init.py and have edited it to my satisfaction On Feb 1, 9:08 pm, Gary Bee wrote: > I have created an application for my business homepage. > When I run web2py locally by default it opens a link to the welcome > application. I have to edit the url to the applicatio

[web2py] Re: Default Web2Py Application on GAE

2011-02-01 Thread Massimo Di Pierro
call it "init". On Feb 1, 3:08 pm, Gary Bee wrote: > I have created an application for my business homepage. > When I run web2py locally by default it opens a link to the welcome > application. I have to edit the url to the application of my homepage. > This works fine for development purposes, I

[web2py] Re: web2py exec in the new again

2011-02-01 Thread Massimo Di Pierro
I run this test (following Armin's example): # in file a.py class Foo(object): def __del__(self): print 'Deleted' #in file b.py from a import A foo=Foo() #in file c.py execfile('b.py', {}) execfile('b.py', {}) execfile('b.py', {}) import gc gc.collect() running c.py printes Deleted

[web2py] Re: SQLCustomType

2011-02-01 Thread Massimo Di Pierro
It is not deprecated. It is just that I am not ready to promise backward compatibility. Nevertheless use it. If something better comes along, there will be instructions for the transition. On Feb 1, 2:46 pm, Art Zemon wrote: > On 02/01/2011 02:31 PM, Thadeus Burgess wrote: > > > Has this been d

[web2py] Re: Can any help me with new dal in trunk?

2011-02-01 Thread Massimo Di Pierro
The change in trunk is supposed to only affect internals. If it breaks you code than is is a bug. Please provide an example of code that breaks and I will fix trunk. Massimo On Feb 1, 2:22 pm, Fran wrote: > I too have just been bitten by this. > From r2950 to current trunk, all fieldnames in que

Re: [web2py] Favicon on GAE

2011-02-01 Thread contatogilson...@gmail.com
Insert with "link" tag in the : - http://www.quotes.co.uk/favicon.ico"; type="image/x-icon"> - http://www.quotes.co.uk/favicon.ico"; type="image/x-icon"> _ *Gilson Filho* *Web Developer http://gilsondev.com* 2011/2/1 Gary Bee > I have

[web2py] Favicon on GAE

2011-02-01 Thread Gary Bee
I have used a favicon (.png) to get a nice little icon for my website in the browser. This works on my local web2py installation but now I have uploaded it to GAE the favicon does not appear? Any ideas?

[web2py] Default Web2Py Application on GAE

2011-02-01 Thread Gary Bee
I have created an application for my business homepage. When I run web2py locally by default it opens a link to the welcome application. I have to edit the url to the application of my homepage. This works fine for development purposes, I can also access the site via the admin interface. I have suc

Re: [web2py] pymysql gives Broken Pipe

2011-02-01 Thread Vasile Ermicioi
I see no reason for you to use pool_size, I think you will avoid this error by not using it, and if you say that you have little traffic than I see almost no reason to use pool_size

[web2py] Re: web2py and uploadify

2011-02-01 Thread Niphlod
bump On Jan 26, 9:42 pm, Niphlod wrote: > Hello, I'm working on integrating uploadify with web2py > Unfortunately uploadify doesn't use cookies at all when posting the > files so if I want to "assign" an user to an uploaded file I need to > secure the "receiving" function somehow. > Uplo

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-02-01 Thread howesc
i try to use pythonic naming conventions in my database. i prefer: db.define_table('address_type', Field('name')) db.define_table('contact', Field('name')) db.define_table('address', Field('contact', db.contact), Field('type', db.address_type), Field('text')) but perhaps mainly because i don't

[web2py] Re: web2py exec in the new again

2011-02-01 Thread VP
One question: If I define a class externally, and use local_import to import it into controller or model, will it have these potential problems or not?

[web2py] Re: adding tables instead of merging?

2011-02-01 Thread howesc
this sounds pretty database specific. GAE uses namespaces for this, MySQL calls them 'databases', and postgres calls them schemas. in all GAE and Postgres tables from one area cannot see tables in another area. MySQL does permit querying data across 'databases'.

[web2py] Re: GAE only issue extra status info as text on top of page

2011-02-01 Thread howesc
sounds like you got it right. i have seen similar behavior on GAE with print statements. they seem to show in the console on dev, but in the browser on production. try using the logging package instead of print statements to avoid that problem. cfh

[web2py] Re: dynamic session variables

2011-02-01 Thread Francisco Costa
I've manage to use this solution: firstcheck=datetime.fromtimestamp(float(request.args(1))) session.id=session.id or {} if not post_id in session.id: session.id[post_id]=firstcheck lastcheck=str(session.id[post_id]) if str(firstcheck) firstcheck if returns any results:

Re: [web2py] SQLCustomType

2011-02-01 Thread Art Zemon
On 02/01/2011 02:31 PM, Thadeus Burgess wrote: Has this been deprecated? If not, a refresher on how to make a simplejson type and perhaps a section of the book devoted to custom types? I'd like to see this, too. I need to create an upload Field that stores the files in Rackspace Cloud Files.

[web2py] Re: tip of the day with a challenge

2011-02-01 Thread DenesL
The processing of the records depends on that. A short lived idea was to use dbset.query to get the info but since the query can look like a tree full of ANDs and ORs its complicated. So, no easy way out?. On Feb 1, 3:17 pm, Massimo Di Pierro wrote: > You cannot tell easily from just looking at i

[web2py] pymysql gives Broken Pipe

2011-02-01 Thread Fran
I have been getting Broken Pipe issues with pymysql: Traceback (most recent call last): File "/home/web2py/gluon/main.py", line 470, in wsgibase BaseAdapter.close_all_instances('commit') File "/home/web2py/gluon/dal.py", line 272, in close_all_instances getattr(instance,action)() File

[web2py] SQLCustomType

2011-02-01 Thread Thadeus Burgess
Has this been deprecated? If not, a refresher on how to make a simplejson type and perhaps a section of the book devoted to custom types? -- Thadeus

[web2py] Re: dynamic session variables

2011-02-01 Thread Francisco Costa
I'm trying to do a realtime commenting system. I have this place for comments in posts, and I want the new comments to display automatically in the comments area, with reloading the page. I have this that check if there are new posts after the page is loaded every ten seconds: setInterval("aja

[web2py] Re: Can any help me with new dal in trunk?

2011-02-01 Thread Fran
I too have just been bitten by this. >From r2950 to current trunk, all fieldnames in queries have been .lower()d This breaks my code which uses the real fieldnames - things like maxExtent & maxResolution. This code all worked fine before on MySQL, PotsgreSQL & sqlite. In the spirit of not breakin

[web2py] Re: tip of the day with a challenge

2011-02-01 Thread Massimo Di Pierro
You cannot tell easily from just looking at it. On Feb 1, 2:05 pm, DenesL wrote: > I have been thinking about this. > How can one tell if the resulting records are going to have fields > from multiple tables?. > > On Jan 30, 12:01 am, Massimo Di Pierro > wrote: > > > > > > > > > Immagine you hav

[web2py] web2py exec in the new again

2011-02-01 Thread Massimo Di Pierro
>From the usual source: http://lucumr.pocoo.org/2011/2/1/exec-in-python/ My answer: Armin suggests exec'ing in an environment and not in the outer environment. That is what web2py does and in fact we already follow much of the advice he gives us about about how to use exec. We just do not follow

Re: [web2py] Re: dynamic session variables

2011-02-01 Thread Jonathan Lundell
On Feb 1, 2011, at 11:54 AM, Francisco Costa wrote: > > the problem is when i open a second tab, it copies the session.id and > doesn't recognize the new page_id > > basically what i want is a diferrent session.id[page_id] for each tab > i open where is page_id coming from? Perhaps the intended

[web2py] Re: tip of the day with a challenge

2011-02-01 Thread DenesL
I have been thinking about this. How can one tell if the resulting records are going to have fields from multiple tables?. On Jan 30, 12:01 am, Massimo Di Pierro wrote: > Immagine you have the following (suggested by user Nik): > > db.define_table('person',Field('name'),format='%(name)s') > db.

[web2py] Re: GAE only issue extra status info as text on top of page

2011-02-01 Thread Terry
I had left a print statement in the code that I was using to debug an issue. When I removed the print statement, the application ran fine on GAE. I do not know if this was the root cause, or if there was something about the deployment (used GAE SDK tool in both cases) Can anyone share why (as I

[web2py] Re: dynamic session variables

2011-02-01 Thread Francisco Costa
the problem is when i open a second tab, it copies the session.id and doesn't recognize the new page_id basically what i want is a diferrent session.id[page_id] for each tab i open On Feb 1, 5:19 pm, Massimo Di Pierro wrote: > session.id = session.id or {} > session.id[page_id]=session.id.get(pa

Re: [web2py] Re: Log tickets

2011-02-01 Thread Jonathan Lundell
On Feb 1, 2011, at 11:38 AM, Massimo Di Pierro wrote: > > I'd like to hear more pros and cons about this from other users. Good idea. I'd make one change, though: define a separate ticket logger: logger_ticket = logging.getLogger("web2py.ticket") ...and use it for this purpose. Perhaps add an

[web2py] Re: background task error

2011-02-01 Thread Massimo Di Pierro
hmmm. I think I know the problem now. Try comment that line. It should work. On Feb 1, 1:38 pm, pbreit wrote: > I just downloaded web2py_osx.zip again and here is what I see: > > VERSION > Version 1.91.6 (2011-01-03 17:55:14) > > -- web2py/Contents/Resource/web2py.py -- > #!/usr/bin/env python2.5

Re: [web2py] Re: background task error

2011-02-01 Thread pbreit
I just downloaded web2py_osx.zip again and here is what I see: VERSION Version 1.91.6 (2011-01-03 17:55:14) -- web2py/Contents/Resource/web2py.py -- #!/usr/bin/env python2.5 import gluon.import_all from gluon.widget import start start()

[web2py] Re: Log tickets

2011-02-01 Thread Massimo Di Pierro
I'd like to hear more pros and cons about this from other users. massimo On Feb 1, 11:19 am, Jim Karsten wrote: > On my development server, I log errors to syslog so they are > accessible from a single location. Web2py tickets present a problem > since they are not logged. I could configure sysl

[web2py] Re: migration from 1.88.2 to 1.91.6 problem

2011-02-01 Thread Richard Vézina
Hello, If I change erase those line (in red) in /gluon/sqlhtml.py if not self.ignore_rw and not self.table[fieldname].writable: ### this happens because FROM has no knowledge of writable ### and thinks that a missing boolean field is a None if self

[web2py] Re: background task error

2011-02-01 Thread ron_m
I have had trouble with browser caching by just left clicking on the button on the downloads page on the web2py.com website. I now make a point of using a right click Save As or whatever your browser provides as the item in the pop up menu to save the file. The first clue the left click didn't a

[web2py] GAE only issue extra status info as text on top of page

2011-02-01 Thread Terry
I am complete newbie to web based application design, and new to web2py, so apologies if the answer is obvious. I am doing a simple to do list application as a learning exercise, and so far has been the right balance between enough complexity to force learning a few things without being overwhelmi

[web2py] Search form in CRUD

2011-02-01 Thread Running Clam
Hi All, If I call "search" from a controller like: - def client_search(): return dict(form=crud.search(db.client)) ...and get the expected form, but using: - def data(): return dict(form=crud()) ...at: - [app]/crm/data/search/client ...I get a 404. Am I missing something? -- Cheer

[web2py] Re: has anyone managed to pickle the 'db' DAL reference?

2011-02-01 Thread mart
right, so I assume the answer was for "do the export/import"... k, got it. Thanks Mart :) On Feb 1, 9:38 am, Massimo Di Pierro wrote: > Yes, the data is there. > > On Jan 31, 9:26 pm, mart wrote: > > > > > > > > > i see... so, if I understand, only the table definitions are missing > > (and I

[web2py] Re: background task error

2011-02-01 Thread pbreit
I noticed the source code version is quite a bit different: http://code.google.com/p/web2py/source/browse/web2py.py #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys if '__file__' in globals(): path = os.path.dirname(os.path.abspath(__file__)) os.chdir(path) else: p

[web2py] migration from 1.88.2 to 1.91.6 problem

2011-02-01 Thread Richard Vézina
Hello, I am not sure where it comes from the problem I face, but for sure it comes from 1.91.6 because I dont have the probleme with the exact same app under 1.88.2. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.p

Re: [web2py] Re: background task error

2011-02-01 Thread Martín Mulone
update web2py, import_all is commented since many versions ago... 2011/2/1 pbreit > Here is web2py.py on a fresh MacOS install: > > #!/usr/bin/env python2.5 > > import gluon.import_all > from gluon.widget import start > start() > -- Pablo Martín Mulone (mar...@tecnodoc.com.ar) http://www.tec

[web2py] Re: background task error

2011-02-01 Thread pbreit
Here is web2py.py on a fresh MacOS install: #!/usr/bin/env python2.5 import gluon.import_all from gluon.widget import start start()

Re: [web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-02-01 Thread Martin Barnard
General request for comments & corrections from the more experienced (than me) programmers in this group please. I really don't want to be giving bad advice. Anyway, on to the advice... Rupesh, In the end, it doesn't matter what scheme you use, as long as you find it easy & your practices are con

Re: [web2py] insert into table where fields and values are in a dict

2011-02-01 Thread Vasile Ermicioi
d = dict(k1=v1, k2=v2) db.tablename.insert(**d)

Re: [web2py] insert into table where fields and values are in a dict

2011-02-01 Thread Vasile Ermicioi
d = {k1=v1, k2=v2} db.tablename.insert(**d)

[web2py] insert into table where fields and values are in a dict

2011-02-01 Thread Ed Greenberg
If I call db.tablename.insert(...) it expects individual column-value pairs. I already have these in a dict (which has been pre-screened for valid columns and types). Is there a way to call insert with this dict, or to properly explode the values into something I can pass to insert? Thanks.

[web2py] Log tickets

2011-02-01 Thread Jim Karsten
On my development server, I log errors to syslog so they are accessible from a single location. Web2py tickets present a problem since they are not logged. I could configure syslog to access errors from the ticket error file, but it contains more information than I need and the text isn't in a suit

[web2py] Re: dynamic session variables

2011-02-01 Thread Massimo Di Pierro
session.id = session.id or {} session.id[page_id]=session.id.get(page_id,str(request.now)) On Feb 1, 9:59 am, Francisco Costa wrote: > I want something like this: > >     if not session.id[page_id]: >         session.id[page_id]=str(request.now) > > but i get this error: KeyError: '74' > > I wan

[web2py] adding tables instead of merging?

2011-02-01 Thread mart
Hi, Say a process generates a DB and a set of tables, and say this process is repeated multple times: Is it possible to add tables (as opposed to merging) to an existing DB? Since once set of tables have the same names as another, ideally the tables could live in a separate folder (uniquely named)

[web2py] Re: Is there a way to remove application name from URL()?

2011-02-01 Thread Wikus van de Merwe
Your routes do not work for internal links because the last rewriting rule from routes_in have to be also applied to routes_out. routes_in = ( ('/static/$anything', '/myapp/static/$anything'), ('/appadmin/$anything', '/myapp/appadmin/$anything'), ('/favicon.ico', '/myapp/static/favicon.i

[web2py] Re: dynamic session variables

2011-02-01 Thread Francisco Costa
I want something like this: if not session.id[page_id]: session.id[page_id]=str(request.now) but i get this error: KeyError: '74' I want to validate if a dynamic variable exists.. if not I want to create it and to get the time On Feb 1, 4:17 am, Jason Brower wrote: > You can do

[web2py] Re: Uncaught RangeError: Maximum call stack size exceeded

2011-02-01 Thread Massimo Di Pierro
The problem is that your app is trying to build a dropdown (..) with 102589 options. This causes both the slowness and crashes the browser. On Jan 31, 8:48 am, Johann Spies wrote: > Hallo Massimo, > > On 31 January 2011 16:23, Massimo Di Pierro wrote: > > > Never seen it before. What code/condi

[web2py] Re: Doubt, using the date field

2011-02-01 Thread Massimo Di Pierro
You should not change web2py_ajax. You should translate the string "%Y- %m-%d" using the internationalization interface. On Feb 1, 4:33 am, Jan Palach wrote: > Hi everybody, > > I have a little problem. I have a table containing a date field in the format > "% m-% d% Y"as shown below: > > db.def

[web2py] Re: background task error

2011-02-01 Thread Massimo Di Pierro
two things are wrong: 1) that line "import gluon.import_all" should be commented (has been commented for at list six web2py versions) it is only used to build py2exe 2) even if you uncomment, gluon/import_all.py should be there. You may have a very old version of web2py and some missing files. O

[web2py] Re: has anyone managed to pickle the 'db' DAL reference?

2011-02-01 Thread Massimo Di Pierro
Yes, the data is there. On Jan 31, 9:26 pm, mart wrote: > i see... so, if I understand, only the table definitions are missing > (and I should know this), but I am hoping that this means just the > tables,not the data? If something Commet could make that the tabel > data available (maybe as a str

[web2py] Re: Can't deal with MemcachedKeyLengthError in caching selects

2011-02-01 Thread Massimo Di Pierro
I think have a solution in trunk. You will not need to specify length and should work. On Jan 31, 8:40 pm, kenji4569 wrote: > When I run the following code: > > db(db.xxx.id==1).select(cache=(cache.memcache, 5)) > > I got MemcachedKeyLengthError: Key length is > 250. > > Since xxx table has many

Re: [web2py] Re: Uncaught RangeError: Maximum call stack size exceeded

2011-02-01 Thread Anthony
On Tuesday, February 1, 2011 1:57:35 AM UTC-5, spyker wrote: > > On 31 January 2011 21:52, Anthony wrote: > >> >> Is that a Python error code? When I Google that error, all the references >> I see are to Javascript errors in particular browsers. Could the problem be >> on the client side? >>

[web2py] Doubt, using the date field

2011-02-01 Thread Jan Palach
Hi everybody, I have a little problem. I have a table containing a date field in the format "% m-% d% Y"as shown below: db.define_table('parcelas', Field('numero', 'integer'), Field('valor', 'double'), Field('data_vencimento', 'date'), Field('pago', 'boolean'), Field('pagame

[web2py] Case-insensitive autocomplete?

2011-02-01 Thread Johann Spies
How is it possible to get a case-insensitive autocomplete? Having a database where there are inconsistencies in a field it will help a lot if autocomplete can be told to work case-insensitive. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of

  1   2   >