[web2py] defaulting a value of a column in table with other columns of table

2010-04-28 Thread Rohan
Hi, I have added a new column access_key in auth_user table, I want to default it to with a value obtained by using email calculateValue(email): #some logic return calculatedValue I tried calling the above method using Field('access_key', 'string', readable=False, writable=False, defau

[web2py] Re: Webfaction rocks

2010-04-28 Thread aure
Hi everyone, Thanks for your help! @Jonathan: yes, if I disable https I can access the welcome web2py app without any problem. I just cannot login into the admin.. @Thadeus, yes I have told firefox to accept the SSL certificate anyway, and I can then access the app. But I would not want that to

[web2py] Re: Webfaction rocks

2010-04-28 Thread Yarko Tymciurak
You are using a shared SSL certificate (courtesy of webfaction); That is, the SSL certificate is issued to a URI other than yours. Depending on browser, and it's security settings it will react in different ways (for example, you can have some browsers permanently remember the exception you make a

[web2py] Re: Webfaction rocks

2010-04-28 Thread Yarko Tymciurak
... see http://docs.webfaction.com/user-guide/websites.html#secure-sites-https On Apr 28, 3:24 am, aure wrote: > Hi everyone, > > Thanks for your help! > > @Jonathan: yes, if I disable https I can access the welcome web2py app > without any problem. I just cannot login into the admin.. > > @Thade

Re: [web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Johann Spies
Thanks Yarko, > Hope this makes some sense now: At least that some darkness about what is happening in the background was cleared up - but I still do not understand enough to solve my problem. > After you have digested this some,  have a look at > http://web2py.com/book/default/section/7/2?search

[web2py] form in LOAD should POST to external URL but post is trapped

2010-04-28 Thread selecta
I have a form in a LOAD element and it should POST to an external URL, however this does not happen since the POST is caught by the web2py_trap_form can I prevent that and still have the form in a LOAD element I know I could prevent this with an iframe, but this is not really what I want tnx for

[web2py] Re: form in LOAD should POST to external URL but post is trapped

2010-04-28 Thread selecta
ok I modified web2py_ajax.html function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i){ var form=jQuery(this); if (form.attr('class')!='external'){ jQuery(':submit,.submit',this).click(function(){ jQuery('.flash').hide().html('');

[web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Yarko Tymciurak
try using a debugger, and step thru to see what your values are, what you logic is doing... you should find that helpful. You can use winpdb; or you can grab an evaluation copy of WindIDE (I find Wing easier to use) - but either will work. The first problem is that you allow None for these value

[web2py] Re: ASP vs Rails 3 (vs web2py?)

2010-04-28 Thread Mengu
i can do it. :) On 27 Nisan, 16:53, mdipierro wrote: > Who is brave enough to rewrite this and add web2py? > > http://anders.janmyr.com/2010/04/aspnet-mvc-vs-rails3.html > > -- > Subscription settings:http://groups.google.com/group/web2py/subscribe?hl=en

Re: [web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Johann Spies
On 28 April 2010 13:42, Yarko Tymciurak wrote: > try using a debugger, and step thru to see what your values are, what > you logic is doing...  you should find that helpful. > > You can use winpdb; or you can grab an evaluation copy of WindIDE (I > find Wing easier to use) - but either will work.

[web2py] web2py on twisted

2010-04-28 Thread José L .
Hi, I'm using an application running on twisted to communicate with some electronic devices. twisted is almost a need to handle this application because of the async nature of the comms. Also I use twisted + some javascript to render a http page with the info coming from the devices and to give the

[web2py] Re: fail to display my view

2010-04-28 Thread lameck.kassana
thanks very much and sorry for late reply !! I did it ! And Massimo thanks for this very good frame work which makes me proud as pythoneer. On Apr 23, 5:14 pm, mdipierro wrote: > Denes is right the views should be > > views/greet/index.html > views/greet/greet.html > > There must be a views subfo

Re: [web2py] Re: newline character in text & string fields on GAE

2010-04-28 Thread G. Clifford Williams
Well what I HAD meant was that on GAE wherever I'd supplied a newline char as input I'd see an odd encoding in the storage file. When I queried the database I didn't see the newline in the response. Now I realize how silly I was. When I run the same code against sqlite I see the literal newline

Re: [web2py] Re: Custom validators and SQLForm - apology

2010-04-28 Thread Johann Spies
Yarko, >> You can use winpdb; or you can grab an evaluation copy of WindIDE (I >> find Wing easier to use) - but either will work. > > Debugging normal python is not a problem to me, but I don't know how > to debug Web2Py.  I don't use Windows and I don't know how to see the > process you describ

[web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Yarko Tymciurak
On Apr 28, 6:55 am, Johann Spies wrote: > On 28 April 2010 13:42, Yarko Tymciurak wrote: > > > try using a debugger, and step thru to see what your values are, what > > you logic is doing...  you should find that helpful. > > > You can use winpdb; or you can grab an evaluation copy of WindIDE (I

[web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Yarko Tymciurak
... sorry - upper LEFT to go (both debuggers)... long nite! ;-) On Apr 28, 6:55 am, Johann Spies wrote: > On 28 April 2010 13:42, Yarko Tymciurak wrote: > > > try using a debugger, and step thru to see what your values are, what > > you logic is doing...  you should find that helpful. > > > You

[web2py] Rocket issues

2010-04-28 Thread Jonathan Lundell
Our engineering folks have started looking at the new release, with attention to Rocket, and have reported a couple of problems. 1) when https is enabled, but a connection is attempted to http, CherryPy (?) will return a message indicating this server operates on https only. The new version, Roc

[web2py] Re: defaulting a value of a column in table with other columns of table

2010-04-28 Thread mdipierro
Much simpler. Field('access_key',calulate=lambda r: calculateValue(r['email'])) and it will be automatic On Apr 28, 2:26 am, Rohan wrote: > Hi, > > I have added a new column access_key in auth_user table, I want to > default it to with a value obtained by using email > > calculateValue(email):

[web2py] Re: form in LOAD should POST to external URL but post is trapped

2010-04-28 Thread mdipierro
In trunk but "no_trap" instead of "external". I am not convinced this quite works but does not break anything else. Let's give it a try. Thanks selecta. On Apr 28, 5:47 am, selecta wrote: > ok I modified web2py_ajax.html > > function web2py_trap_form(action,target) { >    jQuery('#'+target+' form

[web2py] Re: newline character in text & string fields on GAE

2010-04-28 Thread mdipierro
No apologies. Thanks for checking and reporting. On Apr 28, 8:26 am, "G. Clifford Williams" wrote: > Well what I HAD meant was that on GAE wherever I'd supplied a newline char as > input I'd see an odd encoding in the storage file. When I queried the > database I didn't see the newline in the r

[web2py] Re: Rocket issues

2010-04-28 Thread mdipierro
I am sure Tim is on the case. On Apr 28, 8:56 am, Jonathan Lundell wrote: > Our engineering folks have started looking at the new release, with attention > to Rocket, and have reported a couple of problems. > > 1) when https is enabled, but a connection is attempted to http, > CherryPy (?) will

[web2py] Re: Custom validators and SQLForm

2010-04-28 Thread DenesL
On Apr 26, 10:11 am, Johann Spies wrote: > But none of those variables are available.  When I try > form = SQLFORM(db.navrae) >     message = T("form has errors") >     if request.vars.begindatum > request.vars.einddatum: >         message = T("end date before start date") >         form.errors =

Re: [web2py] Re: Rocket issues

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 7:10 AM, mdipierro wrote: > I am sure Tim is on the case. No doubt; thanks. I'll get some clarification on #2. The "unable to obtain API version" is a message from our web2py app, making its own xmlrpc request directed at another (not web2py) server, and the get-api-version

Re: [web2py] Rocket issues

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 6:56 AM, Jonathan Lundell wrote: > 2) if a "localhost" managed server is configured using the same port > as [web2py], but http protocol, atttempting to connect to that URL > will cause [web2py] to become unresponsive to all requests until it > is restarted. With the same conf

[web2py] request with args

2010-04-28 Thread annet
In one of my functions I redirect the user to another function. I would like to notify the user that he has been redirect by setting a flash message, the problem is the args in the url. This is the function: if request==URL(r=request,a='crm',c='clublocatormail',f='update_form'): response.f

[web2py] background process

2010-04-28 Thread Jose
Hello, I am developing a web application that contains at least three sections with high processing load (migration, conversion and calculations). My idea is that when you call these processes, is made in the background or in a separate thread, so that the user can continue "using" the application

[web2py] NTLM Challenge Response

2010-04-28 Thread Mark Larsen
I'm curious if something like this: http://www.rgagnon.com/javadetails/java-0441.html Can be done with web2py? Essentially I need to: response.status = 401 response.headers["WWW-Authenticate"] = "NTLM" >From a controller. The response.status doesn't seem to do anything as it still returns 200

Re: [web2py] request with args

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 9:30 AM, annet wrote: > In one of my functions I redirect the user to another function. I > would like to notify the user that he has been redirect by setting a > flash message, the problem is the args in the url. This is the > function: > > if > request==URL(r=request,a='crm'

Re: [web2py] request with args

2010-04-28 Thread Thadeus Burgess
session.flash = "message" On this note, I would almost like to suggest a patch to the usage of response.flash. Currently it is just a string, however I suggest that we make it standard to use it as a list. Several times I have had my response.flash overwritten by either a plug-in or my own when I

Re: [web2py] NTLM Challenge Response

2010-04-28 Thread Thadeus Burgess
Try. raise(HTTP(401, headers={'WWW-Authenticate': 'NTLM'})) -- Thadeus On Wed, Apr 28, 2010 at 11:33 AM, Mark Larsen wrote: > I'm curious if something like this: > > http://www.rgagnon.com/javadetails/java-0441.html > > Can be done with web2py? > > Essentially I need to: > > response.status

[web2py] Unique Fields

2010-04-28 Thread Elcimar L. Santos
Hi folks. I have a simple table of an sqlite db like this: dbOBJECT.define_table("Users", Field("login", "string", length=80, notnull=True, default=None, unique=True), Field("mac1", "string", length=17, notnull=True, default=None, unique=True), Field("mac2", "string", length=17, defau

Re: [web2py] Unique Fields

2010-04-28 Thread Álvaro Justen [Turicas]
On Wed, Apr 28, 2010 at 15:02, Elcimar L. Santos wrote: > Hi folks. > > I have a simple table of an sqlite db like this: > > dbOBJECT.define_table("Users", >     Field("login", "string", length=80, notnull=True, default=None, > unique=True), >     Field("mac1", "string", length=17, notnull=True, d

[web2py] Re: request with args

2010-04-28 Thread annet
Thadeus and Jonathan, Thanks for you replies. I am afraid I haven's made myself clear. However, your replies pointed me in the right direction. I have an update_form, in which I set the values by querying the database, which results in four rowsets. When one of the rowsets is empty, the function

Re: [web2py] Unique Fields

2010-04-28 Thread Elcimar L. Santos
Entendi. Deveria fazer uma tabela somente para macs e outra para os logins e relacionar uma com a outra. Show de bola. Atenciosamente, Elcimar Leandro - http://twitter.com/simakwm http://elcimar.blogspot.com Portal Net Fácil - http://www.nfacil.com.br 2010/4/28 Álvaro Justen [Turicas] > On W

Re: [web2py] Re: request with args

2010-04-28 Thread Thadeus Burgess
So you shoudl do def update_form(): if not (club and address and nfas and persoon): session.flash = "You have been redirected because you did not supply all of the correct data" redirect(URL(r=request, a='init', c='clublocator', f='application_form')) return dict(form=form) Then

[web2py] Re: Application logging

2010-04-28 Thread Iceberg
I happened to be the creator of that code snippet. :-) Glad to know that it helps you. But I would recommend you use a later version, quoted already in Omicron's post. It uses RotatingFileHandler to avoid unstoppable log file size, and it serves the log by http://yourhost/yourapp/static/applog.txt

[web2py] Re: background process

2010-04-28 Thread mdipierro
Do not use threads for background processes. Use an actual seperate process python web2py.py -S app -M -R applications/app/private/ process_script.py You can have it start by web2py cron On Apr 28, 11:30 am, Jose wrote: > Hello, > > I am developing a web application that contains at least three

[web2py] Re: Application logging

2010-04-28 Thread mdipierro
Can it be moved to web2pyslices? On Apr 28, 1:57 pm, Iceberg wrote: > I happened to be the creator of that code snippet. :-) Glad to know > that it helps you. > > But I would recommend you use a later version, quoted already in > Omicron's post. It uses RotatingFileHandler to avoid unstoppable lo

[web2py] web2py-zen

2010-04-28 Thread mdipierro
Somebody made this: http://web2py.wordpress.com/2010/04/27/web2py-zen/ good read.

[web2py] Menu Selected option

2010-04-28 Thread DJ
Hi all, There has been some discussion on this previously and I believe Massimo has included a menu-selected option in MENU. What's the best way to display a menu with the current item selected? Default code example: {{if response.menu:}} {{=MENU(response.menu, _class =

[web2py] fr-ca.py translation file for a "blank" web2py application using version 1.77.3

2010-04-28 Thread Chris Steel
Included is a translation file for *Québécois * for a recent "blank" web2py app. An important note: Despite the file name fr-ca.py which refers to the language and geographic region, *Québécois

[web2py] jsTree

2010-04-28 Thread Yarko Tymciurak
Hi - I'm in the process of plumbing up jsTree to web2py, specifically JSON loading, ajax saving of modicications (rename, re-order, etc. of tree), and associating more actoins with each tree. If anyone out there has experience w/ jsTree, chime in. I'm just getting to setup javascript debuggers,

[web2py] Re: background process

2010-04-28 Thread Jose
On 28 abr, 16:11, mdipierro wrote: > Do not use threads for background processes. Use an actual seperate > process > > python web2py.py -S app -M -R applications/app/private/ > process_script.py > > You can have it start by web2py cron > A cron do not need it, since it must be the user who laun

Re: [web2py] Rocket issues

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 8:48 AM, Jonathan Lundell wrote: > On Apr 28, 2010, at 6:56 AM, Jonathan Lundell wrote: > >> 2) if a "localhost" managed server is configured using the same port >> as [web2py], but http protocol, atttempting to connect to that URL >> will cause [web2py] to become unresponsive

[web2py] Re: background process

2010-04-28 Thread howesc
i like massimo's idea of using cron...but if you need it to be launched by the user perhaps you setup cron to run at small intervals and have the job simply check if the user has requested work, and then do the work. i suspect that is much easier than getting the threading right. cfh On Apr 28,

[web2py] Re: background process

2010-04-28 Thread Jose
On 28 abr, 18:31, Jose wrote: > > Running the script as you said, how to access the same to application > context: db, session, etc. I said nothing, I just read the output of python web2py.py -h Jose

[web2py] Re: SEO

2010-04-28 Thread weheh
I believe I read somewhere that web crawlers ignore hidden fields. I also believe I read somewhere that having a URL that says something in plain English is up there with the title in terms of SEO. In other words, use a RESTful URL with the various parts including your keywords so that it is litera

[web2py] Re: Menu Selected option

2010-04-28 Thread mdipierro
response.menu = [['name',request.function=='item',URL(r=request,f='item')]] the second boolean is the active status {{=MENU(response.menu)}} renders active with a class "li_active" you can use the css to highlight it. On Apr 28, 2:50 pm, DJ wrote: > Hi all, > > There has been some discussion

[web2py] Re: jsTree

2010-04-28 Thread mdipierro
I tried it. I found the tree option in jqGrid so much better to work it. On Apr 28, 4:03 pm, Yarko Tymciurak wrote: > Hi - > > I'm in the process of plumbing up jsTree to web2py, specifically JSON > loading, ajax saving of modicications (rename, re-order, etc. of > tree), and associating more act

[web2py] Re: background process

2010-04-28 Thread Jose
If anyone else may need it, the code is this and it works fine. The only difference is that the script had to do an explicit commit. def procesar(): import subprocess import os script = os.path.join(request.folder, 'private', 'script.py') comando = "python %s/web2py.py -S py_ccu -M

[web2py] Re: background process

2010-04-28 Thread Jose
One more question. The model is imported with-M, but I do not know is how to pass session to the script. Jose

[web2py] Re: jsTree

2010-04-28 Thread Yarko Tymciurak
On Apr 28, 5:32 pm, mdipierro wrote: > I tried it. I found the tree option in jqGrid so much better to work > it. I'l look into it more carefully, again. (Not sure how multi-line text will represent tin this, but I suppose I could use modal forms from this just as easily). - Yarko > > On Apr

[web2py] Re: web2py-zen

2010-04-28 Thread Richard
whose behind it? They are super active - 5 articles yesterday! On Apr 29, 5:32 am, mdipierro wrote: > Somebody made this: > > http://web2py.wordpress.com/2010/04/27/web2py-zen/ > > good read.

[web2py] Re: background process

2010-04-28 Thread Jose
On 28 abr, 20:39, Jose wrote: > One more question. > > The model is imported with-M, but I do not know is how to pass session > to the script. > > Jose I answer myself. I used pickle. Jose

[web2py] Re: web2py-zen

2010-04-28 Thread hamdy.a.farag
:) me

[web2py] zoolander

2010-04-28 Thread mdipierro
http://fitzgen.github.com/zoolander/

Re: [web2py] Re: web2py-zen

2010-04-28 Thread Thadeus Burgess
good job hamdy! -- Thadeus On Wed, Apr 28, 2010 at 7:20 PM, hamdy.a.farag wrote: > :)  me >

[web2py] Re: web2py-zen

2010-04-28 Thread mdipierro
yes, indeed On Apr 28, 7:48 pm, Thadeus Burgess wrote: > good job hamdy! > > -- > Thadeus > > On Wed, Apr 28, 2010 at 7:20 PM, hamdy.a.farag > wrote: > > :)  me

Re: [web2py] zoolander

2010-04-28 Thread Thadeus Burgess
reminds me of clevercss. -- Thadeus On Wed, Apr 28, 2010 at 7:51 PM, mdipierro wrote: > http://fitzgen.github.com/zoolander/ >

[web2py] Web2py Utilities

2010-04-28 Thread Thadeus Burgess
I have decided to share some of the libraries that I have found useful when creating web2py apps. This contains lots of goodies, and some nice shortcuts. * Common shortcuts * Widgets * py2jquery module * Heirarchical category module. * Database store configuration settings

[web2py] Re: zoolander

2010-04-28 Thread mdipierro
except that clevercss defines a new language for CSS while zoolander is pure python API to generate CSS. I think zoolander clevercss as the web2py template languages is to Django's. zoolander is a single very very short file. I am thinking it may even go into contrib. Massimo On Apr 28, 8:00 pm,

Re: [web2py] Re: zoolander

2010-04-28 Thread Thadeus Burgess
I am sorry but I do not think it should go into contrib. I don't see the point. Why not just write CSS for Christ sake? -- Thadeus On Wed, Apr 28, 2010 at 8:06 PM, mdipierro wrote: > except that clevercss defines a new language for CSS while zoolander > is pure python API to generate CSS. >

[web2py] web2py paypal integration

2010-04-28 Thread mdipierro
http://www.scribd.com/doc/30661771/Web2py-Paypal-Integration

[web2py] Re: web2py-zen

2010-04-28 Thread hamdy.a.farag
Thanks In fact as I told you b4, I'm digging into this group to get the information which is wealthy . I also thought I could make it a surprise but I couldn't :)

[web2py] Re: zoolander

2010-04-28 Thread mr.freeze
Interesting. This would be an easy way to make your CSS dynamic. On Apr 28, 8:10 pm, Thadeus Burgess wrote: > I am sorry but I do not think it should go into contrib. I don't see > the point. Why not just write CSS for Christ sake? > > -- > Thadeus > > On Wed, Apr 28, 2010 at 8:06 PM, mdipierro

Re: [web2py] Re: zoolander

2010-04-28 Thread Jonathan Lundell
On Apr 28, 2010, at 7:00 PM, mr.freeze wrote: > Interesting. This would be an easy way to make your CSS dynamic. web2py views are an easy way to make your CSS dynamic.

Re: [web2py] Re: zoolander

2010-04-28 Thread Thadeus Burgess
> web2py views are an easy way to make your CSS dynamic. > I just do not find any practical application for it. Kudos to the author, its a neat little experimental project.

[web2py] Re: Web2py Utilities

2010-04-28 Thread Richard
great! I am familiar with some of these modules from examining the blogitizor code and have been reusing a few in my own apps. On Apr 29, 11:02 am, Thadeus Burgess wrote: > I have decided to share some of the libraries that I have found useful > when creating web2py apps. > > This contains lots

[web2py] Re: web2py paypal integration

2010-04-28 Thread Richard
are there any web2py apps that handle credit card payments with a PayPal backend? On Apr 29, 11:03 am, mdipierro wrote: > http://www.scribd.com/doc/30661771/Web2py-Paypal-Integration

Re: [web2py] Re: zoolander

2010-04-28 Thread Jason Brower
On Wed, 2010-04-28 at 19:02 -0700, Jonathan Lundell wrote: > On Apr 28, 2010, at 7:00 PM, mr.freeze wrote: > > > Interesting. This would be an easy way to make your CSS dynamic. > > web2py views are an easy way to make your CSS dynamic. +1 to that. :D

Re: [web2py] Re: zoolander

2010-04-28 Thread Jason Brower
On Wed, 2010-04-28 at 21:13 -0500, Thadeus Burgess wrote: > > web2py views are an easy way to make your CSS dynamic. > > > > I just do not find any practical application for it. > > Kudos to the author, its a neat little experimental project. In looking at it, I suppose some mobile plateforms co

[web2py] Re: web2py paypal integration

2010-04-28 Thread mdipierro
No that I know of. I just found that document. You may want to ask the author. On Apr 28, 10:36 pm, Richard wrote: > are there any web2py apps that handle credit card payments with a > PayPal backend? > > On Apr 29, 11:03 am, mdipierro wrote: > > >http://www.scribd.com/doc/30661771/Web2py-Paypal

[web2py] Re: zoolander

2010-04-28 Thread mdipierro
That is true. On a second thought. we do not need zoolander. On Apr 28, 11:00 pm, Jason Brower wrote: > On Wed, 2010-04-28 at 19:02 -0700, Jonathan Lundell wrote: > > On Apr 28, 2010, at 7:00 PM, mr.freeze wrote: > > > > Interesting. This would be an easy way to make your CSS dynamic. > > > web2p

[web2py] Re: web2py on twisted

2010-04-28 Thread Joe Barnhart
It seems like you could run twisted as a WSGI server and let it serve for web2py. I have not tried this, mind you, but here's a short message about twisted.web and WSGI. http://jcalderone.livejournal.com/51888.html On Apr 28, 2:52 am, José L. wrote: > Hi, > I'm using an application running on t

[web2py] Re: web2py paypal integration

2010-04-28 Thread Mengu
excellent article! i needed it for my e-commerce software that i'm developing with web2py.