[web2py] error_warpper in inline form

2013-04-30 Thread Annet
I have an inline form: form=SQLFORM.factory( Field('tag',length=128,requires=[IS_IN_DB(db,'tag.name','%(name)s',error_message='Tag not in database')]), Field('locality',length=64,requires=[IS_IN_DB(db,'locality.name','%(name)s',error_message='Localityniet in database')]),

[web2py] Re: Query Not Supported on GAE

2013-04-30 Thread Lio
Dear Massimo, * * Is it a possible solution to retrieve all records in the table for Datastore and store it, then perform the search on this stored data object (by means of row.field.index('query_string') maybe?)? Furthermore, when target record(s) is found, is it possible present them with

[web2py] Re: error_warpper in inline form

2013-04-30 Thread Niphlod
yep, with hideerror=True and you checking for the right form.error, putting that in response.flash . http://web2py.com/books/default/chapter/29/07?search=hideerror On Tuesday, April 30, 2013 8:27:56 AM UTC+2, Annet wrote: I have an inline form: form=SQLFORM.factory(

[web2py] big-id and postgresql (integer out of range)

2013-04-30 Thread Johann Spies
After running into a 'integer out of range' problem in Postgresql I was expecting this addition to my table definition to change the postgresql definition of the id-field to 'bigint' but it did not happen: db.define_table('rkeywords', Field('id', type = 'big-id'), but this did

[web2py] Re: big-id and postgresql (integer out of range)

2013-04-30 Thread Niphlod
the recommended way to use big-something is DAL(bigint_ID=True), however, I'm not sure it will trigger a migration. I'd certainly avoid migrating the PK to another type while the table is full of zillions rows. Are you trying to migrate an existing table or you're creating it brand new ? On

[web2py] About default=auth.user_id

2013-04-30 Thread António Ramos
Hello i have this Field('created_by',db.auth_user,default=auth.user.id) *1º Question * I have a custom form and if i do not exlicit code this span class=label labelCriado por/spandiv{{=form.custom.widget.created_by}}/div i cannot save it. Form errors? Its a default and i dont want to see it.

Re: [web2py] how can i login without using form?

2013-04-30 Thread Michele Comitini
You can use oauth1.0a or oauth2 authentication that comes with web2py; see in gluon/contrib/login_methods and the web2py book. mic 2013/4/30 Giuseppe Marchetti singforbittere...@gmail.com hi all.. i m new on web2py. i try to get some values from twitter to my database.. the problem is i got

[web2py] Re: big-id and postgresql (integer out of range)

2013-04-30 Thread Johann Spies
On Tuesday, 30 April 2013 11:19:53 UTC+2, Niphlod wrote: the recommended way to use big-something is DAL(bigint_ID=True), however, I'm not sure it will trigger a migration. I'd certainly avoid migrating the PK to another type while the table is full of zillions rows. Are you trying to

[web2py] Re: big-id and postgresql (integer out of range)

2013-04-30 Thread Johann Spies
On Tuesday, 30 April 2013 11:19:53 UTC+2, Niphlod wrote: the recommended way to use big-something is DAL(bigint_ID=True), however, I'm not sure it will trigger a migration. I have tested it on another database and it does not migrate. So I will have 'ALTER TABLE ALTER COLUMN' in the

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
So, let me see if I get this straight - I'll describe how I understand things, so stop me when I start speaking non-sense: Web2py's DAL is stateless, and hens is not designed for object-oriented style of data-modeling. Whenever you create an object to represent a record, you are creating a

[web2py] Re: big-id and postgresql (integer out of range)

2013-04-30 Thread Niphlod
@all: correct me if I'm wrong... web2py shouldn't complain at all if your underlying model returns a bigint instead of a int because python code in DAL won't go have out of range issues (they're all stored as 'long', I think). What bigint_id does is instructing the database to create a column

Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Michele Comitini
I love the DAL since I find it's functional programming approach very lean without the need to switch back and forth from OO to relational reasoning :-) Moving from a mapping object (the row) to a complex custom object is much easier than it seems at the python level. ORMs on the other side tend

[web2py] Re: Jquery mobile module not working

2013-04-30 Thread Matt Johnson
If you got the download from http://web2py.com/plugins/plugin_jqmobile/about I found that when I did it was just not working, also resulting in a blank page. My solution was to revert back to the original files downloaded with web2py (as they were included anyway) -Matt On Tuesday, 2 April

[web2py] Re: custom widget dont work

2013-04-30 Thread Alan Etkin
the 2 first i could put to work, using the code below, but for some reason, the value of json input dont save to database. What i am missing? Have you tried to inspect the input client or server side? How does it look like? Does de form return any error? -- --- You received this

Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Niphlod
put them on the roadmap ^_^ as for 3. it's just a matter of finding the right syntax for every db engine. I'm not sure about 4., it's available right now with migrate=False ? On Tuesday, April 30, 2013 12:50:04 PM UTC+2, Michele Comitini wrote: I love the DAL since I find it's functional

Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
The following blog entry shares much of my idea of ORM in real applications with large http://seldo.com/weblog/2011/06/15/orm_is_an_antipattern I read this article about a week ago. It is interesting, but I find 2 fundamental problems with it - it assumes premises that are termed as an

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Anthony
This is nice, but you're still talking about very general features. It would be more helpful if you could explain why we need those features. Perhaps you could show in SQLA how you would specify and interact with a particular data model, and then explain why you think that is better/easier

Re: [web2py] Re: Error Pages via AutoRoutes

2013-04-30 Thread Anthony
I think autoroutes.py was developed before the newer parameter-based rewrite systemhttp://web2py.com/books/default/chapter/29/04#Parameter-based-system-- you might find it easier to switch to that. On Monday, April 29, 2013 9:25:33 PM UTC-4, Nikolay wrote: Hi Massimo, I use this. Correct,

[web2py] Re: About default=auth.user_id

2013-04-30 Thread Anthony
Field('created_by',db.auth_user,default=auth.user.id) *1º Question * I have a custom form and if i do not exlicit code this span class=label labelCriado por/spandiv{{=form.custom.widget.created_by}}/div i cannot save it. Form errors? Its a default and i dont want to see it. Do i

Re: [web2py] how can i login without using form?

2013-04-30 Thread Giuseppe Marchetti
thanx for ur answer Michele. but i cant run oauth1.0a and oauth2.0 that comes with web2py for twitter login. but i found rauth ( https://github.com/litl/rauth ) it works pretty good. and it s integrated with my db. but i cant run login process.. thanx for ur opinion.. 30 Nisan 2013 Salı

Re: [web2py] Re: About default=auth.user_id

2013-04-30 Thread António Ramos
2013/4/30 Anthony abasta...@gmail.com db.auth_user._format = '%(first_name)s %(last_name)s' Solved. Thank you Anthony -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send

[web2py] Re: error_warpper in inline form

2013-04-30 Thread Annet
Thanks for your reply, problem solved. Kind regards, Annet -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more

[web2py] Re: Query Not Supported on GAE

2013-04-30 Thread Massimo Di Pierro
On Tuesday, 30 April 2013 01:56:12 UTC-5, Lio wrote: Dear Massimo, * * Is it a possible solution to retrieve all records in the table for Datastore and store it, then perform the search on this stored data object (by means of row.field.index('query_string') maybe?)? Furthermore, when

[web2py] Re: Jquery mobile module not working

2013-04-30 Thread Massimo Di Pierro
Use the plugin wiki with comes with web2py (it is in the admin app). On Tuesday, 30 April 2013 05:38:55 UTC-5, Matt Johnson wrote: If you got the download from http://web2py.com/plugins/plugin_jqmobile/about I found that when I did it was just not working, also resulting in a blank page.

[web2py] Problems with route.py

2013-04-30 Thread José Manuel López
Hi, I have this routes in route.py routes_in = ( ('/hoteles', '/hoteluser/index'), ) routes_out = ( ('/hoteluser/index', '/hoteles'), ) It's a very simple test where I want that an URL like this: * http://localhost:8088/myapp//hoteluser/index* looks like this *

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Massimo Di Pierro
Yes. In other words: we do not try introduce problems for the purpose of solving them. ;-) In my opinion, the job of keeping a consistent state is with the database (and its acid model) not with the API. On Tuesday, 30 April 2013 05:11:56 UTC-5, Arnon Marcus wrote: So, let me see if I get

[web2py] add items in navbar ul.. mode=dropdown

2013-04-30 Thread ctrlSoft
hi, how to add items in ul class=dropdown-menu style=display: block; ... ... ... /ul generated by auth.navbar(mode=dropdown), -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it,

[web2py] Re: add items in navbar ul.. mode=dropdown

2013-04-30 Thread ctrlSoft
by default i have, login, logout register, i wish i could append some links only if auth.user -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Michele Comitini
2013/4/30 Niphlod niph...@gmail.com put them on the roadmap ^_^ as for 3. it's just a matter of finding the right syntax for every db engine. I'm not sure about 4., it's available right now with migrate=False ? 4. migrate False is on the DDL side and you are right about that, but I'd like it

[web2py] Re: add items in navbar ul.. mode=dropdown

2013-04-30 Thread Anthony
The auth.navbar() produces an HTML helper DOM, so you can manipulate it as usual: navbar = auth.navbar(mode='dropdown') if auth.user: navbar.element('ul.dropdown-menu').components.extend([LI('Item 1'), LI('Item 2'), ...]) Anthony On Tuesday, April 30, 2013 11:22:56 AM UTC-4, ctrlSoft

[web2py] Internal mail system

2013-04-30 Thread Alex Glaros
Is there already built in web2py, or are there any examples of a web2py internal mail system such as in LinkedIn or Facebook, where users send messages to each other? For example, in LinkedIn or Facebook, you can send a private email to someone using LI's or FB's proprietary system, which

Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Niphlod
so just a read_me_only kind of check where if you even try to load a record in an edit form web2py complains ? or just complain before any insert(), update() is tried on any read_me_only fake table (i.e. do those always in a try:except block or do before an assert is_not_fake before write

Re: [web2py] how can i login without using form?

2013-04-30 Thread Michele Comitini
Hi Giuseppe, I do not know that library, but seems to me you can use oauth2 auth from web2py and then use the auth token to work with rauth. The following is what I would try (untested) by having read https://rauth.readthedocs.org/en/latest/api/#oauth-2-0-sessions. If it goes to no good, you

Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Michele Comitini
2013/4/30 Niphlod niph...@gmail.com so just a read_me_only kind of check where if you even try to load a record in an edit form web2py complains ? or just complain before any insert(), update() is tried on any read_me_only fake table (i.e. do those always in a try:except block or do before

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
On Tuesday, April 30, 2013 3:42:23 PM UTC+3, Anthony wrote: This is nice, but you're still talking about very general features. It would be more helpful if you could explain why we need those features. Perhaps you could show in SQLA how you would specify and interact with a particular data

Re: [web2py] how can i login without using form?

2013-04-30 Thread Giuseppe Marchetti
hi Michele, thanx for ur time to help me.. but it doesnt work.. :( my code (a part from default.py ) : from rauth import OAuth1Service twitter = OAuth1Service( name='twitter', consumer_key='sgpDtqbVKlYeV8zXmaAd6A',

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Anthony
What are the benefits? You should ask? Well, there are performance-improvements with the caching mechanism, and with the aggregation of operations - certain change-operations are only pushed to the transaction-view, when they are actually needed, or at the end of the transaction. I

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Derek
Agreed, you'd never do it this way. First of all, you have the ID already, so why would you use 'getItemByName'. Second, the getItemByName is flawed, it will return a set, not a single row. Third, if you are selecting anything, before you perform an action on it, you should at least verify

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Anthony
And keep in mind that the ORM alone in SQLA is over 20,000 lines of code (by contrast, the DAL is now around 10,000 loc). Even if we could get away with a modest fraction of that, this would be a significant undertaking. So, we really need compelling evidence that there are common use cases

Re: [web2py] Re: Bootstrap typeahead

2013-04-30 Thread Richard Vézina
The one include in web2py is not ok? There is also the one of s-cubism : http://dev.s-cubism.com/plugin_anytime_widget Richard On Sat, Apr 27, 2013 at 8:35 AM, Annet anneve...@googlemail.com wrote: Hi Richard, I'll have a look at your custom type ahead widget. I only use the auto

[web2py] Re: Menu item without URL

2013-04-30 Thread Anthony
Yeah, you'd have to apply your own CSS to get it to look right in that case. Instead, why don't you use the first method: ('Item 3', False, None, [('Subitem1', False, URL(...)), ('Subitem2', False,URL (...))]) That will look and behave properly, but clicking the Item 3 link won't do anything.

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
I admit it is a very silly example, I didn't give much thought to it - I just looked for something to exemplify a problem that might occur when no identity-mapping exists. The fact that I could not find a better example, is not a testament to say that such scenarios don't (or can't) occur.

[web2py] Script to create a fresh Web2py development env

2013-04-30 Thread Vinicius Assef
If anyone find it useful, here is a link to a script creates a fresh web2py development environment. I made it because each web2py project I start, I create a new virtualenv. So, each of my projects has its own web2py instance inside it. So, enjoy it:

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
Here is a really awesome talk about SALQ's Core/ORM dichotomy, featuring diagrams that overview the architecture of the ORM, and how it implements the Unit-of-Work pattern: http://lanyrd.com/2011/pygotham/shpkm/#link-fkfb If you take into account what's said in this talk - that basically the

Re: [web2py] how can i login without using form?

2013-04-30 Thread Michele Comitini
Hi Giuseppe, That is not how the web2py auth framework is designed to be used. There is some old code here but it should work on stable: https://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg%2Fapplications%2FhelloTwitter

Re: [web2py] how can i login without using form?

2013-04-30 Thread Michele Comitini
I wrote: I think it is very similar in scope to what you want to achieve. See it running here: http://2-etti.appspot.com/ Ops sorry GAE changed something so it is not running anymore :-/ -- --- You received this message because you are subscribed to the Google Groups web2py-users

Re: [web2py] how can i login without using form?

2013-04-30 Thread Giuseppe Marchetti
Thank you for your interest Michele.. But i examinated your code for etti from code google but it doesnt work on web2py.. i guess it works on old version web2py.. i just wonder how i can set login flag.. can i send u mail about my screenshots? i run rauth and it works great.. but it doesnt set

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
Hi Massimo, You should really watch this lecture: http://lanyrd.com/2011/pygotham/shpkm/#link-fkfb I think you will like it, even if you son't like ORMs. It shows some architectural diagrams that you might find interesting, for both the Core layer and ORM layer of SQLAlchemy. I think this would

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Massimo Di Pierro
I will watch it asap. Anyway, I am not trying to discourage you or oppose to it. If you have resources and want to start building something like this, you have all my support. Some people may love it. What I cannot promise is that it will be included in web2py until I see a real benefit. On

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-30 Thread Mariano Reingart
Which font do you want to include? The font pack is 15MB, I don't know if it could be included with web2py. Also, the problem is that no one is complete (you need several fonts to cover west / east languages) https://pyfpdf.googlecode.com/files/fpdf_unicode_font_pack.zip BTW, thanks for you

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-30 Thread Jurgis Pralgauskis
Which font do you want to include? DejaVu - I guess it covers western languages.. (could be withouth bold/italics to save space) Another one could be for eastern chars (buy I don't know anything about them...) I gave you contributor access Thanks :) On Wed, May 1, 2013 at 12:22 AM, Mariano

Re: [web2py] how can i login without using form?

2013-04-30 Thread Michele Comitini
Can you send the error you are getting? 2013/4/30 Giuseppe Marchetti singforbittere...@gmail.com Thank you for your interest Michele.. But i examinated your code for etti from code google but it doesnt work on web2py.. i guess it works on old version web2py.. i just wonder how i can set

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Derek
Have you not tried just importing sqla in your 0.py model, and writing your models and code as you see fit? You can certainly bypass the DAL if you want. On Tuesday, April 30, 2013 1:49:53 PM UTC-7, Arnon Marcus wrote: Hi Massimo, You should really watch this lecture:

Re: [web2py] how can i login without using form?

2013-04-30 Thread Giuseppe Marchetti
I dont get any error.. i just want to be log in.. i get all values from twitter and write to my database. but it doesnt say you r login but all the value got writen to the database.. though the database record, the person cannot be logged in.. i examinated the etti.. but it doesnt work.. cuz it

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Anthony
If you take into account what's said in this talk - that basically the ORM and the CORE in SQLA are 2 separate beasts - than if follows what I've been saying here, that the web2py-DAL is equivalent just to the CORE, and has no features that the ORM provides whatsoever. I'm not sure that

[web2py] Re: Anyone used WHOOSH as search engine with web2py?

2013-04-30 Thread Brian Erickson
Thanks, Massimo. (by the way, my project is to write a program in the style of http://tiddlywiki.com/ in web2py.) Any full text search would work for my needs. Is there a better (simpler) option you could recommend? On Monday, April 29, 2013 12:20:12 AM UTC-4, Massimo Di Pierro wrote: This is

[web2py] Re: smartgrid: how to disable repeating parent ID in child record

2013-04-30 Thread Alex Glaros
Am returning to this question as I have a better description of what I'm looking for. The example is the owner's list of all shopping purchases in a store for one day. George - 10 coffee cups 1 blender 3 boxes of laundry soap Henry -2 napkin holder Customer

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
On Tuesday, April 30, 2013 2:57:34 PM UTC-7, Derek wrote: Have you not tried just importing sqla in your 0.py model, and writing your models and code as you see fit? You can certainly bypass the DAL if you want. I know that, but well, you see, there lies the problem - I DON'T want... I

[web2py] Re: Internal mail system

2013-04-30 Thread Alan Etkin
For users of an app, is there already built in web2py, or are there any examples of a web2py internal mail system such as in LinkedIn or Facebook, where users send messages to each other within the app? You can use the builtin IMAPAdapter to fetch messages filtered by a given criteria

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Arnon Marcus
On Tuesday, April 30, 2013 3:18:50 PM UTC-7, Anthony wrote: If you take into account what's said in this talk - that basically the ORM and the CORE in SQLA are 2 separate beasts - than if follows what I've been saying here, that the web2py-DAL is equivalent just to the CORE, and has no

Re: [web2py] Re: Error Pages via AutoRoutes

2013-04-30 Thread Nikolay
Massimo, As I say before, my English is not very good)) But it is ok, Anthony, Many thanks for this! I did not know of this system, it works with onerror routing. Thanks for your help in this matter. -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-30 Thread Anthony
If you take into account what's said in this talk - that basically the ORM and the CORE in SQLA are 2 separate beasts - than if follows what I've been saying here, that the web2py-DAL is equivalent just to the CORE, and has no features that the ORM provides whatsoever. I'm not sure