[web2py] Re: Why does 'group' field cause web2py to stall?

2012-12-01 Thread Chris
That name is probably a reserved word in the database engine you're using. Every DBMS has a list of words that are off-limits for use as object (table, field, index, function etc.) names. GROUP is a pretty common one because of the GROUP BY operation. Take a look at gluon / reserved_sql_keyw

Re: [web2py] Why does 'group' field cause web2py to stall?

2012-12-01 Thread Bruno Rocha
try DAL(..., check_reserved=['all']) You cannot name a field "group" it is a SQL reserved keyword. Bruno Rocha http://rochacbruno.com.br mobile Em 02/12/2012 02:46, "David Tucker" escreveu: > I'm editing my data model in db.py and trying to add a field to a table of > accounts that groups the

[web2py] Bug when rendering nested dictionaries as JSON? -- depends on specific values of keys

2012-12-01 Thread Chris
I've found a strange behavior in 1.99.7 (which is the same in 2.2.1 except for a code cleanup issue). This is either a bug or I'm confused (don't rule that out). This is a long message -- I thought it was important to include a detailed demo of the phenomenon. The idea of generic views is won

Re: [web2py] Re: web3py?

2012-12-01 Thread Richard Penman
Interesting development. This seems to address the common criticisms of web2py, which aren't an issue for me but surely deter others. On Friday, November 30, 2012 3:51:20 AM UTC+11, LightDot wrote: > > Some valid and interesting questions can get unanswered, slip below > the radar, that's boun

[web2py] Re: MARKMIN line break

2012-12-01 Thread Massimo Di Pierro
You are missing that you need to generate html and {{=anything}} always escape anything. You want: {{=(row.body1)}}{{=(row.body2)}} or {{=CAT(row.body1,BR(),row.body2)}} or {{=CAT(row.body1,XML(''),row.body2)}} or {{=XML(row.body1+''+row.body2, sanitize=True)}} The latter is not quite

[web2py] Why does 'group' field cause web2py to stall?

2012-12-01 Thread David Tucker
I'm editing my data model in db.py and trying to add a field to a table of accounts that groups them using a foreign key. Field('group', 'reference groups', ondelete='CASCADE', required=True, default=db(db.groups).select().first().id), causes a ticket that reads: and

[web2py] Re: MARKMIN line break

2012-12-01 Thread Massimo Di Pierro
On Saturday, 1 December 2012 21:43:22 UTC-6, apps in tables wrote: > > > I am trying these: > > {{=(row.body1)+ \n\n +(row.body2)}} > > {{=(row.body1)+ ' \n\n '+(row.body2)}} > > {{=(row.body1)+ [[NEWLINE]] +(row.body2)}} > > {{=(row.body1)+ '[[NEWLINE]]' +(row.body2)}}

[web2py] Re: MARKMIN line break

2012-12-01 Thread apps in tables
I am trying these: {{=(row.body1)+ \n\n +(row.body2)}} {{=(row.body1)+ ' \n\n '+(row.body2)}} {{=(row.body1)+ [[NEWLINE]] +(row.body2)}} {{=(row.body1)+ '[[NEWLINE]]' +(row.body2)}} and they are not working. What am i missing? Regards, Ashraf --

[web2py] Re: getting access to sqlform.grid forms in a view

2012-12-01 Thread david.waldrop
You are right. As usual. Thanks. > >> > --

[web2py] cron job not running at all

2012-12-01 Thread david.waldrop
I am trying to get the basic cron job to run on a new web2py application but amnot having any success. I read about starting web2py with the -Y option I am running on ubuntu and using the native web2py server I have a db.commit() in the controller function the function runs perfectly when i run th

[web2py] Re: Hide form and erase input

2012-12-01 Thread Julian Sanchez
Just curious... did you end up using a completely custom form or were you able to manipulate the SQLFORM inside the controller? On Saturday, December 1, 2012 7:03:33 AM UTC-6, Daniele wrote: > > I ended up putting them in separate divs and hiding the entire div. Works > like a charm! > Thanks gu

[web2py] small typo in Book: Caching with Redis

2012-12-01 Thread Ralo Tannahill
http://www.web2py.com/books/default/chapter/29/13#Caching-with-Redis "_cache" missing in the module name: from gluon.contrib.redis*_cache* import RedisCache cache.redis = RedisCache('localhost:6379',db=None, debug=True) Best regards --

[web2py] Re: Cannot import module 'lpod'

2012-12-01 Thread Massimo Di Pierro
Strange this is ok dependent. On Tuesday, 27 November 2012 14:39:30 UTC-6, omicron wrote: > > And with CentOS 6.3 and his Python 2.6, this problem doesn't exist !!! > > Le jeudi 15 novembre 2012 12:24:16 UTC+1, omicron a écrit : >> >> I use an Ubuntu 12.04LTS, python 2.7 and web2py 2.2.1 >> lpod i

[web2py] Re: V 2.2.1 linked_tables broken in smartgrid?

2012-12-01 Thread Massimo Di Pierro
Probably not but I am not sure I understand the problem. Can you explain step by step how to reproduce this? On Saturday, 1 December 2012 16:07:57 UTC-6, Rakesh Singh wrote: > > Hi, > > I also removed "db.table.column.readable = False" to enable the column to > be displayed in the smartgrid. > H

[web2py] Re: SQLFORM.grid and classes on GAE

2012-12-01 Thread howesc
this seems to me like a bug in polymodel on GAE. my guess is that the proper implementation would be to have 2 tables, location_outdoor and location_indoor in the GAE database. does this seem correct to you? i can't guarantee my speed right now...but i can look into the DAL and see if i can f

[web2py] Re: V 2.2.1 linked_tables broken in smartgrid?

2012-12-01 Thread Rakesh Singh
Hi, I also removed "db.table.column.readable = False" to enable the column to be displayed in the smartgrid. However, when searching the linked column for a value in the smartgrid, an error is encountered : invalid literal for int() with base 10: 'JHB' In this case, JHB was the value I search

Re: [web2py] Two components + two forms

2012-12-01 Thread Massimo Di Pierro
Do the two components point to the same action, or do they contain forms with same formname? Either case that would not work because multiple forms in the same page must have different formnames? On Saturday, 1 December 2012 13:32:48 UTC-6, David Sorrentino wrote: > > Hello everybody, > > I'm s

Re: [web2py] Re: About crud.update to edit or update a user's profile info !

2012-12-01 Thread Le Don X
thank you for the response Massimo, I do agree with your thoughts regarding the vulnerability exposed upon a new registration ! that can easily be arranged by adding an additional table to manage all users profile pics ! ... that way, a user can only upload his avatar ( or picture ) only when the

[web2py] Two components + two forms

2012-12-01 Thread David Sorrentino
Hello everybody, I'm struggling for a while with a problem. I have a page with two components. Each component contains a form. I embedded both the components with LOAD. Unfortunately when I submit one of the two forms, all the values are deleted and apparently there is no submission. If then I sub

[web2py] Re: About crud.update to edit or update a user's profile info !

2012-12-01 Thread Massimo Di Pierro
I will look into this shortly anyway... having a picture in the auth_user table is a vulnerability. This is because the upload entry may appear upon registration allowing un-registered users to uploading large files. On Saturday, 1 December 2012 08:59:21 UTC-6, Don_X wrote: > > Hello web2py user

[web2py] Re: importing issues

2012-12-01 Thread Massimo Di Pierro
Did you restart web2py/web server? On Friday, 30 November 2012 15:07:26 UTC-6, Maggs wrote: > > Hm, ok, that makes sense. However I have changed the name of the module > within my app and restart web2py but I'm still getting the same error. > Now the case is: > site-packages/mymodule/a.py > site

[web2py] Re: Upload directly to the server: error

2012-12-01 Thread Massimo Di Pierro
You cannot do: open(...,'wb').write(form.vars.myfile.file.read()) because this read the entire file in memory before writing it. You need to use http://docs.python.org/2/library/shutil.html and do shutil.copyfileobj(form.vars.myfile.file, open(...,'wb')) Massimo On Friday, 30 November 2012 1

[web2py] Re: Proper way to reference logged user

2012-12-01 Thread villas
Put everyone in the auth_user table and use groups. That could save you heaps of time down the line. Otherwise I can imagine you'll start reinventing what's already available to you in web2py. Use the framework and the force will be with you! If you need to keep lots of different info depend

[web2py] multiple profile images

2012-12-01 Thread Jon Molesa
i'm interested in allowing users to upload multiple profile pictures stored as blobs. Obviously I need an intermediate table, images, to store the images but I'm unclear how to link it to the users table following http://stackoverflow.com/questions/6334360/web2py-how-should-i-display-an-uploaded-i

[web2py] Re: Transactions in Web2Py over Google App Engine.

2012-12-01 Thread dlypka
I found this: https://developers.google.com/appengine/docs/python/datastore/overview#Cross_Group_Transactions "For example, to increment a counter field in an object, you need to read the value of the counter, calculate the new value, and then store it back. Without a transaction, it is possible

[web2py] Re: LOAD form deferred by jQuery UI tabs -- how to?

2012-12-01 Thread Anthony
The LOAD helper simply generates HTML like the following: loading... So, a div with a particular id is created, and the web2py_component() Javascript function (defined in /static/js/web2py.js) is called with the id of that d

[web2py] About crud.update to edit or update a user's profile info !

2012-12-01 Thread Don_X
Hello web2py users, I am in the process of completing the "edit profile" option for the web app members and I am experiencing a particular problem that is causing me a headache ! in the profile controller, I am using the following function to update a user's profile : def editprofile(): t

[web2py] Re: Proper way to reference logged user

2012-12-01 Thread Daniele
Hmmm that's one option, but here's the problem. Basically, I want users to sign up very easily. So I'm just using web2py's default auth for that. Then, I'd like them to pick if they are tutors/students or both. There is additional information they'd have to input in some forms for both roles. Whi

[web2py] Re: How to make an admin session longer?

2012-12-01 Thread Niphlod
look at the first line of applications/admin/models/0.py :P On Saturday, December 1, 2012 1:28:52 AM UTC+1, Luca wrote: > > I am developing an app, and I find it annoying that I get so many > "communication error" when I try to save after working on the code for some > length of time. > Is there

[web2py] Re: LOAD form deferred by jQuery UI tabs -- how to?

2012-12-01 Thread Niphlod
load calls web2py_component(), that is defined in web2py_ajax.js . Look at that if you're looking to an integration with your code. On Saturday, December 1, 2012 10:45:49 AM UTC+1, Joe Barnhart wrote: > > So I'm designing the world's greatest user interface and I happened on the > idea of making

[web2py] Re: Hide form and erase input

2012-12-01 Thread Daniele
I ended up putting them in separate divs and hiding the entire div. Works like a charm! Thanks guys On Thursday, November 29, 2012 4:44:50 PM UTC, Anthony wrote: > > The easiest way is probably via a custom form: > http://web2py.com/books/default/chapter/29/07#Custom-forms. > > Another option --

[web2py] LOAD form deferred by jQuery UI tabs -- how to?

2012-12-01 Thread Joe Barnhart
So I'm designing the world's greatest user interface and I happened on the idea of making my numerous SQLFORMs easier to navigate by using jQuery UI tabs and the "load ajax" feature. Conceptually, what I want to do should be simple. Load the form using =LOAD, but only when the tab is clicked o

Re: [web2py] Re: Self-joins not working.

2012-12-01 Thread Luc Chase
Would the test include a test of the Wizard's ability to implement this? The error first surfaced there. -- Luc. On Friday, 30 November 2012 15:15:39 UTC, Richard wrote: > > Ask again when you are ready I have little app dedicated to check for this > issue. > > Richard > > On Fri, Nov 30, 201