Re: [web2py] Re: DAL and schema

2012-03-27 Thread adesst
On Tuesday, March 27, 2012 5:35:57 PM UTC+7, spyker wrote: > > > > On 26 March 2012 20:22, adesst wrote: > >> @Johann, i don't know if you would copy paste the diff i've made into >> PgAdapter, >> and do some tests and post the results. Pg and Oracle schema works in >> the same way. >> >> > I have

[web2py] Primary Key tables in MSSQL. Cannot get them to work

2012-03-27 Thread Andrew
Hello, I posted on this issue some time ago and I'm pretty sure it was working again after a fix from DenesL. However I can't get Primary Key tables in MSSQL to work. They get created OK, but I get errors with a Form in a view. I originally made the Key a string, but then switched to integer jus

[web2py] Re: @auth.requires(lambda: auth.has_membership(VCARD))

2012-03-27 Thread Annet
Wikus, Thanks for your reply. You need web2py >= 1.99.3 for the lambda to work. > Just upgraded from 1.99.2 to 1.99.7 and it works. Kind regards, Annet

[web2py] Re: New Google Groups functionality

2012-03-27 Thread lyn2py
Excellent, thanks for sharing this. On Wednesday, March 28, 2012 5:42:17 AM UTC+8, Anthony wrote: > > One more thing -- on the far right of the post editing menu is a "{ }" > icon that allows you to format text as code. For example: > > def index(): > return dict(message='Hello World') > > >

[web2py] how to redirect from ajax

2012-03-27 Thread weheh
I'm trying to figure out how the proper syntax to redirect from an ajax call using HTTP(200,Location=URL(...)). The problem is the ajax call points to either an id or an :eval. But I want to refresh the entire page -- wiping the slate clean. Is this possible?

[web2py] Re: Form validation on passwords

2012-03-27 Thread cyan
Thanks for the pointer. Anthony. So now I have the following in my controller: def register(): form = SQLFORM.factory( Field('email', requires=[IS_NOT_EMPTY(), IS_EMAIL(forced='^.*\.edu(|\..*)$' , error_message='email must be .edu address')]), Field('pwd', requires=[IS_NOT_EMPTY(), IS_STR

[web2py] Re: Sum result in DAL

2012-03-27 Thread go94025
works perfectly. thanks so much for the quick response and explanation. On Tuesday, March 27, 2012 6:43:45 PM UTC-7, Anthony wrote: > > On Tuesday, March 27, 2012 6:25:16 PM UTC-4, go94025 wrote: >> >> Hi - new to Web2py and the group. I'm building an app that will need to >> perform Sum and Ma

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread Anthony
> > So if I understand this correctly, and also by looking at gluon/tools, > setting session.auth = None is tantamount to logging someone off. And > auth.log_event(...) is the way to add an entry to the event logger. Sweet > and simple. Yes? > Yes, I believe so.

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread weheh
So if I understand this correctly, and also by looking at gluon/tools, setting session.auth = None is tantamount to logging someone off. And auth.log_event(...) is the way to add an entry to the event logger. Sweet and simple. Yes? On Wednesday, March 28, 2012 9:05:38 AM UTC+8, Anthony wrote: >

[web2py] Re: Sum result in DAL

2012-03-27 Thread Anthony
On Tuesday, March 27, 2012 6:25:16 PM UTC-4, go94025 wrote: > > Hi - new to Web2py and the group. I'm building an app that will need to > perform Sum and Max against large sets of data. As I'm getting familiar > with the DAL, I've tried the following (and other combinations) rather than > fall

[web2py] Re: Broken application after upgrade.

2012-03-27 Thread web-dev-m
Just continues trying to connect to any application. The application is still under development. After your suggestion, I dumped my db and deleted everything from the databases folder. It's working now...not sure what exactly happened. On Tuesday, March 27, 2012 4:54:51 PM UTC-5, pbreit wrot

[web2py] Sum result in DAL

2012-03-27 Thread go94025
Hi - new to Web2py and the group. I'm building an app that will need to perform Sum and Max against large sets of data. As I'm getting familiar with the DAL, I've tried the following (and other combinations) rather than fall back to db.executesql. I'm getting the correct result but can't fi

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread Anthony
On Tuesday, March 27, 2012 6:57:15 PM UTC-4, weheh wrote: > > I think I want a logout_bare() function so that I can logout via an ajax > call without going through some contortions to avoid auth.logout()'s > redirect. > > To be more specific, I want a link that says "logout". When clicked, it >

[web2py] Re: Fake_migrate with auth

2012-03-27 Thread Brian M
you can do auth.define_tables(fake_migrate = True) On Tuesday, March 27, 2012 12:27:21 PM UTC-5, Detectedstealth wrote: > > How do I do a fake_migrate with the auth table so I don't get the following > error? I know the table exists already I just pushed some major changes to my > server and now

[web2py] Re: Validating Registration fields

2012-03-27 Thread Anthony
Try IS_EMPTY_OR(IS_IMAGE()) Anthony On Tuesday, March 27, 2012 7:12:45 PM UTC-4, Peter G. wrote: > > Thanks for the code snippets Anthony--but a minor caveat I didn't realize > ahead of time is that the user is free to either upload an image or not. If > the user does not upload an image, the

[web2py] Re: difference between

2012-03-27 Thread weheh
Yay, Anthony! You 'da man. It works now. Phew. But truth be known, I don't exactly know what was going on here or what changes made the difference. I made the URL change you suggested -- it was some ancient code I had written years ago that I had developed a blindness towards 'cause it seemed to

[web2py] Re: web2py 1.99.7 is OUT

2012-03-27 Thread IVINH
This OK. Thanks. Vào 21:12:40 UTC+7 Thứ ba, ngày 27 tháng ba năm 2012, Massimo Di Pierro đã viết: > > Have you checked trunk or the nightly built. I believe this was fixed? > > On Tuesday, 27 March 2012 03:56:35 UTC-5, IVINH wrote: >> >> >> >> In my app, LOAD not work fine with 1.99.7, i'm try

[web2py] Re: Validating Registration fields

2012-03-27 Thread Peter G.
Thanks for the code snippets Anthony--but a minor caveat I didn't realize ahead of time is that the user is free to either upload an image or not. If the user does not upload an image, the IS_IMAGE() validators barks at the user. Is there a easy way of implementing such a logic: "if a file is u

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread weheh
I think I want a logout_bare() function so that I can logout via an ajax call without going through some contortions to avoid auth.logout()'s redirect. To be more specific, I want a link that says "logout". When clicked, it logs me out and executes an ajax callback rather than a redirect.

Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
Find it. titles = "'"+titles.replace('|', "','")+"'" with: SCRIPT(" ... jQuery.prettyPhoto.open(**images=%(images)s,titles=[%(** titles)s]);})" % dict(images=images, titles=titles), _language='javascript') works! Tested on Firefox and Safari. Though I've failed to find any references on this (th

[web2py] Re: difference between

2012-03-27 Thread Anthony
What is confusing? On Tuesday, March 27, 2012 6:09:48 PM UTC-4, pbreit wrote: > > I'm a little confused. Here's what the most recent code looks like: > > === web2py_ajax.html === >