[web2py] Re: pop-up pages interface

2011-06-28 Thread Massimo Di Pierro
http://coderplus.com/2009/11/jquery-modal-boxes-to-improve-your-ui/ On Jun 28, 3:32 am, niknok wrote: > Hello all. > > How can I create a web2py interface similar to that of the Chromium > Browser when you need to change the browser settings?  I particularly > like those screens where a page pops

[web2py] Re: Can local_import() import a class definition?

2011-06-28 Thread Robert Clark
Great! "from mymodule import my_class" works exactly as you described. I didn't realise local_import was deprecated. The web2py Book still refers to it in this section: http://web2py.com/book/default/chapter/04#Third-Party-Modules You were right that something else was going on. I was invoking

Re: [web2py] Re: proven hosting sites for web2py

2011-06-28 Thread Bruno Rocha
I agree a little with GoldenTiger, I recently changed my 20 web2py applications that were hosted in different webfaction accounts, I figured out that Linode with stack script is better, easy and less expensive. In 10 minutes you have a web2py application running on Linode with Uwsgi and Nginx, j

Re: [web2py] Re: proven hosting sites for web2py

2011-06-28 Thread Vasile Ermicioi
strange to hear that about webfaction, please send your hosting list and tests

[web2py] matplotlib image map using web2py

2011-06-28 Thread G
Hello, I would like to make a clickable image map of a scatter plot in my web2py application. The scatter plot will be dynamically generated. I can use the technique that Massimo has shown many times to generate matplotlib plots in web2py. The trouble is that the technique relies on a controller th

[web2py] Re: proven hosting sites for web2py

2011-06-28 Thread GoldenTiger
I have reviewed over 20 differents shared hosting, I can share a very complete list of web2py hosting I wrote , including speed tests, custom modules supported, fcgi/wsgi, nginx / lighttpd (still shared hosting) Personally, my experience with webfaction WAS NOT GOOD.My web2py websites, ofte

Re: [web2py] suggestion for improvement for A

2011-06-28 Thread Sebastian E. Ovide
What about adding a line in web2py_component (line 87 of web2py_ajax.js) function web2py_component(action,target) { jQuery(function(){ jQuery('#'+target).html("Loading..."); // <--- replace this with some picture etc. web2py_ajax_page('get',action,null,target); }); }

Re: [web2py] how redirect without propagate the .load extension?

2011-06-28 Thread Richard Vézina
To myself : this thread have some answer : https://mail.google.com/mail/?shva=1#search/stop+propagation+redirect+.load/12d347378771c15c I am open to suggestion or maybe there is implemented solution now? Richard On Tue, Jun 28, 2011 at 4:51 PM, Richard Vézina wrote: > Hello, > > In the book it

[web2py] how redirect without propagate the .load extension?

2011-06-28 Thread Richard Vézina
Hello, In the book it writed : If you LOAD a component having the .load extension and the corresponding controller functionredirects to another action (for example a login form), the .load extension propagates and the new url (the one to redirect too) is also loaded with a .load extension. How m

Re: [web2py] Re: MSSQL2Adapter

2011-06-28 Thread E L
On Mon, Jun 27, 2011 at 3:41 PM, Massimo Di Pierro wrote: > Your suggested change is in trunk. I am trusting you one this since I > am not a MSSQL user and cannot test it. If anybody else is using > MSSQL2Adaperter, i.e. > >   DAL('mssql2://') > > please check that this change does not break y

Re: [web2py] Re: DAL Query by Date on Datetime Field.

2011-06-28 Thread Vasile Ermicioi
a bit longer but selects by exact date dt = request.now rows = db( (db.events.created_on.year()==dt.year) & (db.events.created_on.month()==dt.month) & (db.events.created_on.day()==dt.day) ).select()

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Richard Vézina
Gosh I had tried this, but it wasn't working... I probably not let enought time to the component to load... You are my savior Anthony ;-) I think I'm too eager to include this feature. I was about to go in staging with 1.96.4, but the 1.97.1 get out and then I want to skip to it and we know the r

Re: [web2py] Re: Custom Widget Help.

2011-06-28 Thread Anthony
See here for custom validators: http://web2py.com/book/default/chapter/07#Custom-Validators and here for custom widgets: http://web2py.com/book/default/chapter/07#Widgets If your widget returns an INPUT helper, you can assign your custom validator to the 'requires' argument of INPUT to make

[web2py] Empty database default values?

2011-06-28 Thread pbreit
Does anyone have advice on specifying default empty database values? I usually just don't set a default but I see that Auth() for example sets default='' in a lot of cases. And I've seen default=None. Does it matter much?

Re: [web2py] Re: proven hosting sites for web2py

2011-06-28 Thread Sebastian E. Ovide
I confirm that IPage has very poor technical support... nevertheless I've installed web2py (with CGI) and it works ! even if it is VERY slow... I would not recommend it ! On Tue, Jun 28, 2011 at 8:51 PM, DenesL wrote: > > Sometimes it is like that, just a waste of time trying to figure out

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Anthony
Actually, your problem is simple -- you're loading two versions of jQuery (1.5.1 and 1.6.1), and that seems to be causing jQuery to fail. Note, if you're using the web2py layout.html from the 'welcome' app, it includes the web2py_ajax.html view, which itself loads jQuery (currently 1.6.1) in the

[web2py] Re: proven hosting sites for web2py

2011-06-28 Thread DenesL
Sometimes it is like that, just a waste of time trying to figure out what is really supported behind all those marketing ads, and that is exactly why we should have this list of proven hosting sites. Thanks to all that have shared their experience so far. Keep it coming, there ought to be more.

Re: [web2py] Re: Custom Widget Help.

2011-06-28 Thread David J.
Thanks. Isn't IS_MATCH a validator? I wanted a widget that had this built in; How would I build a custom form widget that has this validator as its default. On 6/28/11 3:32 PM, Niphlod wrote: you need to play with regexes. assuming "parenthesis-3 digits-parenthesis-space-3 digits-hyp

[web2py] Re: DAL Query by Date on Datetime Field.

2011-06-28 Thread apple
You could always put the date in one field and the time in another. Then you can easily search on date or time. On Jun 28, 8:09 pm, Niphlod wrote: > you can always write a function if you are using this query a lot of > times > > if you have a field with "datetime" you must "inspect" it by >

[web2py] Re: Major problems inserting records into DB

2011-06-28 Thread pbreit
OK, I think it might be working and this was false alarm (as usual). I think I might have been tripped up by the newish auth.signature "represent" which was showing empty fields for created_by/modified_by since I am not collecting first/last name. It still seems odd, though, that is_active is d

[web2py] Re: Custom Widget Help.

2011-06-28 Thread Niphlod
you need to play with regexes. assuming "parenthesis-3 digits-parenthesis-space-3 digits-hypen-4 digits" sequence requires = IS_MATCH('\([\d]{3}\) [\d]{3}-[\d]{4}', error_message='please enter phone number in format (800) 555-1212') should do it. On Jun 23, 9:50 pm, "David J." wro

[web2py] Re: DAL Query by Date on Datetime Field.

2011-06-28 Thread Niphlod
you can always write a function if you are using this query a lot of times if you have a field with "datetime" you must "inspect" it by datetime(s) values if you're going to use only the "date" information, you'd better be using "date" type for the field. anyway, you can end up with impo

[web2py] Re: proven hosting sites for web2py

2011-06-28 Thread GoldenTiger
I did a large search over the net, chatting with technical support, doing next questions: 1 –Python Version installed 2- Possibility of install new modules? virtualenv? 3- SSH shell enable? / HTTPs? I did copy/paste in http://blog.web2py.es (my personal notes about web2py) Log with JustHost ht

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Richard Vézina
On Tue, Jun 28, 2011 at 12:41 PM, Anthony wrote: > Also, see what happens if you turn off the jQuery UI tabs -- maybe that's > interfering somehow. > By just removing this part, the problem still there : //$(function() { //var $tabs = // $( "#tabs" ).tabs(); //$tabs.tabs('select', N

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Richard Vézina
Found this old thread that could address my need : http://markmail.org/message/5r5co46uyhzkqhb5#query:web2py%20tabs%20plugin+page:1+mid:twuighrdf3o3kfbp+state:results If anyone know if there is improvement since then... Richard On Tue, Jun 28, 2011 at 1:16 PM, Richard Vézina wrote: > As I tho

Re: [web2py] Re: proven hosting sites for web2py

2011-06-28 Thread Vasile Ermicioi
+1 for webfaction, soon I will post a website built with web2py and hosted by webfaction, I am very happy with them

[web2py] Re: Major problems inserting records into DB

2011-06-28 Thread pbreit
Hmm...still a problem. Even when I insert a new record in /appadmin and I can see a "1" in the created_by/modified_by fields, it still doesn't save it. Has auth.signature changed in any way?

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Anthony
Also, see what happens if you turn off the jQuery UI tabs -- maybe that's interfering somehow. On Tuesday, June 28, 2011 11:54:57 AM UTC-4, Richard wrote: > >> > Can you get a simple ajax component working in 1.97.1? >> > > I can do that : > http://127.0.0.1:8000/sgddms/ref/create_fvte.l

[web2py] Re: Major problems inserting records into DB

2011-06-28 Thread pbreit
Thanks, guys. I think the , was a copy/paste error. Yes, I do have a custom validator that was working at some point. It's really odd that a simple default is not getting set. Or that modified_on is populating but not modified_by. And that everything seems to be failing silently. I've begin re

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Richard Vézina
On Tue, Jun 28, 2011 at 11:46 AM, Anthony wrote: > On Tuesday, June 28, 2011 11:08:37 AM UTC-4, Richard wrote: >> >> ajax=False not working without a specific create_fvte.load view (base on >> copy and change name of generic view)... Where is the patch so I could test >> if it fix the problem...

[web2py] Re: App Engine Migrations

2011-06-28 Thread howesc
from Big Table's perspective there is no such thing as migrations. fields present when you write the record are stored, fields not present are not stored. so from that perspective the migrations work great! some cautions: - when you remove fields, that data will not be removed from the datast

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Anthony
On Tuesday, June 28, 2011 11:08:37 AM UTC-4, Richard wrote: > > ajax=False not working without a specific create_fvte.load view (base on > copy and change name of generic view)... Where is the patch so I could test > if it fix the problem... > I'm sure Massimo will have the patch in trunk soon

Re: [web2py] Re: It makes duplicate records on datastore

2011-06-28 Thread Anthony
On Tuesday, June 28, 2011 11:34:25 AM UTC-4, dorasan wrote: > > Anthony, you are right. My new code does still make duplicate records. > I don't know how come I saw that it prevented a double submission. > > Anyway, the code what you gave me as the best way, prevented a double > submission. It

[web2py] Re: About back-references in the google datastore API

2011-06-28 Thread howesc
the DAL model would be something like: db.define_table('FirstModel', Field('prop', 'integer')) db.define_table('SecondModel', Field('ref_field', db.FirstModel)) not sure what those other 2 statements are doing, so not sure how best to replicate them in web2py.

[web2py] Re: proven hosting sites for web2py

2011-06-28 Thread blackthorne
nice one! here's one: Webfaction latest 2.4/3.2 Linux 2.6.18 8 dollars/month (more or less depending on the plan) USA great control panel, great support, feature rich, many auxiliary services available On Jun 28, 2:54 pm, DenesL wrote: > Hello list, > > I want to compile a list of the know hosti

Re: [web2py] Re: issue with 1.97.1

2011-06-28 Thread Richard Vézina
I have more problem... ajax=True don't work! ajax=False work fine with the Storage(vars) correction in compileapp.py fix... ajax=False not working without a specific create_fvte.load view (base on copy and change name of generic view)... Where is the patch so I could test if it fix the problem..

[web2py] Re: concatenating HTML helpers

2011-06-28 Thread Anthony
On Tuesday, June 28, 2011 10:19:08 AM UTC-4, apple wrote: > > Thanks. Why not define the + and += operator for tags? > > It seems a lot more intuitive to say table+=row > > rather than table=TAG[''](table+row) Note, it would be TAG[''](table, row), not TAG[''](table+row). Helpers (as well a

[web2py] Re: concatenating HTML helpers

2011-06-28 Thread Anthony
On Tuesday, June 28, 2011 9:43:35 AM UTC-4, Anthony wrote: > > HTML helper objects do not support the + operator (they don't have an > __add__ method). Your example works because you are concatenating an HTML > helper object with an XML object, and the XML object does support the + > operator -

[web2py] Re: concatenating HTML helpers

2011-06-28 Thread apple
Thanks. Why not define the + and += operator for tags? It seems a lot more intuitive to say table+=row rather than table=TAG[''](table+row) On Jun 28, 2:43 pm, Anthony wrote: > HTML helper objects do not support the + operator (they don't have an > __add__ method). Your example works because yo

[web2py] Re: Major problems inserting records into DB

2011-06-28 Thread Anthony
On Tuesday, June 28, 2011 9:43:47 AM UTC-4, DenesL wrote: > > > It does matter, it is flagged as a Syntax Error. > > Also: > Field('tax_rate', 'decimal(5,2)', default='0.00') > should be > Field('tax_rate', 'decimal(5,2)', default=0.0) #a number, not a > string > same for > Field('shi

[web2py] Re: Can local_import() import a class definition?

2011-06-28 Thread Massimo Di Pierro
Are you telling us that this does not work? mymodule = local_import('mymodule') my_new_class_instance = mymodule.my_class() It is veyr odd and I do not think this has anything to do with local_import. Something else is going on. Anyway, local_import is deprecated. Try from mymodule import my_cla

[web2py] Can local_import() import a class definition?

2011-06-28 Thread Robert Clark
I can't seem to get local_import() importing classes from module files in the same way 'from X import Y' normally works in Python. Say I have the following in mymodule.py def my_func(arg1): doSomething(arg1) class my_class(object): __init__(self): ...etc. my_class_ref = my_class

[web2py] proven hosting sites for web2py

2011-06-28 Thread DenesL
Hello list, I want to compile a list of the know hosting companies that have been proved to work with web2py and leave as a thumb-tacked entry in this group. The question seems to pop up frequently. Please post here or send me an email using the following format: Hosting company: Type of service:

[web2py] Re: Major problems inserting records into DB

2011-06-28 Thread DenesL
It does matter, it is flagged as a Syntax Error. Also: Field('tax_rate', 'decimal(5,2)', default='0.00') should be Field('tax_rate', 'decimal(5,2)', default=0.0) #a number, not a string same for Field('shipping_amount', 'decimal(17,2)', default='0.00') Do you have a custom validator? Fie

[web2py] Re: concatenating HTML helpers

2011-06-28 Thread Anthony
HTML helper objects do not support the + operator (they don't have an __add__ method). Your example works because you are concatenating an HTML helper object with an XML object, and the XML object does support the + operator -- it does so by calling the __str__ method of both objects and concat

[web2py] Re: concatenating HTML helpers

2011-06-28 Thread Massimo Di Pierro
var3=TAG[''](var1,var2) TAG[''] makes a nameless tag and therefore does what you ask. var3 = var1 + var2 has the same effect bur forces the conversion to strings before concatenating before you have not specified a tag for the top level. On Jun 28, 8:17 am, apple wrote: > If I try to concatena

[web2py] concatenating HTML helpers

2011-06-28 Thread apple
If I try to concatenate a TD and an XML using += then I end up with a string. Why is that? e.g. var1=TD("") var2=XML("") print(type(var1)) print(type(var2)) var1+=var1 print(type(var1)) ===> TD, XML, string

[web2py] Re: Major problems inserting records into DB

2011-06-28 Thread Anthony
I doubt this matters, but why is there a blank line with a comma in the middle of your table def? Also, I don't see the 'tax_rate' field in the table. On Tuesday, June 28, 2011 4:07:38 AM UTC-4, pbreit wrote: > I'm having a terrible time trying to figure out a major problem inserting > into my

[web2py] Re: proper way to mobile and desktop 'skins'

2011-06-28 Thread Chris May
Are you sending different content to either desktop or mobile devices? If you aren't, you could use the "responsive web design" approach (http://www.alistapart.com/articles/responsive-web-design/ or http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/) or the "mobile

[web2py] Badges with web2py logo

2011-06-28 Thread contatogilson...@gmail.com
Badges created here - http://picbadges.com/1886508 _ *Gilson Filho* *Web Developer http://gilsondev.com*

[web2py] Re: web2py 1.97.1 is OUT

2011-06-28 Thread GoldenTiger
What is the appropriate way to report small typos like 'Stoarge'? Yesterday for example, I saw the typo almost inmediately, and I created a "new issue" but I am not sure if it is the best way. Maybe should I better reporting them here at the group? It would be a good idea an option such as 'Did

[web2py] Odg.: Re: Odg.: Re: Odg.: Re: 1.95.1 - Field delete_this_record does not belong to the table

2011-06-28 Thread andrej burja
i have changed form=crud.update(db.izobrazevanje,request.args(0)) to form=SQLFORM(db.izobrazevanje,request.args(0),deletable=True, upload=URL ('download')) now it is ok andrej

Re: [web2py] proper way to mobile and desktop 'skins'

2011-06-28 Thread Daniel Gonzalez
Sorry, i sent the message incomplete: Hi! I'm using jQueryMobile to make the "mobile skin", and the way that i do is this: if is_mobile and request.extension == "html" : #Its mobile response.view = "%s/%s.%s" % (request.controller, request.function, "mobile")

Re: [web2py] proper way to mobile and desktop 'skins'

2011-06-28 Thread Daniel Gonzalez
Hi! I'm using jQueryMobile to make the "mobile skin", and the way that i do is this: if is_mobile and request.extension == "html" : #Its mobile response.view = "%s/%s.%s" % (request.controller, request.function, "mobile") if not os.path.exists(os.path.join(req

[web2py] Major problems inserting records into DB

2011-06-28 Thread pbreit
I'm having a terrible time trying to figure out a major problem inserting into my db. Sometime in the past couple of weeks, I started missing a bunch of data when inserting new records (through SQLFORM). For example, I'm using auth.signature and created_on and modified_on are getting populated

[web2py] Odg.: Re: Odg.: Re: Odg.: Re: 1.95.1 - Field delete_this_record does not belong to the table

2011-06-28 Thread andrej burja
hi i'm running 1.97.1 now. the problem in table "racun" SyntaxError: Field delete_this_record does not belong to the table was gone in previosu version but the problem with table with images (upload filed) is still here the model db.define_table('izobrazevanje',

Re: [web2py] suggestion for improvement for A

2011-06-28 Thread Sebastian E. Ovide
I mean the A function... say that you have a link which reload the component... and the response takes few seconds... in these few seconds you could click the link again... and it is not clear that it is loading something On Mon, Jun 27, 2011 at 11:30 PM, David J. wrote: > You can pass a loa