[web2py:20058] Re: Changing links on SQLTABLE

2009-04-19 Thread SergeyPo
It's my specialty in this forum to give link to a thread for SQLTABLE personalizing. SQLTTABLE looks like one of the biggest attractors of the whole web2py, so some effort for extra features and documentation is required. Lambda function example and another home-made method is described here: htt

[web2py:20057] Changing links on SQLTABLE

2009-04-19 Thread weheh
I know this issue has been kicked around alot already and I've searched the posts for the answer, but I haven't been able to figure out the way to do the following. I'm using SQLTABLE with a linkto attribute, which creates a link on the id field. I would prefer to hide the ID field and move the s

[web2py:20056] if..else not working

2009-04-19 Thread annet
In the following function, the idea is to select a club's data based on the id in request.args. Then if the club's status is 0 (the field is of type string) the function should redirect to an other application, else the address and nfa data should be selected from the database and returned to the

[web2py:20055] Re: Can response.flash have different colors?

2009-04-19 Thread Iceberg
I tried it on Chrome. That's ugly because the default "flash" div orange box is bigger than "info", "warn" and "error". So a quick and dirty hack would be making them has same size. How about these? .warn { background-color: yellow; color: black; padding: 5px; } .info { background-color: #E5FFE5

[web2py:20054] Re: web2py 1.61.2 is out

2009-04-19 Thread Iceberg
"Pack all now also cleans up errors and sessions" works as expected. :-) By the way, you lost a fix to a minor, minor bug: when trying to "cleanup" admin, now a ticket is issued (at least on Windows XP). In my previous patch, I also wrap try...except outside os.unlink (session_files) On Apr20, 1

[web2py:20053] Re: writable = False. Is it an bug?

2009-04-19 Thread Iceberg
Did not know that before. But this design is really good! Wow! However, as always, I suggest this useful comments can be appeared in build-in doc such as http://www.web2py.com/examples/default/dal On Apr20, 10:04am, mdipierro wrote: > This is not a bug but it was a bug before. > > If you want t

[web2py:20052] Re: writable = False. Is it an bug?

2009-04-19 Thread Jose
On 20 abr, 02:32, mdipierro wrote: > OK. It may be seen as a change of behavior but don't you agree it is > better now? Technically it does not break backward compatibility since > it does not break existing apps. > > Massimo Thank you, it is clear. Regards Jose --~--~-~--~~

[web2py:20051] Re: Auth issue resolved....

2009-04-19 Thread mdipierro
yes there was a typo in the documentation. It should now be fixed. On 19 Apr, 12:40, Jason Brower wrote: > It seems there is a typo. > There should be no : at the end of decorators. > Thanks, > Jason Brower --~--~-~--~~~---~--~~ You received this message because y

[web2py:20050] Re: writable = False. Is it an bug?

2009-04-19 Thread mdipierro
OK. It may be seen as a change of behavior but don't you agree it is better now? Technically it does not break backward compatibility since it does not break existing apps. Massimo On 19 Apr, 21:22, Jose wrote: > On 20 abr, 02:04, mdipierro wrote: > > > This is not a bug but it was a bug befor

[web2py:20049] Re: writable = False. Is it an bug?

2009-04-19 Thread Jose
On 20 abr, 02:04, mdipierro wrote: > This is not a bug but it was a bug before. When? In the last video only it uses writable=False, but not readable=False. The same thing in dojo.pdf Jose --~--~-~--~~~---~--~~ You received this message because you are subscr

[web2py:20048] web2py 1.61.2 is out

2009-04-19 Thread mdipierro
No major changes except: - Includes change in default form names. - Fixes some typos - Pack all now also cleans up errors and sessions Please give it a try. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py We

[web2py:20047] Re: writable = False. Is it an bug?

2009-04-19 Thread mdipierro
This is not a bug but it was a bug before. If you want the field editable SQLField('field_n', 'boolean', writable=True), If you want the field to appear readonly SQLField('field_n', 'boolean', writable=False, readable=True, default=True), (it will show the default value, in

[web2py:20046] Re: writable = False. Is it an bug?

2009-04-19 Thread Jose
On 20 abr, 01:30, mdipierro wrote: > Works for me. Can you give an example of code, what you expect and > what it does instead? Simply something that two days ago it was working now well does not do it. db.define_table('mytable', SQLField('field_1', 'string'), SQLField('field_

[web2py:20045] benchmarks

2009-04-19 Thread mdipierro
Is the author of this here? http://www.nabble.com/GSP,-Gstring-are-very-SLOW---just-see-my-results-td23121257.html Did you record any numbers we can publish? Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[web2py:20044] Re: writable = False. Is it an bug?

2009-04-19 Thread mdipierro
Works for me. Can you give an example of code, what you expect and what it does instead? Massimo On 19 Apr, 20:03, Jose wrote: > I believe that in the version 1.61.1 the property "writable", in the > SQLField, is working badly. > Can anybody check it? > > Regards > Jose --~--~-~--~~

[web2py:20043] writable = False. Is it an bug?

2009-04-19 Thread Jose
I believe that in the version 1.61.1 the property "writable", in the SQLField, is working badly. Can anybody check it? Regards Jose --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To pos

[web2py:20042] writable = False. Is it an bug?

2009-04-19 Thread Jose
I believe that in the version 1.61.1 the property "writable", in the SQLField, is working badly. Can Alguién check it? Regards Jose --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To pos

[web2py:20041] Re: Can response.flash have different colors?

2009-04-19 Thread mdipierro
We can do this: warn { background-color: yellow; color: black; padding: 5px; } .info { background-color: green; color: white; padding: 5px; } .error { background-color: red; color: white; padding: 5px; } .flash { margin: 0 auto; text-align: center; clear: both; border: 1px #00; background-co

[web2py:20040] Re: CRUD not updating

2009-04-19 Thread mdipierro
yes. auth.settings.update_next=URL(...) On 19 Apr, 16:55, Tito Garrido wrote: > Now it works... as soon as it get update it goes to data/tables, is that > something configurable? > > Thanks! > > > > On Sun, Apr 19, 2009 at 6:43 PM, mdipierro wrote: > > > Can you try trunk now? It works for me.

[web2py:20039] Re: CRUD not updating

2009-04-19 Thread Tito Garrido
Now it works... as soon as it get update it goes to data/tables, is that something configurable? Thanks! On Sun, Apr 19, 2009 at 6:43 PM, mdipierro wrote: > > Can you try trunk now? It works for me. > > Massimo > > On 19 Apr, 12:30, Iceberg wrote: > > I happened to confirm same problem today.

[web2py:20038] Re: CRUD not updating

2009-04-19 Thread mdipierro
Can you try trunk now? It works for me. Massimo On 19 Apr, 12:30, Iceberg wrote: > I happened to confirm same problem today. > > I am now using stable web2py 1.61.1, but it seems the problem exists > even earlier than 1.61.1 ... > > My simplified code for reproducing. > > Model: > db = SQLDB('s

[web2py:20037] Re: dataTables and date

2009-04-19 Thread mdipierro
Here is how I make it work. I am not sure what is missing in your case In model db.define_table('person',SQField('name'),SQLField ('birthday','date',requires=IS_DATE(str(T('%Y-%m-%d') create a language file for example it.py and translate: '%Y-%m-%d': '%d/%m/%Y', '%Y-%m-%d %H:%M:%S': '%

[web2py:20036] Re: Auth "decorators" - Just not getting it.

2009-04-19 Thread mdipierro
no ":" at the end of the decorator. Massimo On Apr 19, 12:37 pm, AchipA wrote: > IIRC decorators are just function *names*, loose (): > > On Apr 19, 1:13 pm, Jason Brower wrote: > > > I have this.. > > - > > @auth.requires_login(): > > def profile(): > >     tags = db().select(db.tag.ALL,o

[web2py:20035] Re: Some doubts

2009-04-19 Thread mdipierro
yes, you cannot use crud because that prcesses the form before returning the form, so before you can modify it. SQLFORM is the way to go. Massimo On Apr 19, 10:35 am, Jose wrote: > On 19 abr, 12:17, mdipierro wrote:> This may be a > bug. Let me look into it. > > I used > form = crud.create(db

[web2py:20034] Auth issue resolved....

2009-04-19 Thread Jason Brower
It seems there is a typo. There should be no : at the end of decorators. Thanks, Jason Brower --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2p

[web2py:20033] Re: Auth "decorators" - Just not getting it.

2009-04-19 Thread AchipA
IIRC decorators are just function *names*, loose (): On Apr 19, 1:13 pm, Jason Brower wrote: > I have this.. > - > @auth.requires_login(): > def profile(): >     tags = db().select(db.tag.ALL,orderby=db.tag.name) >     tagForm = SQLFORM(db.tag, _class="jNice") >     userForm = SQLFORM(db.use

[web2py:20032] Re: CRUD not updating

2009-04-19 Thread Iceberg
I happened to confirm same problem today. I am now using stable web2py 1.61.1, but it seems the problem exists even earlier than 1.61.1 ... My simplified code for reproducing. Model: db = SQLDB('sqlite://storage.db') db.define_table('repository', db.Field('name'), ) from gluon.tools import

[web2py:20031] Auth "decorators" - Just not getting it.

2009-04-19 Thread Jason Brower
I have this.. - @auth.requires_login(): def profile(): tags = db().select(db.tag.ALL,orderby=db.tag.name) tagForm = SQLFORM(db.tag, _class="jNice") userForm = SQLFORM(db.users) if tagForm.accepts(request.vars): response.flash='Tag Added!' else tagForm.errors: respon

[web2py:20030] Re: Can response.flash have different colors?

2009-04-19 Thread Iceberg
Glad to have a happy ending of this story. :-) On Apr19, 11:25pm, mdipierro wrote: > yes we can do that. I can include a warn, info and error in different > colors. > > Massimo > > On Apr 19, 10:07 am, Yarko Tymciurak wrote: > > > this seems like a nice approach...  one that separates concerns

[web2py:20029] Re: Can response.flash have different colors?

2009-04-19 Thread Douglas Soares de Andrade
Em Domingo 19 Abril 2009, às 12:25:34, mdipierro escreveu: > yes we can do that. I can include a warn, info and error in different > colors. > > Massimo Great, +1 to this =) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[web2py:20028] Re: Question on request.vars

2009-04-19 Thread Joseph Jude
Massimo, Thanks for the reply. But it didn't work. I've this simple assign function: def assign(): print request.vars and it prints this. Note the \r\n as first characters. This is what is causing the problem Just for the ref, I'm using the below python script for sending parameters. da

[web2py:20027] Re: URL structure for multilanguage site

2009-04-19 Thread Jiri Zahradil
I tried to investigate that and it is clear that content localized by session/browser preferance only *cannot* be properly indexed by search engines. Localized version of content must have 1) own URL, 2) must have properly set Content-Language in HTTP headers (can be set by meta tag also). -- Jiri

[web2py:20026] Re: CRUD not updating

2009-04-19 Thread Tito Garrido
Sorry I forgot to post my db.py: db.define_table('auth_user', SQLField('first_name', length=128,default=''), SQLField('last_name', length=128,default=''), SQLField('email', length=128,default=''), SQLField('password', 'password', readable=False), SQLField('registration_key', le

[web2py:20025] Re: Some doubts

2009-04-19 Thread Jose
On 19 abr, 12:17, mdipierro wrote: > This may be a bug. Let me look into it. > I used form = crud.create(db.table) instead of form = SQLFORM(db.table) With form = SQLFORM(db.table) if it works. Jose --~--~-~--~~~---~--~~ You received this message because you a

[web2py:20024] Re: CRUD not updating

2009-04-19 Thread Tito Garrido
It's from the svn trunk: web2py Version 1.61.1 (2009-04-18 10:09:25) web2py is up to date Controller, user_admin.py: FORM_ACCEPT=T('record inserted') FORM_ERROR=T('form errors') # auth.settings.on_failed_authorization=URL(r=request,f='error') def user(): return dict(

[web2py:20023] Re: Can response.flash have different colors?

2009-04-19 Thread mdipierro
yes we can do that. I can include a warn, info and error in different colors. Massimo On Apr 19, 10:07 am, Yarko Tymciurak wrote: > this seems like a nice approach...  one that separates concerns between > controller and view, and yet leaves things out of web2py, that is all to the > applicatio

[web2py:20022] Re: Some doubts

2009-04-19 Thread mdipierro
This may be a bug. Let me look into it. On Apr 19, 9:45 am, Jose wrote: > On 19 abr, 03:19, mdipierro wrote: > > > yes > > > query=db.table.field.belongs(('a','b','c')) > > query=~db.table.field.belongs(('a','b','c')) > > query=db.table.field.belonds(db(query)._select > > (db.othertable.otherfi

[web2py:20021] Re: Request for more organize feature request lists...

2009-04-19 Thread mdipierro
Thank you for the availability. I have done so some times and I will do so more in the future. Massimo On Apr 19, 8:31 am, Jason Brower wrote: > Alright, being your the one that closes and fixes most of these bugs, I > will leave it to you.  But don't be afraid to assign things to us. :D > Rega

[web2py:20020] Re: CRUD not updating

2009-04-19 Thread mdipierro
Can you post a piece of code to reproduce it? What is the date on the version? Is this the stable from the web page or the development version from the trunk? Massimo On Apr 19, 7:06 am, Tito Garrido wrote: > Hi, > > I'm using SQLTABLE with linkto=URL(r=request,f='data/update'), but when I > tr

[web2py:20019] Re: dataTables and date

2009-04-19 Thread mdipierro
I promise I will look into this today. Massimo On Apr 19, 7:05 am, jmverm...@xs4all.nl wrote: > I am still struggling with the formatting of date, I first tried to > solve the problem the best way, when I didn't get that to work I > thought I'd try the quick fix, unfortunately, resulting in the

[web2py:20018] Re: Question on request.vars

2009-04-19 Thread mdipierro
The "assign" function expects the request.vars.fields to be in JSON. This should do it but I have not tried it. data = {'fields': simplejson.dumps({'case_id': 16, 'assign_to': 'age...@example.com'})} data = urllib.urlencode(data) response = urllib2.urlopen(request,data).read() Massimo On Apr 19

[web2py:20017] Re: Can response.flash have different colors?

2009-04-19 Thread Yarko Tymciurak
this seems like a nice approach... one that separates concerns between controller and view, and yet leaves things out of web2py, that is all to the application... Does it make sense to support this kind of convention by having default classes in CSS? On Sun, Apr 19, 2009 at 10:04 AM, mdipierro w

[web2py:20016] Re: URL structure for multilanguage site

2009-04-19 Thread mdipierro
I do not know. This may help: http://www.seoconsultants.com/meta-tags/language.asp On Apr 19, 5:03 am, jiri wrote: > Thanks, routes_in fragment seems to be what I was looking for. Session > variable for remembering last selected language - I like that, I am > going to include that also. > > I a

[web2py:20015] Re: Can response.flash have different colors?

2009-04-19 Thread mdipierro
BTW... one can also do response.flash=DIV("this is a message",_class="warn") and then declare a class "warn" in the CSS. On Apr 19, 1:29 am, mdipierro wrote: > session.flash does only one think in web2py: it gets moved into > response.flash upon redirect. If you want you can do already > > #in

[web2py:20014] Re: GAE from Windows Disto

2009-04-19 Thread Yarko Tymciurak
I think you need the source version of web2py to prepare to run on app engine. See http://mdp.cti.depaul.edu/AlterEgo/default/show/186 (but be careful - it provides links to specific versions which are now out of date: see http://code.google.com/p/googleappengine/)

[web2py:20013] Re: Some doubts

2009-04-19 Thread Jose
On 19 abr, 03:19, mdipierro wrote: > yes > > query=db.table.field.belongs(('a','b','c')) > query=~db.table.field.belongs(('a','b','c')) > query=db.table.field.belonds(db(query)._select > (db.othertable.otherfield)) OK. Thanks. > if form is your form... > form[0] is the ... > so you can do >

[web2py:20012] GAE from Windows Disto

2009-04-19 Thread Col Wilson
Can someone give me a pointer on where the app.yaml file is on a windows distro? Any other pointers would also be helpful. I've tried searching previous posts, but nothing seems to help. Thanks --~--~-~--~~~---~--~~ You received this message because you are subsc

[web2py:20011] Re: Request for more organize feature request lists...

2009-04-19 Thread Jason Brower
Alright, being your the one that closes and fixes most of these bugs, I will leave it to you. But don't be afraid to assign things to us. :D Regards, Jason Brower On Sun, 2009-04-19 at 08:21 -0300, Douglas Soares de Andrade wrote: > Em Domingo 19 Abril 2009, às 03:23:03, mdipierro escreveu: > >

[web2py:20010] CRUD not updating

2009-04-19 Thread Tito Garrido
Hi, I'm using SQLTABLE with linkto=URL(r=request,f='data/update'), but when I try to update/delete nothing happens... I'm using web2py 1.61.1 Am I doing something wrong? Thanks, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ --~--~---

[web2py:20009] Re: dataTables and date

2009-04-19 Thread jmvermeer
I am still struggling with the formatting of date, I first tried to solve the problem the best way, when I didn't get that to work I thought I'd try the quick fix, unfortunately, resulting in the same errors. This works, however, the date is displayed in the format: -mm-dd, whereas I need dd

[web2py:20008] Re: Request for more organize feature request lists...

2009-04-19 Thread Douglas Soares de Andrade
Em Domingo 19 Abril 2009, às 03:23:03, mdipierro escreveu: > I agree with yarko and for one more reason: The processing of > accessing lanchpad to close a bug usually takes longer than fixing the > bug (assuming it is a real bug). > > Massimo I agree with you all and im very happy with the develo

[web2py:20007] Re: Request for more organize feature request lists...

2009-04-19 Thread Jason Brower
I guess I see the checking-for-valid-bug phase a step that others can do to help lift some of the load off of members that can code. But your right, there is a lot of garbage reports out there. I just wish there was a way, that when I have the time, I can sit down and start to sift through report

[web2py:20006] Question on request.vars

2009-04-19 Thread Joseph Jude
Hi all, I have a function as below. This is called as part of API function rather than from the browser. def assign(): print request.vars.fields if request.vars.fields: case_values=json.loads(request.vars.fields) ret_dict=api.assign_case(db,case_values) else: r

[web2py:20005] Re: URL structure for multilanguage site

2009-04-19 Thread jiri
Thanks, routes_in fragment seems to be what I was looking for. Session variable for remembering last selected language - I like that, I am going to include that also. I am not sure about handling language purely using sessions in general. It could be worthful if you have an app like webmail for

[web2py:20004] Re: Some doubts

2009-04-19 Thread Fran
On Apr 19, 7:19 am, mdipierro wrote: > > 3) To a form created with SQLFORM I want to add a new field, not > > belonging to the table. It is a necessary field to validate, similar > > to use captchas, but with text. > > Is it possible to do what I need? > if form is your form... > form[0] is the .