[web2py] Re: web3py & lifetime of web2py

2011-10-23 Thread Gour
On Sun, 23 Oct 2011 19:59:14 -0300 Mariano Reingart wrote: > I didn't have time to work on it but I expect for December to have a > full version of web2py seamless working on py3k. Do you work with the web2py's trunk? Sincerely, Gour -- While contemplating the objects of the senses, a perso

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread TheSweetlink
Thank you all for your help. I was able to resolve the problem quirky as it may be but here we go. For science!!! To get a type='list:string' to fail validation if none passed from your SQLFORM.factory form: 1) Used an onvalidation=... in my form.accepts(...) / process(...).accepted / validate(.

[web2py] password_two

2011-10-23 Thread lucas
hello one and all, i think i found a inconsistency in the default auth register form. the tags for the password_two fields don't have the class references. so like password has ...Password:for the input widgetfor the comment... but the class references are not in there for the password_two whi

[web2py] Re: xml view of dict() with attributes

2011-10-23 Thread KMax
So, with return dict() and generic.xml view is impossible to produce attribute in a xml tag? Just to stop looking in this way for solution. Thanks Massimo. On 23 окт, 22:53, Massimo Di Pierro wrote: > You can make a myxml.html view that contains: > > > >    {{=itemtitle}} >    {{=itemvalue}} >

[web2py] elfinder integrated into web2py as a plugin?

2011-10-23 Thread ron_m
It looks like elfinder would be a very nice implementation of a file manipulation area open to users for an application I am working on. I found this discussion about elfinder which is over a year old https://groups.google.com/d/topic/web2py/Ove0jTJn_Vk/discussion where in the last posting a Ma

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread ニコノコ
Eeugh. Sorry for the ugly suggestion. Post validation could def person_processing(form): if len(form.vars.field or '')<1: form.errors.field= 'Select one.' On Oct 24, 10:32 am, Vasile Ermicioi wrote: > > How about:  db.table.field.requires = IS_LENGTH(1) > > that will limit the field t

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread ニコノコ
not if the field is list:string On Oct 24, 10:32 am, Vasile Ermicioi wrote: > > How about:  db.table.field.requires = IS_LENGTH(1) > > that will limit the field to one character, not to one value from set

[web2py] Re: Complex CRUD Forms Examples with Web2py?

2011-10-23 Thread ニコノコ
Checkout the solidForm plugin from http://dev.s-cubism.com/web2py_plugins On Oct 24, 4:18 am, BrendanC wrote: > Hi > Some time ago I developed a CRUD demo app in Django that used some some > complex forms. Here's an example: > > http://theludditegeek.com/prescreen/1 > > I'd like to convert this t

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread TheSweetlink
Hello Vasile, I tried that and the IS_NOT_EMPTY() doesn't take. I should really test if the IS_IN_SET() is working properly too but I suspect that it is. I need to find out how I can override that behavior I described above from the book. Apparently multiple=true allows IS_IN_SET() to pass vali

[web2py] Re: identity column with web2py

2011-10-23 Thread tom h
PS, I could change the default types in PostgreSQL adapter or whatever other adapter I'm using, to be BIGSERIAL and BIGINT for id and reference id as opposed to SERIAL and INTEGER. But this is something I'd like to control on a table level, not on a database connection level. I could extend the a

Re: [web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread Vasile Ermicioi
> > How about: db.table.field.requires = IS_LENGTH(1) that will limit the field to one character, not to one value from set

[web2py] Re: grid custom button icons

2011-10-23 Thread ニコノコ
I create new buttons like this in the grid: links = [lambda row: A('X', _href=URL(args=["view", db.person, row.id] ))] How should I specify an icon for the new button? On Oct 19, 10:04 pm, Bruno Rocha wrote: > Herehttps://github.com/michenriksen/css3buttonsyou can find a list of all > suported

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread ニコノコ
How about:  db.table.field.requires = IS_LENGTH(1) On Oct 22, 12:35 am, TheSweetlink wrote: > I have a SQLFORM.factory that is respecting IS_NOT_EMPTY() for a field > with type='string' but not respecting it for a diffirent field of > type='list:string'. > > If the list:string type field is left e

[web2py] identity column with web2py

2011-10-23 Thread tom h
Hi, I've recently started to use web2py, pretty new to it and python also, and I'd like to change the identity field that are automatically created to be decimal(13,0) instead of integer. Basically I would not like to deal with identity columns overflowing when it reaches 10**9. I mean, I'm only

Re: [web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread Vasile Ermicioi
perhaps db.table.field.requires = [IS_NOT_EMPTY(), IS_IN_SET(...)]

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread TheSweetlink
Ugh, just realized, right from the online book: " Note that when multiple=True, IS_IN_SET will accept zero or more values, i.e. it will accept the field when nothing has been selected. " How can I have multiple=true AND require the field? Is that possible? David TheSweetlink wrote: > Thank yo

[web2py] Re: Complex CRUD Forms Examples with Web2py?

2011-10-23 Thread Anthony
It sounds like you already know about building custom forms (http://web2py.com/book/default/chapter/07#Custom-forms). If you need to do custom error displays, also check out http://web2py.com/book/default/chapter/07#Hide-Errors. Server-side DOM manipulation might help as well (see http://web2p

Re: [web2py] Re: Getting Too many tables error on GAE , HELP!

2011-10-23 Thread howesc
it is very much a mindset. joins are expensive no matter what system you use (well they are not free, though still very fast on a relational system), so when they build GAE which is supposed to be optimized for web page views, they disallowed joins. i have a love/hate relationship with it!

[web2py] Re: dal aggregation sum fields None

2011-10-23 Thread Anthony
On Sunday, October 23, 2011 5:14:17 PM UTC-4, Massimo Di Pierro wrote: > > I am not happy with extra. > > Currently we have three mechanisms to deal with "extra" fields. > table._extra, lazy virtual fields, links in grid/smartgrid. None of > them are undocumented in the book which means that for

[web2py] Re: Help making nav menu work please!

2011-10-23 Thread Anthony
On Sunday, October 23, 2011 6:47:45 PM UTC-4, noremac wrote: > > > > On Oct 24, 7:42 am, Christopher Steel wrote: > > Are you looking to generate navigation menu's using table data? > > > > If so, you can try a search for web2py "generate menu". Make sure to > check > > out the web2pyslices a

[web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-10-23 Thread Robert Clark
Hi Massimo Here are the steps to reproduce this problem in web2py 1.99.2 (these steps worked fine on 1.98.x versions) 1) In web2py admin create "New simple application" called "foo" 2) Add to db.py: auth.settings.allow_basic_login = True 3) Decorate call() with @auth.requires_login in defau

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread TheSweetlink
Thank you Massimo, The expected behavior is for the 'list:string' field to be a required field in order for the form to pass validation. It is currently a jquery multi-select checkbox dropdown created from an IS_IN_SET(...zero=None) validator on the same field (which works perfectly to my knowled

[web2py] Re: Exceeding memory limits in webfaction

2011-10-23 Thread Jose
On 23 oct, 19:53, Massimo Di Pierro wrote: > Can you try run your app locally with 1.99.2 and see if you can > reproduce any memory problem. What version did you upgrade from? I do not remember, but I'm sure it was a version of more than 1 year. Jose

Re: [web2py] Re: web3py & lifetime of web2py

2011-10-23 Thread Mariano Reingart
Ovidio: I'm working in a python 3 upgrade (web2py-py3k), you can take a look at: http://code.google.com/r/reingart-web2py/source/browse/?name=py3k Some screenshots: web2py-py3k: welcome app running python 3! http://pic.twitter.com/BR5PqAJ8 web2py-py3k: after 2to3 and 1 hour of minor fixes, web

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread Massimo Di Pierro
Thanks for the reminder. What is the expected behavior? 'list:string' only accepts strings that are not empty. Are you trying to have at least one item in the list? We do not have a validator to do that but can make one: class IS_LIST_SIZE(Validator): def __init__(self, min=0,max=10,error_mes

[web2py] Re: Exceeding memory limits in webfaction

2011-10-23 Thread Massimo Di Pierro
Can you try run your app locally with 1.99.2 and see if you can reproduce any memory problem. What version did you upgrade from? Di you have also with 1.98.2? I cannot think of any change that results in more memory usage, actually the opposite. Massimo On Oct 23, 5:31 pm, Jose wrote: > Hello >

[web2py] Re: Help making nav menu work please!

2011-10-23 Thread noremac
On Oct 24, 7:42 am, Christopher Steel wrote: > Are you looking to generate navigation menu's using table data? > > If so, you can try a search for web2py "generate menu". Make sure to check > out the web2pyslices as well, I think one of the very first slices was > related to creating dynamic men

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-23 Thread TheSweetlink
I don't wish to irritate rather just curious to know if anyone else can replicate this. A SQLFORM.factory with an empty field of type='list:string' is submitting as passed when an IS_NOT_EMPTY() validator is used in any and every way possible. The very same .factory has a field type string where

[web2py] Exceeding memory limits in webfaction

2011-10-23 Thread Jose
Hello I have some applications in webfaction (more than 2 years). I recently upgraded web2py to version 1.98.2 and then to 1.99.2. What I noticed is that since the first update errors began to appear: 502 – Bad Gateway I reported this to webfaction and they answered that it is because it excee

[web2py] Re: Help making nav menu work please!

2011-10-23 Thread Christopher Steel
Are you looking to generate navigation menu's using table data? If so, you can try a search for web2py "generate menu". Make sure to check out the web2pyslices as well, I think one of the very first slices was related to creating dynamic menus.

[web2py] Re: dal aggregation sum fields None

2011-10-23 Thread Massimo Di Pierro
I am not happy with extra. Currently we have three mechanisms to deal with "extra" fields. table._extra, lazy virtual fields, links in grid/smartgrid. None of them are undocumented in the book which means that for none of them we promise backward compatibility. Massimo On Oct 23, 2:27 pm, Antho

Re: [web2py] Re: web3py & lifetime of web2py

2011-10-23 Thread Ovidio Marinho
Massimo , this means that one version may be next Web3py ? Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro Bra

[web2py] Re: web3py & lifetime of web2py

2011-10-23 Thread Gour
On Sun, 23 Oct 2011 08:55:42 -0700 (PDT) Massimo Di Pierro wrote: > We do not have a web2py roadmap but you can assume the basic logic > will stay the same. :-) > Dal and templates will stay the same. :-)) > helpers will stay the same. :-))) > Forms and form handling we do not know. OK.

[web2py] Complex CRUD Forms Examples with Web2py?

2011-10-23 Thread BrendanC
Hi Some time ago I developed a CRUD demo app in Django that used some some complex forms. Here's an example: http://theludditegeek.com/prescreen/1 I'd like to convert this to web2py. AFAIK the standard web2py forms/SQLform features (and related error handling) are based on the use of a single d

[web2py] Re: dal aggregation sum fields None

2011-10-23 Thread Anthony
On Sunday, October 23, 2011 3:16:56 PM UTC-4, Massimo Di Pierro wrote: > > You are right. I misunderstood the issue. > Do you think assignments to _extra should be enabled (transparently, not by directly hacking the _extra dictionary), or should _extra remain read-only? The current behavior is a

[web2py] Re: [GAE]BadValueError: Incomplete key found for reference property

2011-10-23 Thread Massimo Di Pierro
Before we spend time in something that may have been fixed already. Can you try the latest web2py? can you also remove the list of fields in select(...) since GAE does not support that? On Oct 23, 12:20 pm, Phyo Arkar wrote: > Massimo , can you check is that a bug of web2py? > > I got BadValueErr

[web2py] Re: dal aggregation sum fields None

2011-10-23 Thread Massimo Di Pierro
You are right. I misunderstood the issue. On Oct 23, 11:21 am, Anthony wrote: > On Sunday, October 23, 2011 11:49:31 AM UTC-4, Massimo Di Pierro wrote: > > > lines[cash_price]=lines(cash_price) or 0   > > I don't think that will solve the problem. That will add a new > 'SUM(orderline.cash_price)'

Re: [web2py][GAE]BadValueError: Incomplete key found for reference property

2011-10-23 Thread Phyo Arkar
Massimo , can you check is that a bug of web2py? I got BadValueError , using 1.98.2 version on GAE Controller is very simple : def get_items(): response.generic_patterns = ['json'] query=(db.item.id>=0) return response.json(db(query).select(db.item.id,db.item.name)) That

[web2py] Re: auth_user

2011-10-23 Thread Anthony
On Sunday, October 23, 2011 11:20:40 AM UTC-4, lucas wrote: > > yes, putting the requires under the field worked great, thanx. > > well, i tried to just change the natural/ordinal order of the columns/ > fields in the database (postgresql in my case) but that didn't work. > Right. The forms will

[web2py] Re: dal aggregation sum fields None

2011-10-23 Thread Anthony
On Sunday, October 23, 2011 11:49:31 AM UTC-4, Massimo Di Pierro wrote: > > lines[cash_price]=lines(cash_price) or 0 > I don't think that will solve the problem. That will add a new 'SUM(orderline.cash_price)' key to lines rather than updating lines._extra['SUM(orderline.cash_price)']. However

[web2py] Re: web2py crud and dealing with input

2011-10-23 Thread Massimo Di Pierro
Now sure I fully understand the pproblem but your first controller/ view should probably be: # controller def index(): rows = db(db.domains.created_by==auth.user_id).select() return dict(rows=rows) # view {{extend 'layout.html'}} Manage your domain names {{for row in rows:}} {{=LI(A(

[web2py] Re: web3py & lifetime of web2py

2011-10-23 Thread Massimo Di Pierro
We do not have a web2py roadmap but you can assume the basic logic will stay the same. Dal and templates will stay the same. helpers will stay the same. Forms and form handling we do not know. Bottom line: very relevant. On Oct 23, 1:50 am, Gour wrote: > There is some talk that web3py will proba

[web2py] Re: xml view of dict() with attributes

2011-10-23 Thread Massimo Di Pierro
You can make a myxml.html view that contains: {{=itemtitle}} {{=itemvalue}} On Oct 23, 5:09 am, KMax wrote: > Hello, >   Please help with exporting some dict to .xml view with attributes > inside tags. > > Like: > > > >    Title >    Value > > > I am talking about "hello='world'" in

[web2py] Re: dal aggregation sum fields None

2011-10-23 Thread Massimo Di Pierro
lines[cash_price]=lines(cash_price) or 0  On Oct 22, 7:50 am, Anthony wrote: > On Saturday, October 22, 2011 7:47:08 AM UTC-4, apple wrote: > > > I am summing some data using the DAL: > >       cash_price = db.orderline.cash_price.sum() > >       lines = db(db.orderline.order_ == id).select(cash_

[web2py] Re: CouchDB & NoSQLAdapter.represent for datetime

2011-10-23 Thread Massimo Di Pierro
This is very helpful. I was expecting this problem. How are datetimes supposed to be stores in CouchDB? On Oct 22, 3:13 am, "H.C. v. Stockhausen" wrote: > Hi > > I am just testing the CouchDB Adapter and it fails when registering a > new user. I tired both w2py's default auth and janrain. The pro

[web2py] Re: Alternative to Transactions

2011-10-23 Thread Massimo Di Pierro
If you run on GAE you need to explicitly import and call run_in_transactions if you want to use GAE transactions. On Oct 21, 10:56 pm, Sathvik Ponangi wrote: > Hello, > >  I'm using web2py on Google AppEngine (SDK v1.5.5) and I'm trying to port a > script here which uses 'transactions'. > In wha

[web2py] Re: Looking for people to help test web2py support in New Relic.

2011-10-23 Thread Massimo Di Pierro
Hello Graham, This is exciting. Hope other users can jump in and help more. It think what you may be looking for is in {{=response.toolbar}} which displays among other things: db._timings This variable stores each SQL query and the time in seconds to completion. Massimo On Oct 21, 8:

[web2py] Re: auth_user

2011-10-23 Thread lucas
yes, putting the requires under the field worked great, thanx. well, i tried to just change the natural/ordinal order of the columns/ fields in the database (postgresql in my case) but that didn't work. how can i direct the register/profile of auth to another view and how do i customize that view

[web2py] web2py crud and dealing with input

2011-10-23 Thread Jimmy Stewpot
Hello, I am new to web2py. I just started a new app to become more familiar with the technology. So far I have the following. # controller def index(): form, rows = crud.select(db.domains, query=(db.domains.created_by==auth.user_id)) return dict(rows=rows) # view {{extend 'layout.html'}}

[web2py] Re: auth_user

2011-10-23 Thread Anthony
On Sunday, October 23, 2011 9:33:34 AM UTC-4, lucas wrote: > > hello one and all, > > playing with auth_user. trying to follow the manual with a bit of > modification, thinking: > > auth = Auth(db)# authentication/ > authorization > auth.settings.extra_fields['

Re: [web2py] web3py & lifetime of web2py

2011-10-23 Thread Ovidio Marinho
I believe that there will be versions of web2py with python 3, so far the project had been with python web2py 2.xx. There is nothing to fear as the founder of Masimonot discontinue web2py. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com

[web2py] auth_user

2011-10-23 Thread lucas
hello one and all, playing with auth_user. trying to follow the manual with a bit of modification, thinking: auth = Auth(db)# authentication/ authorization auth.settings.extra_fields['auth_user'] = [ Field('prefix_title', length=12, comment='Enter your Name Pr

[web2py] Re: Minor Cosmetic Issue

2011-10-23 Thread Anthony
I see -- the pre-login navbar was fixed, but still a missing space in the post-login version. I submitted a patch to fix it. Anthony On Sunday, October 23, 2011 9:19:49 AM UTC-4, horridohobbyist wrote: > > I'm using the latest stable version, 1.99.2. > > R > > On Oct 23, 9:17 am, Anthony wrot

[web2py] Re: Web2py and Rest

2011-10-23 Thread Anthony
This will be in the updated book soon, but for now: http://www.reddit.com/r/programming/comments/g5hxq/web2py_trunk_has_a_new_restful_api_that_writes_db/c1l2ykg http://vimeo.com/21133657 On Friday, October 21, 2011 3:53:34 PM UTC-4, BrendanC wrote: > > I know this has probably come up before, but

[web2py] Re: Minor Cosmetic Issue

2011-10-23 Thread Anthony
What version are you using? I think this has been fixed.

[web2py] Re: Minor Cosmetic Issue

2011-10-23 Thread horridohobbyist
I'm using the latest stable version, 1.99.2. R On Oct 23, 9:17 am, Anthony wrote: > What version are you using? I think this has been fixed.

[web2py] Re: DAL total record count

2011-10-23 Thread lucas
thank you to both of you. i am learning this stuff and i always have to start at the base. lucas

[web2py] Re: HersPOS - New Version released 0.03 Web2py + Qooxdoo POS

2011-10-23 Thread Phyo Arkar
i also released w2p appliance , can you guys check it out if it works or not? Please note if you install w2p appliance application name needs to be changed to HersPOS (Case Sensitive) Thanks. Phyo. On 10/23/11, Phyo Arkar wrote: > Link : http://code.google.com/p/herspos > Demo : http://herspos

Re: [web2py] Re: Qooxdoo + Web2py Based AJAX POS system, Released!

2011-10-23 Thread Phyo Arkar
Hello Massimo! the demo is now avaliable at : http://herspos.appspot.com/HersPOS On GAE tho , joining tables not working so the main table , Sales table having error with Too many Tables selected. Can you show me how can i fix it? I am totally new to GAE. Thanks, Phyo. On 10/20/11, Massimo Di

Re: [web2py][GAE]BadValueError: Incomplete key found for reference property

2011-10-23 Thread Phyo Arkar
any idea? On 10/23/11, Phyo Arkar wrote: > I am using 1.98.2 > > here is my model : > > db.define_table("item", > SQLField("name", "text", length=512, notnull=True, default=None), > SQLField("base_price", "integer", notnull=True, default=None), > SQLField("price", "integer", not

[web2py] Minor Cosmetic Issue

2011-10-23 Thread horridohobbyist
This is a minor cosmetic issue, but cosmetics do matter in a professional/commercial website. The login nav looks like this after login: Welcome Richard [ logout | profile | password] There should be a space between 'password' and ']', just as there is a space between 'lost password?' and ']'. I

[web2py] xml view of dict() with attributes

2011-10-23 Thread KMax
Hello, Please help with exporting some dict to .xml view with attributes inside tags. Like: Title Value I am talking about "hello='world'" in the itemtitle tag. I know, I could do it with TAG, but how to make it using regular dict() return? i mean: def myxml(): return dict(itemti

[web2py] Re: web2py on GAE and supplementary package usage

2011-10-23 Thread Minocha
Thanks alot :) On Oct 16, 12:54 am, Massimo Di Pierro wrote: > You should not use local_import. It is deprecated and anyway not > designed for this. > > Just put the packages in site-packages, and use normal import. site- > packages is in sys.path. > > On Oct 15, 8:54 pm, Minocha wrote: > > > >

[web2py] Re: a couple of related questions

2011-10-23 Thread ニコノコ
Even if I'm logged in, I couldn't view a record when I click the parent record. The parent field is a clickable representation viewable in a grid. re [2] the relevant portion is the links parameter where I create a new button. I want to create an icon for that button. On Oct 23, 12:53 pm, Massim