[web2py] validation in forms, DAL and Database

2010-05-24 Thread puercoespin
In a db.py: db.define_table('vendedor', Field('auth_user_id', unique=True, default = auth.user.id), Field('direccion'), Field('provincia'), Field('coordenadas_gps'), Field('email', requires=IS_EMPTY_OR(IS_EMAIL()), de

[web2py] insert the ip visitors in a field

2010-08-06 Thread puercoespin
Simple question, how to insert the ip visitors in a field, as Field('ip_visitor', default=...) Thanks

[web2py] Re: insert the ip visitors in a field

2010-08-06 Thread puercoespin
Two solutions works ! Thanks!

[web2py] web2py and SEO

2010-08-06 Thread puercoespin
Is web2py designed for a good practices about SEO? Are some frameworks SEO-friends and others no SEO-friends and, if this is true, are web2py SEO-friend? Thanks

[web2py] Re: web2py and SEO

2010-08-11 Thread puercoespin
As Bruno Rocha points, a sitemap is very, very importan for SEO. And other frameworks are adding tools for generating those sitemaps, for example, Django. The sitemap framework¶ Django comes with a high-level sitemap-generating framework that makes creating sitemap XML files easy. extra

[web2py] Re: web2py and SEO

2010-08-22 Thread puercoespin
On 12 ago, 00:23, mdipierro wrote: > Could you provide a list of features you would like to see? > > Massimo > > On Aug 11, 4:52 pm, puercoespin > wrote: > > First of all, I want to indicate that I am not an expert in SEO, not in Python not in Web2py. In fact, I a

[web2py] Re: web2py and SEO

2010-08-23 Thread puercoespin
Sorry, but the first link don't work. Insteand, http://www.google.com/support/webmasters/ and, in "help resources" can found the google doc in "search engine optimization". There are useful articles and videos SEO related too. Regards. On 22 ago, 14:53, puercoespin

[web2py] Re: Countries as Python objects

2010-11-05 Thread puercoespin
www.geonames.org On 3 Nov, 14:18, Bruno Rocha wrote: > More difficult to get is a list of States/Cities > > 2010/11/3 Martín Mulone > > > > > Very usefull > > > 2010/11/3 Jason Brower > > >  Yeah, I noticed that a few months ago.  It's very nice to use. > > >> On Wed, 2010-11-03 at 10:49 -0200

[web2py] Re: Countries as Python objects

2010-11-05 Thread puercoespin
sorry, i have a problem with links The correct http://www.geonames.org In download section there are a exhaustive list of regions, cities and countries. On 5 Nov, 22:02, puercoespin wrote: > www.geonames.org > > On 3 Nov, 14:18, Bruno Rocha wrote: > > > More difficult t

[web2py] display IS_IN_SET, from a select in a form

2010-11-20 Thread puercoespin
Hello, I have a custom db.auth_user, with a boolean field """ Field('profesional', 'boolean', default=False), . . format='%(first_name)s', ) """ and a table that references: ''' db.define_table('comentario_vendedor', Field('vendedor_id', db.auth_user,), I w

[web2py] Re: display IS_IN_SET, from a select in a form

2010-11-20 Thread puercoespin
> db.comentario_vendedor.vendedor_id.requires=IS_IN_DB(db(db.auth_user.profes­ional=='True'),auth_user.first_name) > > On Nov 20, 6:43 am, puercoespin > wrote: > > > > > Hello, > > >  I have a custom db.auth_user, with a boolean field > > >

[web2py] Re: ADVOCACY: "every single other Python program ever written uses imports"?

2011-01-07 Thread puercoespin
> Indeed. > > Moreover, while it's not best practice, it's certainly common enough to see > >         from somewhere import * > > which "magically" injects a bunch of names into the namespace. > > Your suggestion that web2py simply has a small set of built-ins strikes me as > right on. For exempl

[web2py] web2py book

2011-01-07 Thread puercoespin
Is there an errata file of the printed book? Because Lulu's book has many errors, and I have to be in comparison to the online version of it. I also think it would be interesting that users can add comments in the book, and that anyone can also display, as is for example in the postgresql manual.

[web2py] how to save the id when passing a dict in an insert

2012-08-23 Thread puercoespin
Hi if ""db.person.insert(name='Juan',age=23)"" is equal to ""db.person[0] = dict(name='Juan',age=23)"" how to save the id of the new record in the second case? h=db.person.insert(name='Juan',age=23) saves the id in h but: h=db.person[0] = dict(name='Juan',age=23) saves the dict in h, no

[web2py] Re: how to save the id when passing a dict in an insert

2012-08-23 Thread puercoespin
El jueves, 23 de agosto de 2012 15:50:41 UTC+2, Anthony escribió: > > Do you have an existing dict and you need to insert it as a record, but > also want the record id? In that case, you can do: > > id = db.person.insert(**some_dict) > > Anthony > Thanks Antony! That works. I tried: id=db

Re: [web2py] How to get geo location?

2012-09-27 Thread puercoespin
Geolocation is a W3C API, standard and is adopted for the HTML5. This API defines objects accesibles in JavaScript, so you must to define the script in the view part of your application. There a lot of javascript code about geolocation. A simple may be : http://www.w3schools.com/html/html5_geo

[web2py] .update_or_insert not optimized!!

2012-05-02 Thread puercoespin
In my app, .update_or_insert takes more time that code by hand. In a database with 5 tables and 60.000 records in total, the execution time was: without .update_or_insert: 0 minutes. 48 secons (Code) if combustible == G95: row=db(db.G95.LongitudLatitud==L

[web2py] Re: .update_or_insert not optimized!!

2012-05-03 Thread puercoespin
> You're manual version updates only two fields, whereas update_or_insert > updates six fields -- maybe that's the difference. > > Anthony > Yes, but I want to insert a new record with six fields, but update only two if the record exists. How to do that with .update_or_insert?

[web2py] Re: web2py resources

2012-05-03 Thread puercoespin
Maybe it can include blogs about web2py from the users of web2py-users group, exemple Omi Chiba, Bruno or Martin Mulone, (to cite a few). El lunes, 30 de abril de 2012 21:49:41 UTC+2, Anthony escribió: > > Most web2py resources can be found on web2py.com, but here are some > Google Groups top

[web2py] Re: web2py resources

2012-05-20 Thread puercoespin
El jueves, 3 de mayo de 2012 16:39:06 UTC+2, Massimo Di Pierro escribió: > > Please append here. Blogs about web2py: http://web2py.wordpress.com/ http://reingart.blogspot.com http://thadeusb.com/weblog/category/Web2py http://ochiba77.blogspot.com.es/ http://spametki.blogspot.com.es/

[web2py] Re: gmaps.js

2012-06-08 Thread puercoespin
Very interesting! Thanks for share El jueves, 7 de junio de 2012 00:04:29 UTC+2, mcm escribió: > > Help implementig google maps. > > http://hpneo.github.com/gmaps/ > > mic >

Re: [web2py] Delete a user

2013-01-08 Thread puercoespin
I think the right way is digitally signed urls. In the book: http://web2py.com/books/default/chapter/29/04?search=signature --

[web2py] SqlAlchemy and Web2py

2013-01-15 Thread puercoespin
I need to access to a legacy and complex MS-SQLServer. And i decide to use sqlAlchemy. What features of web2py am I missing? --

[web2py] Re: SqlAlchemy and Web2py

2013-01-15 Thread puercoespin
y read this > topic<https://groups.google.com/d/topic/web2py/MrjST1W5fk8/discussion> ? > I also have your needs, and the answers from Massimo were really > inspiring... > > Cheers, > Nico > > Il giorno martedì 15 gennaio 2013 13:47:45 UTC+1, puercoespin ha scritto

[web2py] How to construct an URL with non ASCII chars, (and about idna)

2013-02-21 Thread puercoespin
I have a table with a field with non-ASCII names. And i want to use those to construct the url. So, ie, a Spanish locality as "Aigües Tortes d'alt Ampurdà", I want to send the url: "http://mydomain/init/controller/function/'. In the view, in request.args(0), I want to recover the original n

[web2py] problems with import in 2.4.4 and 2.4.5

2013-03-24 Thread puercoespin
With the same packaged app, in 2.3 works well, but in 2.4.4 and 2.4.5 raise an import error: ImportError: cannot import name haversine_distance2 And refers to this sentence : from geo_utils import haversine_distance2 geo_utils is in the modules folder, with his _init_.py files and rel

[web2py] jqwidgets and web2py

2013-04-05 Thread puercoespin
Do you know jqwidgets from www.jqwidgets.com? That's a superb jquery based widgets, than i think may be included in web2py. There are a commercial licence, but you can use jQWidgets for free under the Creative Commons Attribution-NonCommercial 3.0 License

[web2py] http headers for enable 'Accept-Encoding: gzip' in a web2py web

2012-12-14 Thread puercoespin
My web2py web hasn't http compression enable. How can enable it? Thanks --

[web2py] Re: book 4th edition in PDF

2011-12-17 Thread puercoespin
Massimo, why not use paypal or google cart for payment? I dont know what is stripes.. > BTW. This uses stripes for payment I do not store any client info. > I do store your email, name and order so that, in the future you will > be able to download new version without paying again.

[web2py] height of selects is narrower than inputs in the new layout

2011-12-19 Thread puercoespin
Hi, I like very much the new layout of the 1.99.4 version. But in forms, the selects are narrower than inputs. I think there would be equal.

[web2py] Re: what about web2py 2.0?

2011-09-21 Thread puercoespin
+1 for geospatial features. Some ideas from three books: Map Scripting 101, in http://www.amazon.com/gp/product/1593272715/ref=s9_simh_gw_p14_d5_g14_i6?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-7&pf_rd_r=023SASW38231TN3CV802&pf_rd_t=101&pf_rd_p=470938451&pf_rd_i=507846 It's about mapstraction (http:/

[web2py] Re: what about web2py 2.0?

2011-09-22 Thread puercoespin
I'm interesting in it! On 21 sep, 11:46, Manuele wrote: > +1 for geospatial features. > > at the moment I'm working on a plugin_openlayers and I'll be glad to > share my work ASAP :) > >      Manuele > > On 21/09/2011 11:29, puercoespin wrote: >

[web2py] Re: Adding hidden field to a form

2011-10-04 Thread puercoespin
Not sure that's your asking for: INPUT(_type='hidden', _name='_hiddenName', _value='hiddenValue')

[web2py] Re: setting default values in dropdown and optimal method to select db with variables

2011-10-04 Thread puercoespin
In my app, i build a query for the 'all' value in a drop down form. For example: query = '(db.aa.forcefield == request.vars.forcefield)' if request.vars.color != 'ALL: query += ' & (db.aa.color=request.vars.color) ' if request.vars.weight !='ALL': query += ' & (db.aa.weight == reques

[web2py] Re: setting default values in dropdown and optimal method to select db with variables

2011-10-05 Thread puercoespin
color > if request.vars.weight !='ALL': >     query &= db.aa.weight == request.vars.weigth > query_results = db(query).select() > > It is also a little faster. > > On Oct 4, 1:09 pm, puercoespin > wrote: > > > > > In my app, i build a query for the &

[web2py] Re: SELECT / OPTGROUP

2011-10-06 Thread puercoespin
For selected, try (_name="region_to_search", value="bla bla bla SubRegion 3") instead of (_name="region_to_search", selected="bla bla bla SubRegion 3") On 6 oct, 18:27, Dominique wrote: > Hello All, > > First things first:  congratulations to Massimo and all those who > help. > Web2py is

[web2py] Re: RIA Framework Recomendation

2011-10-22 Thread puercoespin
No flex!! Nor Silverlight...:(( I think the standard Javascript/html5 is the right direcction you have to looking for.. On 22 oct, 00:10, Ialejandro wrote: > Hi everyone!! This time, I really need your help. I need to build a > true RIA with web2py, we have several intranet applications runnin

[web2py] sqlform: vars don't work

2011-12-01 Thread puercoespin
Hello, I have a simple app. It's a cumtom SQLFORM form. When fill it in index, all seems ok, but in the redirect ('buscar_coche_ocasion'), where is the same form, raise an error: ValueError: invalid literal for int() with base 10: '|75|75|' That's is: the var 'potencia' is sending twice, and sto

[web2py] Re: sqlform: vars don't work

2011-12-02 Thread puercoespin
No field 'list:integer'. I never programmed a db with field 'list:integer'. Deleting all database folder, (a lot of times) don't resolve the problem.

[web2py] Re: sqlform: vars don't work

2011-12-02 Thread puercoespin
Settings/fjzaragozaa/Mis documentos/Dropbox/ web2py_src/web2py/applications/prueba/controllers/default.py", line 39, in buscar_coche_ocasion listado_coches_ocasion=db(query).select() is the line that raise the error, but i dont understand why On 2 dic, 09:37, puercoespin wro

[web2py] Re: LOAD Component + Multiple Forms

2011-02-17 Thread puercoespin
An exemple, please? My mobile phone, 123456789, what's the code for sending a SMS? On 17 feb, 22:46, Massimo Di Pierro wrote: > One solution is to send sms via emails. It is cheap, reliable and does > not rely on third party services: > > web2py/gluon/contrib/sms_utils.py > > On Feb 17, 3:42 pm,

[web2py] Re: LOAD Component + Multiple Forms

2011-02-18 Thread puercoespin
gt; corresponds to > > On Feb 17, 6:06 pm, puercoespin > wrote: > > > An exemple, please? > > > My mobile phone, 123456789, what's the code for sending a SMS? > > > On 17 feb, 22:46, Massimo Di Pierro > > wrote: > > > > One solution is to

[web2py] Re: Redirect & response.flash

2011-02-28 Thread puercoespin
Very useful information. Thanks Jonathan On 25 feb, 17:11, Jonathan Lundell wrote: > On Feb 25, 2011, at 2:02 AM, SergeyPo wrote: > > > > > Hello everyone! > > > I want to do something like: > > > def selector(): > >    try: > >        x = db.headers[request.vars.ID] > >        if x is None: > >

[web2py] web2py shell error?

2011-04-08 Thread puercoespin
web2py Shell Version 1.94.6 (2011-03-27 18:20:38) In [1] : stack=[2,3,4] In [2] : stack.append(5) In [3] : stack [2, 3, 4] In the python2.5 shell: ActivePython 2.5.5.7 (ActiveState Software Inc.) based on Python 2.5.5 (r255:77872, Jan 31 2010, 15:49:35) [MSC v.1310 32 bit (Intel)] on win32 Type

[web2py] Re: Why continue to use this obscure phrase 'enterprise'?

2011-05-10 Thread puercoespin
Oh, i want to contribute! What do you think: Web2py on GAE = Python in the cloud with Diamonds :) On 10 mayo, 16:17, villas wrote: > Hi Marek > > We had a long discussion about dropping the word 'enterprise' and what > might be used instead. We had a lot of thoughts but Ninja and Bananas > n

[web2py] Re: how to get user name before login is completed

2011-07-15 Thread puercoespin
In a view: {{if auth.user_id:}} {{=H4(T('Welcome ') + db.auth_user[auth.user_id].first_name)}} {{pass} On 14 jul, 14:42, Anthony wrote: > On Thursday, July 14, 2011 1:03:24 AM UTC-4, weheh wrote: > > > How would one get auth.messages.logged_in to be something like > > "Welcome Massimo"upon

[web2py] Someone are instaled web2py in a shared host with The Passenger Apache module?

2013-09-29 Thread puercoespin
The Passenger Apache is a poliglot module for develop wsgi apps in apache (an ruby apps in Rack). See more information in http://www.phusionpassenger.com. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.go

[web2py] schema database support for the DAL

2013-10-17 Thread puercoespin
What happens with the support for schema databases in DAL as point in https://groups.google.com/forum/#!topic/web2py/QM6AAXfmrjw? Are there any plan to support it? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: schema database support for the DAL

2013-10-18 Thread puercoespin
17, 2013 8:48:22 PM UTC+2, puercoespin wrote: >> >> What happens with the support for schema databases in DAL as point in >> https://groups.google.com/forum/#!topic/web2py/QM6AAXfmrjw? >> >> Are there any plan to support it? >> >> Thanks >> > -- R

[web2py] Possible bug in DAL. Boolean types are converted in character(1) in posgresql

2013-10-18 Thread puercoespin
in the migration of my DB from Mysql to Postgresql, i found that a field type 'boolean' in DAL, is handled by Pg as character(1). Is it a bug, or a feature :))? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

Re: [web2py] Possible bug in DAL. Boolean types are converted in character(1) in posgresql

2013-10-18 Thread puercoespin
Thanks for the information. But in my db, booleans were stored as "True" or "False". No 'T' or 'F'. May be because a default = False in my model? Anyway, when save my db to csv, booleans are saved as False/True, and Postgesql give me an error of "too many chars... " Thanks again.

[web2py] response.title display html entities in the browser tabs

2013-12-12 Thread puercoespin
Hello With: response.title=XML('Something') in the body, its display "Something" with h3 font, but in the browser tabs, displays : Something Are there any way to display in the tabs only the text, not html? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] pg8000 strange errors

2014-02-08 Thread puercoespin
Yes, may be its a little strange, but when google bot try to spider my web, my web downs, with a three differents pg8000 errors: InternalError: Unexpected response msg ... InternalError: Unexpected response msg ... InternalError: Unexpected response msg An exemple of the errors: Traceb

[web2py] Re: Web Editor Blank Screen

2014-04-03 Thread puercoespin
I have a similar problem... With the latest web2py_src (2.9.5), in localhost the web editor works as expected, but in my host, when i try to edit any file, i have the blank screen. Looking into javascript console from chrome developers tool, displays a lot of 404: "" GET https://

[web2py] Re: Web Editor Blank Screen

2014-04-03 Thread puercoespin
True, ), ) El jueves, 3 de abril de 2014 21:30:51 UTC+2, Dave S escribió: > > > > On Thursday, April 3, 2014 11:46:15 AM UTC-7, puercoespin wrote: >> >> I have a similar problem... >> >> With the latest web2py_src (2.9.5), in localhost the web edito

[web2py] Re: Web Editor Blank Screen

2014-04-03 Thread puercoespin
ersioning static files in web2py? Thanks El jueves, 3 de abril de 2014 22:33:33 UTC+2, puercoespin escribió: > > routes.py > > routers = dict( > > # base router > BASE=dict( > default_application='egasolineras', > appli

[web2py] Mozilla Persona (Simple, privacy-sensitive single sign-in) and Web2py

2014-04-07 Thread puercoespin
I think Mozilla Persona (http://www.mozilla.org/en-US/persona/) may be an interesting sign in technology in web2py. There are lot of plugins for python frameworks, in https://developer.mozilla.org/en-US/Persona/Libraries_and_plugins, may be an web2py plugin would be interesting. What do you th