[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-24 Thread Annet
I opened a ticket: http://code.google.com/p/web2py/issues/detail?id=906 Kind regards, Annet. --

[web2py] Re: How to hide items in Production?

2012-07-24 Thread lyn2py
> > I meant the web2py admin login, rather than the per-site login. Is this not possible? On Tuesday, July 24, 2012 11:32:05 AM UTC+8, lyn2py wrote: > > Thanks Anthony, I meant the web2py admin login, rather than the per-site > login. > > > > On Tuesday, July 24, 2012 4:34:58 AM UTC+8, Anthony

[web2py] Re: SQLFORM.grid pagination refresh

2012-07-24 Thread Anthony
Then don't use the ajax() function. Instead, create a jQuery event handler to capture the keyup event. Then, in the handler, grab the input value and refresh the component by calling: web2py_component('{{=URL("default", "ajaxTable2.load")}}' + '?count=' +input_value , 'grid') In that case, the

[web2py] Re: SQLFORM.grid pagination refresh

2012-07-24 Thread dave
The problem is when I filter using input boxes from outside, I need to use the ajax function from the view, like , and I do replace the load function which is inside the div grid {{=LOAD('default','ajaxTable2.load',ajax=True, target='grid', content='loading...')}} when the first page lo

[web2py] Question on using legacy tables

2012-07-24 Thread tomt
I use several legacy tables in my web2py applications A typical definition that I use is: db2.define_table('analogpoint', Field('pointnumber','integer',writable=False), Field('pointname','string',writable=False), primarykey=['pointnumber'], migrate=False ) I can access this tab

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Alec Taylor
Thanks, On that note, I really should link up my 'group_of_events' table with web2py's build-in RBAC On Wed, Jul 25, 2012 at 1:11 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This is the right way to think about it. :-) > > > On Tuesday, 24 July 2012 21:56:18 UTC-5, Cliff Kachins

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-24 Thread Massimo Di Pierro
What database are you using? What driver? The operational error is not a web2py error. It is a database error. It means web2py is sending invalid SQL, for example referring a column that does not exist. You may want to try: try: db.mytable.import_from_csv_file([file object], null='') except

Re: [web2py] Re: MySQL DB reads have stopped working for one table in a background process

2012-07-24 Thread Massimo Di Pierro
First of all we need to establish there is a problem and this is not the expected behavior. I am not sure. MySQL has 4 different isolation modes and defaults to: http://dev.mysql.com/doc/refman/5.1/en/set-transaction.html#isolevel_repeatable-read "All consistent reads within the same transacti

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-24 Thread Mark Li
Anthony, I tried db.mytable.import_from_csv_file([file object], null='') from the web2py shell, but it gave me an error: OperationalError: near ")": syntax error In fact, trying to import from csv using the book's method does not work at all, although exporting works fine. Viniciusban, I'm

Re: [web2py] Re: MySQL DB reads have stopped working for one table in a background process

2012-07-24 Thread David Phillips
Hello, Massimo. > What changed? Did you upgrade? What web2py version? I removed a task in the background process that was periodically calling db.commit. In its place, I started using memcache where I had been writing to the db. I haven't upgraded. I've been using 1.99.7 all along. > When y

Re: [web2py] Re: how to achieve public/private key authentication for web service in web2py?

2012-07-24 Thread Amit
Thanks Michele and Derek..nice post , i am looking exactly the same :) On Wed, Jul 25, 2012 at 4:09 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > > This is very similar to what TSL accomplishes with x509 certificates. > There is a slight difference, the server does not own a public

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Massimo Di Pierro
This is the right way to think about it. :-) On Tuesday, 24 July 2012 21:56:18 UTC-5, Cliff Kachinske wrote: > > For production use Postgres (first choice) or MySQL. Do your homework on > indexing and other optimization tricks. > > If your site gets big enough to have performance problems becaus

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Massimo Di Pierro
Mind that for each user you have auth.user_groups = { group_id: group_obj, ... } this allows you to efficiently do: if group_in in auth.user_groups and it can also be used a map to convert the group_id to the group_obj.role and vice versa. the dict is automatically updated when the user does a

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Cliff Kachinske
For production use Postgres (first choice) or MySQL. Do your homework on indexing and other optimization tricks. If your site gets big enough to have performance problems because there are too many rows in a table, you will also have enough income to hire a really good dba :). On Tuesday, Jul

[web2py] Re: Suggestion - a pickled DAL field

2012-07-24 Thread Anthony
On Tuesday, July 24, 2012 5:58:29 PM UTC-4, Derek wrote: > > Make it a computed field? > I'm not sure that would be helpful in this case. A computed field computes its value automatically based on other fields in the record, but in this case, he needs to pickle an object, which is not one of the

[web2py] Re: MySQL DB reads have stopped working for one table in a background process

2012-07-24 Thread Massimo Di Pierro
What changed? Did you upgrade? What web2py version? When you say the select does not work anymore, dwhat do you mean? Does it lock or do you get a traceback? Which database driver? People have reported problems with pymysql but not with mysqldb. On Tuesday, 24 July 2012 19:42:29 UTC-5, David Ph

[web2py] MySQL DB reads have stopped working for one table in a background process

2012-07-24 Thread David Phillips
On the eve of delivering a project to a client, I've come up against a problem that has me stumped. select() statements on one of my mysql tables have stopped working. My application is a web2py web server and a background process (also called a homemade task queue in the web2py book). They

[web2py] web2py instant admin

2012-07-24 Thread Kevin Miller
Hi all, Anyone using web2py instant admin? I have a problem with the css. I have installed the plugin its functional, but its not picking up the CSS. Any reason? Thanks very much. Kevin --

[web2py] callback on an anchor tag

2012-07-24 Thread Toby Shepard
Working through the html helper docs, I decided to try the callback parameter to the anchor tag: {{=A("CLICK ME!!", callback=URL('http://mysite.com/foo.html'), target='hater')}} {{=DIV(_id = 'hater')}} foo.html delivers a bit of content. This did not work. Viewing the source, I see that the

Re: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem

2012-07-24 Thread Massimo Di Pierro
because it is not supported in python 2.4 versions. But you are right. Who cares about 2.4 any more. On Tuesday, 24 July 2012 16:57:46 UTC-5, villas wrote: > > But why not this which seems much more readble? > > value = +1 if mode == 'plus' else -1 > > > > On Tuesday, July 24, 2012 10:20:51 PM UT

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Craig Younkins
What is the deployment configuration? What wsgi server and what web server? Craig Younkins On Tue, Jul 24, 2012 at 5:55 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Is there an open issue about this? If not, can you open one with more > details? > > > On Tuesday, 24 July 2012 16

[web2py] Re: how to achieve public/private key authentication for web service in web2py?

2012-07-24 Thread Michele Comitini
This is very similar to what TSL accomplishes with x509 certificates. There is a slight difference, the server does not own a public key for each client: it verifies that the client owns an x509 certificate signed by the correct certification authority. So no need to store public keys. in a

Re: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem

2012-07-24 Thread Jonathan Lundell
On 24 Jul 2012, at 2:57 PM, villas wrote: > But why not this which seems much more readble? > > value = +1 if mode == 'plus' else -1 Originally for compatibility with Python 2.4. Not sure how much of a priority that is these days... > > > > On Tuesday, July 24, 2012 10:20:51 PM UTC+1, pjryan

[web2py] Re: Suggestion - a pickled DAL field

2012-07-24 Thread Derek
Make it a computed field? On Tuesday, July 24, 2012 5:34:07 AM UTC-7, Omri Har-Shemesh wrote: > > > Hi web2pyers, > > very often, I have a field in the table which has to hold a complicated > value (most often numpy arrays). The way I implement it is that I use > "text" as the type of field, and t

Re: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem

2012-07-24 Thread villas
But why not this which seems much more readble? value = +1 if mode == 'plus' else -1 On Tuesday, July 24, 2012 10:20:51 PM UTC+1, pjryan126 wrote: > > I'm working through this same example, and I'm having trouble > understanding how the following resolves: > > value = (mode=='plus') and +1 or

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
Is there an open issue about this? If not, can you open one with more details? On Tuesday, 24 July 2012 16:31:52 UTC-5, howesc wrote: > > one other scenario.. > > i reported a few months back that running web2py on GAE with python2.7 and > multi-threading had odd behaviors with the globals

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
Are you using current in modules? On Tuesday, 24 July 2012 16:31:52 UTC-5, howesc wrote: > > one other scenario.. > > i reported a few months back that running web2py on GAE with python2.7 and > multi-threading had odd behaviors with the globals (request, response, > session). i have yet tr

Re: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem

2012-07-24 Thread Massimo Di Pierro
It is the same as in if mode == 'plus': value = +1 else: value = -1 On Tuesday, 24 July 2012 16:20:51 UTC-5, pjryan126 wrote: > > I'm working through this same example, and I'm having trouble > understanding how the following resolves: > > value = (mode=='plus') and +1 or -1 > > Can any

[web2py] Re: how to achieve public/private key authentication for web service in web2py?

2012-07-24 Thread Derek
Might want to try this... https://code.google.com/p/simpatica/ from this post: https://groups.google.com/forum/?fromgroups#!topic/web2py/0kzJf5Kk62Q On Tuesday, July 24, 2012 1:33:48 AM UTC-7, Amit wrote: > > Hi, > I have to provide public/private key authentication for accessing web > service

Re: [web2py] User accessed site without logging in

2012-07-24 Thread howesc
one other scenario.. i reported a few months back that running web2py on GAE with python2.7 and multi-threading had odd behaviors with the globals (request, response, session). i have yet tracked down the issues i was having (might have been a coding error on my part).but if you are us

Re: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem

2012-07-24 Thread pjryan126
I'm working through this same example, and I'm having trouble understanding how the following resolves: value = (mode=='plus') and +1 or -1 Can anyone explain to me what is happening with this line of code? On Monday, March 26, 2012 10:28:27 AM UTC-4, Omi Chiba wrote: > > OK it worked ! > > Th

Re: [web2py] Any jquery gurus out there?

2012-07-24 Thread RKS
I will test both of the above comments. Sorry it took so long for me to get back, but I didn't realize anyone had responded. Thanks for the answers. On Wednesday, July 11, 2012 5:58:19 PM UTC-5, demetrio wrote: > > > I don't understand a lot the pourpose of this selector > > > $(document.loc

[web2py] Re: Any jquery gurus out there?

2012-07-24 Thread RKS
That is true. I have also run into that problem. At first, I thought it might be that too so I changed it and it still didn't work right. When I noticed I was sure that was it (or rather was hoping that was it.) I did also do a search and it seems that problem is not very-well documented either

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
Perhaps it would be safe to block access to the site if request.client is "unknown". I think we should change web2py to block access to any web2py app if request.client does not validate as an IP address. Massimo On Tuesday, 24 July 2012 15:24:06 UTC-5, Massimo Di Pierro wrote: > > Here is a po

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
Here is a possible cause of the problem although I am not sure. There are two possible issues which may conspire to create this problem. Issue #1 === There is a session file in the app you sent me called: unknown-c4571a37... session files should be -. This means that one of th

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
Nothing stands out from your code. It is very good code. You have changed to gluon/tools.py but I do not think they can be causing this problem. On Tuesday, 24 July 2012 14:48:16 UTC-5, Massimo Di Pierro wrote: > > I should add that the conflict I mentioned below is not possible unless > there i

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
I should add that the conflict I mentioned below is not possible unless there is a proxy in between. That is because the session id includes the client IP. I really do not see how this problem can be possible. Are you sure they are not playing a prank on you? If they share a facebook page perha

Re: [web2py] Re: Multi-tenant social-network?

2012-07-24 Thread Alec Taylor
I was also worried that running queries such as "is user in this group?", "how many events does this group have?" would be much less efficient with everyones data in one place. But it's probably just a perception thing, as you say, and it sounds like the drawbacks outweigh the benefits... :\ S

[web2py] Re: Newbie: interactive monitoring of a scheduler job?

2012-07-24 Thread Niphlod
If you don't want your user to click somewhere every n seconds to see it, the only two ways are ajax (polling at n seconds interval the status) or websocket. The easier way is monitoring with ajax calls. You can find complete examples online. I'm sure that there are a lot of implementations, b

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
The only time I have seen something like this was long age. Web2py was running on replicated VMs behing a load balancer. If two requests from new users arrived within a short time frame (do not remember if a millisecond or a second), they were assigned the same session uuid because uuid.uuid4()

Re: [web2py] Re: weird behavior in crud update

2012-07-24 Thread Alec Taylor
On Wed, Jul 25, 2012 at 2:20 AM, Anthony wrote: > How about I move the Crud section to the end of the chapter, change the > section heading to "CRUD (Deprecated)", and add the following note at the > top of the section: > > Note: Although the CRUD system described in this section will remain > av

[web2py] Re: User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
No. It does not. Session IDs are only transferred via cookies. On Tuesday, 24 July 2012 11:04:58 UTC-5, Andrew wrote: > > Could be a session fixation attack. Web2py doesn't ever use session id's > in the url does it? > > On Tuesday, July 24, 2012 11:00:30 AM UTC-5, Neil wrote: >> >> Here is wha

Re: [web2py] User accessed site without logging in

2012-07-24 Thread pbreit
Can you look for any evidence in your server logs or auth_event table? Don't forget that sometimes trunk is actually more secure because fixes don't get "back-ported" to stable. Seems like we might need to see more code (ah, Massimo asked for such). What does this do? settings.login_method = 'l

[web2py] Re: New Plugin to add client side validation to your SQLFORM

2012-07-24 Thread Massimo Di Pierro
Can you tell us more about how it works? On Tuesday, 24 July 2012 09:38:51 UTC-5, Franco wrote: > > > > > Greetings everyone. I want to share with you this plugin, it's based on > jquery-validati

Re: [web2py] Best way to create db form with one option?

2012-07-24 Thread Alec Taylor
No worries. Does anyone have a neater solution? On Tue, Jul 24, 2012 at 11:25 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > So, what I have is not working like this! > > :( > > Richard > > On Tue, Jul 24, 2012 at 9:24 AM, Alec Taylor wrote: > >> Trying to create a simple button (for

[web2py] Re: validate_and_insert() question

2012-07-24 Thread tiadobatima
Thank you very much for the very detailed answer Niphlod! It's very clear now. And big thanks to Alec too. I did look into Twisted and Tornado, and they indeed look like a god fit for me. I'm still investigating. Cheers, g. On Monday, 23 July 2012 13:24:57 UTC-7, Niphlod wrote: > > With that s

Re: [web2py] client-side validation plugin

2012-07-24 Thread Alec Taylor
Looking good... can't wait to see a full client-side example with web2py server-side complete with auth [in fact, I probably can't wait and will end up writing it myself :P] On Tue, Jul 24, 2012 at 6:36 AM, Franco wrote: > Greetings everyone, I want to share with you a plugin that adds client >

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Anthony
How about I move the Crud section to the end of the chapter, change the section heading to "CRUD (Deprecated)", and add the following note at the top of the section: Note: Although the CRUD system described in this section will remain available for backward compatibility, it is no longer recomm

Re: [web2py] client-side validation plugin

2012-07-24 Thread Bruno Rocha
Sounds great! I would like to see it built in in SQLFORM(..., clientvalidation=True) On Mon, Jul 23, 2012 at 5:36 PM, Franco wrote: > Greetings everyone, I want to share with you a plugin that adds client > side validation to your forms. I hope this be helpful to you. > > It uses in the same wa

[web2py] Re: bootstrap and user panel

2012-07-24 Thread Farid Sanusi
sip, wanna to try. Thanks Martin. Pada Selasa, 24 Juli 2012 7:02:47 UTC+7, Martin.Mulone menulis: > > I want to share this two applications* > > Bootstrap welcome application* > > I made my own welcome scatfold app, using twitter bootstrap template. My > version is more like from the example tem

[web2py] New Plugin to add client side validation to your SQLFORM

2012-07-24 Thread Franco
Greetings everyone. I want to share with you this plugin, it's based on jquery-validation-engine plugin. It's easy to use, your only need to replace SQLFORM with JsSQLFORM and that's it. At

[web2py] client-side validation plugin

2012-07-24 Thread Franco
Greetings everyone, I want to share with you a plugin that adds client side validation to your forms. I hope this be helpful to you. It uses in the same way that you use SQLFORM class. See you soon. PS: Sorry for my bad english.

[web2py] Newbie: interactive monitoring of a scheduler job?

2012-07-24 Thread Tim Richardson
I'm using the 'experimental' scheduler with 1.99.7 . I know there are posts encouraging us to try the development version, but I'm just learning web2py and I'm trying to keep things as controlled as possible. Plus I don't know when the development version becomes stable. I can send a job to th

[web2py] Re: User accessed site without logging in

2012-07-24 Thread Andrew
Could be a session fixation attack. Web2py doesn't ever use session id's in the url does it? On Tuesday, July 24, 2012 11:00:30 AM UTC-5, Neil wrote: > > Here is what she told me: > > 1. She clicked a link (from Facebook), and was taken directly to one of > the pages for logged in users. I think

[web2py] Re: User accessed site without logging in

2012-07-24 Thread Neil
Here is what she told me: 1. She clicked a link (from Facebook), and was taken directly to one of the pages for logged in users. I think this was her first visit to the site. 2. She went back to Facebook, and re-clicked the link, and was again taken to a user page 3. She clicked the "Logout" lin

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Najtsirk
Nop, nothing like that. Ok, now the behavior is changed. The problem persists just with the boolean (when I set it to False...i have to submit twice). Text fields are ok now. It's funny, because i have very straightforward app. Model: db.define_table('blog', Field('naslov','string',label='N

Re: [web2py] Re: weird behavior in crud update

2012-07-24 Thread Bruno Rocha
http://www.bennadel.com/blog/2236-Empty-SRC-And-URL-Values-Can-Cause-Duplicate-Page-Requests.htm http://www.nczonline.net/blog/2009/11/30/empty-image-src-can-destroy-your-site/ --

[web2py] Re: User accessed site without logging in

2012-07-24 Thread Massimo Di Pierro
We will investigate this throughly but please get as much information as possible about what this person was doing. Did he try login? Could you also send me a copy of your app (confidentially)? The fact is even if there were a session conflict (I do not believe that is possible unless uuid is b

Re: [web2py] Re: weird behavior in crud update

2012-07-24 Thread Bruno Rocha
In your view, do you have any link or any or any ? My be you have an empty href='' or an empty src='' ? If you have it, so that is the problem! empty href or src or rel attributes leads on to form submit problems --

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Massimo Di Pierro
Can you post a minimalist app or instructions to reproduce the problem? Could you also open a ticket on google code so this gets tracked? Thanks. On Tuesday, 24 July 2012 08:56:36 UTC-5, Najtsirk wrote: > > I still have the same strange behaviour with SQLFORM.process(). > > > On Monday, 23 July 2

[web2py] Re: Suggestion - a pickled DAL field

2012-07-24 Thread Anthony
You could use a SQLCustomType field: http://web2py.com/books/default/chapter/29/6#Custom-Field-types-(experimental) . Anthony On Tuesday, July 24, 2012 8:34:07 AM UTC-4, Omri Har-Shemesh wrote: > > > Hi web2pyers, > > very often, I have a field in the table which has to hold a complicated > valu

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Jonathan Lundell
On 24 Jul 2012, at 6:41 AM, Neil wrote: > Good point about trunk. There are some features that I liked and got used to, > but nothing essential. > > I'll try to summarize any relevant settings in the hope that someone can spot > something. > > In 0.py I have: > > ... > settings.login_method

[web2py] Re: Exporting foreign keys as represented value

2012-07-24 Thread Anthony
Can you show the code you are using to get the data from the db to xlwt? Anthony On Tuesday, July 24, 2012 10:49:13 AM UTC-4, joe wrote: > > I am using xlwt to export the data (I want an excel file, and a bit more > control over format). I recently made it work, in about the most clumsy > way

Re: [web2py] prettydate question

2012-07-24 Thread Vladyslav Kozlovskyy
ctrlSoft, is issue still present ? Vladyslav Kozlovskyy (Ukraine) 23.07.12 13:32, ctrlSoft ???(??): datetime format is: 2012-07-18 10:00:00 hi in view i have following code: {{=prettydate(row.deadline,T)}} but result is : %d days ago %d days ago %d days ago %d days ago ... 1 week ago 1 we

[web2py] Re: Exporting foreign keys as represented value

2012-07-24 Thread joe
I am using xlwt to export the data (I want an excel file, and a bit more control over format). I recently made it work, in about the most clumsy way possible (getting a row object from the referenced table, casting it into a string, and finding the substring that I want to display), but there

[web2py] Re: Exporting foreign keys as represented value

2012-07-24 Thread Anthony
How are you exporting the data? The export_to_csv_file() method, for example, takes a "represent" argument -- if set to True, it will use each field's "represent" attribute to convert the values before exporting. Anthony On Tuesday, July 24, 2012 9:59:15 AM UTC-4, joe wrote: > > Hello > > I am

Re: [web2py] computed fields question

2012-07-24 Thread Bruno Rocha
yes I think it is a bug. the update form method checks for writable fields. should be documented or fixed. can you open the ticket? http://zerp.ly/rochacbruno Em 24/07/2012 10:26, "Vasile Ermicioi" escreveu: > may be the writable False can be the issue > > > yes, that is, > thanks a lot Bruno

[web2py] Exporting foreign keys as represented value

2012-07-24 Thread joe
Hello I am working with xlwt and trying to export a table of mine into a .xls file. This table contains some foreign keys, and they are being exported as the id of the other table rathan than the 'name' field, which is what I want to display. I define the foreign key fields in the table like

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Najtsirk
I still have the same strange behaviour with SQLFORM.process(). On Monday, 23 July 2012 23:55:49 UTC+2, Najtsirk wrote: > > Hi, > > each time i want to update crud, i have to submit changes twice to get it > actually updated. > > I set crud.settings.detect_record_change = False, which helps with

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Neil
Good point about trunk. There are some features that I liked and got used to, but nothing essential. I'll try to summarize any relevant settings in the hope that someone can spot something. In 0.py I have: ... settings.login_method = 'local' settings.login_config = '' ... in db.py: ... aut

Re: [web2py] Best way to create db form with one option?

2012-07-24 Thread Richard Vézina
So, what I have is not working like this! :( Richard On Tue, Jul 24, 2012 at 9:24 AM, Alec Taylor wrote: > Trying to create a simple button (form), showing "Join group" if user > isn't a member, and "Leave group" if user is a member. > > On Tue, Jul 24, 2012 at 11:14 PM, Richard Vézina < > ml.

Re: [web2py] computed fields question

2012-07-24 Thread Vasile Ermicioi
> > may be the writable False can be the issue yes, that is, thanks a lot Bruno but isn't it a weird behavior? --

Re: [web2py] Best way to create db form with one option?

2012-07-24 Thread Alec Taylor
Trying to create a simple button (form), showing "Join group" if user isn't a member, and "Leave group" if user is a member. On Tue, Jul 24, 2012 at 11:14 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > I am not exactly sure what you really want to achieve, but I did something > like t

Re: [web2py] Best way to create db form with one option?

2012-07-24 Thread Richard Vézina
I am not exactly sure what you really want to achieve, but I did something like that where the user is allow to change from one group to an other base on preset of allowed groups. If you are interested I can show you the code. Richard On Tue, Jul 24, 2012 at 9:09 AM, Alec Taylor wrote: > I'm tr

Re: [web2py] User accessed site without logging in

2012-07-24 Thread Richard Vézina
For sure using trunk is not very safe in production environnement, not because it not secure, but because sometimes things brake when new features are added. If you don't need edge feature, better to stick with stable. For the problem you describe, I think if you show us the way you activate auth

[web2py] Best way to create db form with one option?

2012-07-24 Thread Alec Taylor
I'm trying to create a simple form which presents the user with a functional "Join" button if they aren't a member, and a "Leave group" button if they aren't. Unfortunately I seem to be overcomplicating this: @auth.requires_login()def group_membership(group_id): is_member = False try:

[web2py] Suggestion - a pickled DAL field

2012-07-24 Thread Omri Har-Shemesh
Hi web2pyers, very often, I have a field in the table which has to hold a complicated value (most often numpy arrays). The way I implement it is that I use "text" as the type of field, and then simply pickle.dumps(my_value) when I save the field, and then pickle.loads(value_from_db) to access the

Re: [web2py] displacement of password button [web2py twitter bootstrap]

2012-07-24 Thread Kevin Miller
Thank you for testing for me. I downloaded this morning at its working now. I had a previous download that was not updated, so whatever was causing that was fixed some time ago. Thanks again. On Tue, Jul 24, 2012 at 7:17 AM, Johann Spies wrote: > On 24 July 2012 14:13, Kevin Miller wrote: > >>

[web2py] User accessed site without logging in

2012-07-24 Thread Neil
I just heard from someone who had never been to my site before. When she visited (on her phone), it was already logged on as another user. This other user (she told me his name) is located on the other side of the world, and may or may not have logged out. I'm rather worried - she was accessing

Re: [web2py] displacement of password button [web2py twitter bootstrap]

2012-07-24 Thread Johann Spies
On 24 July 2012 14:13, Kevin Miller wrote: > Which version are you using? oops... I forgot to say that it only happens > in google chrome. > > > I have updated this morning from the trunk and that was using Firefox. I have tested now in Chrome and it also works correctly. Regards Johann --

Re: [web2py] displacement of password button [web2py twitter bootstrap]

2012-07-24 Thread Kevin Miller
Which version are you using? oops... I forgot to say that it only happens in google chrome. On Tue, Jul 24, 2012 at 4:58 AM, Johann Spies wrote: > On 24 July 2012 05:03, Kevin Miller wrote: > >> >> Hi all, >> >> Anyone knows why the password button is displaced by the welcome message >> when usi

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-24 Thread Massimo Di Pierro
In gluon/sqlhtml.py there is this logic: elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname ... newfilename = field.store(source_file, original_filename, fiel

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Najtsirk
Crud is much quicker to implement then SQLFORM (or maybe i just do not understand it and I'm wrong on that). This was cool for the purpose of making web app prototypes. But i agree on the principle to go with one (and better) tool. Thanks for explanation. Kristjan On Monday, 23 July 2012 23:

Re: [web2py] Re: Auth has no attribute signature

2012-07-24 Thread Massimo Di Pierro
Good point. I will discuss this on web2py-developers. We may need to revert this patch or find a different solution to the problem. On Monday, 23 July 2012 23:43:07 UTC-5, David J wrote: > > Ok. > > I am not going to complain about it because I fixed the app, > > However, I did see it in the doc

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Massimo Di Pierro
I think we should but I am afraid people may misunderstand. Crud is not going away (because of backward compatibility), simply it is no longer the recommended way to implement the functionality. On Monday, 23 July 2012 23:16:18 UTC-5, Anthony wrote: > > Should we mark Crud as deprecated in the b

Re: [web2py] computed fields question

2012-07-24 Thread Bruno Rocha
you dont need to set writable=False. I think it is default for conputed fields. I've seem this happening before, but I cant remember the reason. (may be the writable False can be the issue) http://zerp.ly/rochacbruno Em 24/07/2012 07:34, "Vasile Ermicioi" escreveu: > hi, > > I have a function a

[web2py] Re: weird behavior in crud update

2012-07-24 Thread Massimo Di Pierro
I think we should. On Monday, 23 July 2012 23:16:18 UTC-5, Anthony wrote: > > Should we mark Crud as deprecated in the book? > > On Monday, July 23, 2012 11:55:14 PM UTC-4, Massimo Di Pierro wrote: >> >> Please do not use crud. It is not needed any more. You can do everything >> and better with S

Re: [web2py] Re: bootstrap and user panel

2012-07-24 Thread Martín Mulone
Edit model/00main.py and change migrate=False to use the current sqlite db. Or delete the content in dabase then add a user and make membership of the "Admin" group with appadmin. define_tables() got an unexpected keyword argument 'signature' > What am I doing wrong ? > mmh perhaps because I mad

[web2py] computed fields question

2012-07-24 Thread Vasile Ermicioi
hi, I have a function and a computed field def content_snapshot(s): #do something with s return modified_s Field("content_snapshot", "text", readable=False, writable=False, compute=lambda r: content_snapshot(r['content'])), and it works only for insert operations, on updates it is n

Re: [web2py] Re: bootstrap and user panel

2012-07-24 Thread Javier Pepe
Hello Delete the content on database dir. The system recreate auth tables. On Tue, Jul 24, 2012 at 2:49 AM, murtaza52 wrote: > > Hello Martin, > > The CSS is cool so +1 for this. > > 1) I cloned your welcome app repo and placed it under applications, this > is the summary of the error I get wh

Re: [web2py] displacement of password button [web2py twitter bootstrap]

2012-07-24 Thread Johann Spies
On 24 July 2012 05:03, Kevin Miller wrote: > > Hi all, > > Anyone knows why the password button is displaced by the welcome message > when using twitter bootstrap and Nightly Build? > I have attached a picture as example. > > > No such problem here. I have attached mine (on the welcome app) Reg

[web2py] how to achieve public/private key authentication for web service in web2py?

2012-07-24 Thread Amit
Hi, I have to provide public/private key authentication for accessing web service (REST) from client in my web2py application.How to achieve it? Scenario: 1.Each client will have unique private key which will be sent to the server alongwith request. 2. Server has to authenticate private key usi

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-24 Thread Annet
I also found out that underscores are no allowed in the file name: portrait_01.jpg results in a error message. Apart from the usual, are there any other characters not allowed in file names? Kind regards, Annet --

[web2py] field of type upload exceptions.UnboundLocalError

2012-07-24 Thread Annet
In a table I defined the following field: Field('photoFile',type='upload',autodelete=True), with the following validator: db.Person.photoFile.requires=IS_EMPTY_OR(IS_IMAGE(extensions=('gif','jpg','jpeg','png'),maxsize=(72,72)),IS_LENGTH(36*1024,error_message='file size exceeds 36 KB')) When I

[web2py] how to change the behavior of the login functionality when using openid

2012-07-24 Thread murtaza52
Hi, I would like to change the behavior once an openid authenticated user is redirected back to the app. Currently this is the behaviour of the login page when using the openidauth- 1) User enters the open ID endpoint and enters submit. 2) User is redirected to the openid server. 3) User a

Re: [web2py] Re: load deletes the values of submit-buttons

2012-07-24 Thread Martin Weissenboeck
Hi Antony, the workaround http://forum.jquery.com/topic/submit-event-serialize-and-submit-buttons-get-the-button-name works fine - thank you! 2012/7/23 Anthony > This is not specific to the LOAD() helper but a limitation of the jQuery > serialize() method used to post form data via Ajax. See >