[web2py] Ajax and table rows.

2011-11-21 Thread tsvim
Hi all, I'm trying to have a ajax callback function whenever I click a certain row. I'd like that row to return the id of the record the row represents. I'm at loss as to the middle argument for the ajax function. I checked the function in the controller gets called but the argument is wrong. I

[web2py] Re: Django urls to web2py

2011-11-21 Thread Constantine Vasil
When routes.py is the pattern based system, it works locally, but uploading to the GAE cannot find the icons, stylesheets, etc. On the server I see the massage: select routing parameters: BASE

[web2py] Re: Authorization decorators always generate db queries

2011-11-21 Thread Ids
Checked it just now with Version 1.99.3 (2011-11-20 21:10:53) dev Everything now works ok, no more unnecessary database queries from auth decorators. Thanks On Nov 19, 9:37 am, Ids idsvandermo...@gmail.com wrote: Ok. Will try it monday when I get back to work and have access to a computer with

[web2py] problem with scheduler

2011-11-21 Thread Manuele
Hi, I'm using web2py version 1.99.2 with the new scheduler. I have a scheduled function that is run once a day at the same time with this parameters: Start Time: 2011-11-10 01:30:00 Next Run Time: 2011-11-22 01:30:00 Stop Time:2020-01-01 00:00:00 Repeats:0 Period:

Re: [web2py] Re: Shortcut for fetching a row

2011-11-21 Thread Khalil KHAMLICHI
There is this important rule that all programers must respect: write code YOU can understand. Khalil

[web2py] Problem in deploying with cherokee+uwsgi

2011-11-21 Thread Vincenzo Ampolo
Hi I just downloaded web2py package on a ubuntu server and i set up with cherokee + uwsgi. The uwsgi connection string is /usr/local/bin/uwsgi -s 127.0.0.1:43658 -M -p 8 -z 15 -L -l 128 /var/www/argomenti.in/web2py/wsgihandler.py --pythonpath /var/www/argomenti.in/web2py When i try to

[web2py] autocomplete type than tab but not autocompleted

2011-11-21 Thread szimszon
Hi! Is it OK that if I type something in autocomplete field then TAB to the suggestions then hit ENTER but nothing is changed in the field? It is not completed. Tnx.

[web2py] Re: Memory leak with scheduler.py and MySQL

2011-11-21 Thread szimszon
Is that fixed already?

Re: [web2py] problem with scheduler

2011-11-21 Thread Martín Mulone
I think repeats=0 is not working, try with another value like 999, 99 2011/11/21 Manuele manuele.pese...@gmail.com ** Hi, I'm using web2py version 1.99.2 with the new scheduler. I have a scheduled function that is run once a day at the same time with this parameters: Start Time:

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread Rahul
Hey All, I have added a slice for SQLForm.grid in web2py slices. I hope it is of help to everyone starting up with it. Slice#148 (May be it needs proper formatting) http://www.web2pyslices.com/slices/take_slice/148 Villas, I have added the SQLForm.grid syntax derived from your code thread

Re: [web2py] Re: socket.io Web2Py

2011-11-21 Thread Shiv
Thanks for sharing Information. I have used Tornado, Gevent and socket.io and its working fine. Best Regards Shiv On Fri, Nov 18, 2011 at 9:01 AM, Matt Gorecki m...@goelephant.com wrote: I am able to send socket.io events with this code: https://gist.github.com/1375505 It's based off an

[web2py] Register user programmatic way

2011-11-21 Thread Shiv
Hi, I want to import the user details from XL file and register in the user_auth table. If you can share info on how to register the users programmatic way, it will be of great help. Thanks Regards Shiv

[web2py] Re: Problem in deploying with cherokee+uwsgi

2011-11-21 Thread Fran
Hi Vincenzo, The folder to which you need write permission is /path/to/web2py/applications/yourapplication/errors Note that uwsgi may run as a different user to Cherokee. I use Cherokee with Web2Py keep my installation notes here:

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread villas
Massimo, I tried the expressions, but it did not seem to work. Could you consider providing an example so we could get that working? I would be delighted if VirtualFields could be displayed. Do you think that this would be possible? Regards, David

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread villas
Rahul, it is a very good thing that you are trying to pull all this info together. I am sure it will help the documentation effort. Thanks.

Re: [web2py] Register user programmatic way

2011-11-21 Thread VIREN PATEL
Hi Bruno, Thanks a lot that was really helpful and solved mine and Shiv problem Thanks, Viren On Mon, Nov 21, 2011 at 5:35 PM, Bruno Rocha rochacbr...@gmail.com wrote: *Create this function in some model* * * *def new_user(first_name, last_name, email, passw): **users =

[web2py] ValueError: need more than 1 value to unpack

2011-11-21 Thread Rahul
Hi All, Is there a solution for below traceback I posted (I am on 1.99.2, win7, firefox,ie9). Tried search for a solution in below thread .. no help ... http://groups.google.com/group/web2py/browse_thread/thread/fc4a30879f5590e/59d060e8ded6eae0 Traceback

Re: [web2py] Ajax and table rows.

2011-11-21 Thread Bruno Rocha
The ['id'] middle arg of the ajax function works only with forms, and it looks for the name attribute in form inputs for check its val(). your code needs to be something like this: {{extend 'layout.html'}} *script $(document).ready(function () { $('.row').click(funtion(){* * **

Re: [web2py] ValueError: need more than 1 value to unpack

2011-11-21 Thread ~redShadow~
On Mon, 2011-11-21 at 04:48 -0800, Rahul wrote: my model (db.py)- db.define_table('updates', Field('description', 'text'), Field('updated_on','date', readable=False, writable=False, default=now), Field('posted_by',

[web2py] Re: web2py on windows 7

2011-11-21 Thread stas zytkiewicz
Ok, I'll now follow the web2py book, something I should have done to start with :-/ I'm trying to install web2py as a windows 7 service and used an options.py file as described in the book. But it fails to install, it says (in dutch: Error installing service: Access denied. (5)) web2pyweb2py.exe

Re: [web2py] ValueError: need more than 1 value to unpack

2011-11-21 Thread Vinicius Assef
Rahul, this is a str.split() error and it happens when there are less pieces than str.split() expects. An example: fullname = 'John Smith' (first_name, last_name) = fullname.split( ) print 'first:', first_name, '- last:', last_name John - Smith fullname = 'John' (first_name, last_name) =

[web2py] Re: Authorization decorators always generate db queries

2011-11-21 Thread Massimo Di Pierro
Thanks to Anthony, this is an important fix that will speed up a lot complex apps. On Nov 21, 3:03 am, Ids idsvandermo...@gmail.com wrote: Checked it just now with Version 1.99.3 (2011-11-20 21:10:53) dev Everything now works ok, no more unnecessary database queries from auth decorators.

[web2py] Re: Memory leak with scheduler.py and MySQL

2011-11-21 Thread Massimo Di Pierro
yes. in gluon/dal.py TIMINGSSIZE = 100 That means we only store up to 100 queries. You will see the memory grow bot only up to a point. You can also decrease the number: import gluon.dal gluon.dal.TIMINGSIZE = 20 On Nov 21, 4:10 am, szimszon szims...@gmail.com wrote: Is that

[web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread thodoris
Two questions: I have the following scheme: db.define_table('table', Field('title'), Field('author_id', default=auth.user_id,readable=False, writable=False), ... ) db.define_table('videos', Field('author_id',default=auth.user_id,readable=False, writable=False),

[web2py] Re: Ajax and table rows.

2011-11-21 Thread tsvim
Thanks, you guys rock community support.

Re: [web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread Vinicius Assef
On Mon, Nov 21, 2011 at 12:41 PM, thodoris pasxi...@gmail.com wrote: Two questions: and i want the videos.table field to take values only from the entries that the same user has entered or Null NoneType' object has no attribute 'id' , because the user initially is not logged in so there is

[web2py] Re: web2py on windows 7

2011-11-21 Thread stas z
On 21 nov, 07:45, Tom Campbell tomcampb...@gmail.com wrote: I would avoid this by putting Python on the path, then web2py somewhere outside of Program Files, which I would claim is bad form anyway. Like a web2py directory off root, maybe? I can post a little tutorial for a manual Windows

[web2py] Re: field related to auth.user.id problem when user not logged in

2011-11-21 Thread Anthony
db.videos.table.requires = IS_IN_DB(db(db.table.author_id==auth.user.id), db.table.id, '%(title)s') Maybe db(db.table.author_id == (auth.user and auth.user.id)) That will return no records when there is no auth.user. Anthony

[web2py] Re: Can web2py do shared IP hosting

2011-11-21 Thread Robert Shaver
Dear Massimo, Thank you for your quick response. I heard your interview on FLOSS Weekly and that's how I discovered web2py. I guess I misread something. I thought I could download web2py and install it with a built-in web server ... Rocket I think was the name. (I haven't researched Rocket

Re: [web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread Anthony
But, according to your define_table()'s, these tables can only be managed (insert or update) with a logged user, or default contents will raise an excpetion because there's no logged user. The defaults won't raise an exception (as long as auth is defined prior to the table definitions),

Re: [web2py] Ajax and table rows.

2011-11-21 Thread tsvim
Ok, now that this works seems I'm still in trouble. The page I'm loading is one that has a table that I'm trying to make clickable and a form to enter more data. Here is the controller: @auth.requires_login() def budget(): db.expense.parent_table.default = request.args(0)

Re: [web2py] Can web2py do shared IP hosting

2011-11-21 Thread Robert Shaver
Hi Phyo, Thanks for your response. My current environment is a dedicated server machine with a single web server which servers multiple web separate sites on sub-domains and dedicated IP addresses. The configuration at this level has always been handled by an administrator so I know less

[web2py] Re: field related to auth.user.id problem when user not logged in

2011-11-21 Thread thodoris
Thanx for the help guys, what i did finally is db.videos.table.requires = IS_EMPTY_OR (IS_IN_DB(db(db.table.author_id==auth.user_id), db.table.id, '% (title)s')) What about displaying a BIG dropdown list of tables entries? Any help here ??? On Nov 21, 4:09 pm, Anthony abasta...@gmail.com

[web2py] Re: Can web2py do shared IP hosting

2011-11-21 Thread Anthony
On Monday, November 21, 2011 10:05:02 AM UTC-5, Robert Shaver wrote: I guess I misread something. I thought I could download web2py and install it with a built-in web server ... Rocket I think was the name. (I haven't researched Rocket yet.) Are you saying that these features are addressed

Re: [web2py] Can web2py do shared IP hosting

2011-11-21 Thread Kenneth Lundström
Hi Rob, what webserver are you running right now? Kenneth Hi Phyo, Thanks for your response. My current environment is a dedicated server machine with a single web server which servers multiple web separate sites on sub-domains and dedicated IP addresses. The configuration at this level

Re: [web2py] field related to auth.user.id problem when user not logged in

2011-11-21 Thread Vinicius Assef
Thanks, Anthony. On Mon, Nov 21, 2011 at 1:09 PM, Anthony abasta...@gmail.com wrote: But, according to your define_table()'s, these tables can only be managed (insert or update) with a logged user, or default contents will raise an excpetion because there's no logged user. The defaults won't

[web2py] Re: ERROR:Rocket.Errors.Port8000:SSL Error: [Errno 8] _ssl.c:499: EOF occurred in violation of protocol on Upgraded v1.99.1

2011-11-21 Thread Matt
On Nov 13, 10:54 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I think this should be be fixed in both stable and trunk. I am still seeing this error with 1.99.2, should it have been fixed there? On Nov 12, 10:38 am, Tito Garrido titogarr...@gmail.com wrote: Is it already

[web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-11-21 Thread Matt
has this patch made it into the codebase? I'm looking at my checkout of 1.99.2 and it doesn't seem to be there (and trunk as well, from the looks of it). Of course, it may have been written differently, I was only checking for the exact strings

[web2py] Re: gevent helper script integration with web2py

2011-11-21 Thread Dave
I ended up creating a virtualenv with the needed libraries within the modules folder and using the virtualenv python binary to execute the script within the web2py environment. I feel it's a bit hackish, but I'll clean it up in the future. What I do find interesting is that the script is actually

Re: [web2py] Register user programmatic way

2011-11-21 Thread Vinicius Assef
How about including this function in Auth? -- Vinicius Assef. On Mon, Nov 21, 2011 at 10:43 AM, VIREN PATEL viren...@gmail.com wrote: Hi Bruno, Thanks a lot that was really helpful and solved mine and Shiv problem Thanks, Viren On Mon, Nov 21, 2011 at 5:35 PM, Bruno Rocha

[web2py] Re: field related to auth.user.id problem when user not logged in

2011-11-21 Thread Anthony
On Monday, November 21, 2011 10:38:27 AM UTC-5, thodoris wrote: Thanx for the help guys, what i did finally is db.videos.table.requires = IS_EMPTY_OR (IS_IN_DB(db(db.table.author_id==auth.user_id), db.table.id, '% (title)s')) What about displaying a BIG dropdown list of tables entries?

[web2py] update_record() for DB's without an auto_increment field

2011-11-21 Thread Dmitry Vukolov
Greetings! I seem to be having a problem using DAL with legacy databases, namely those without an existing AUTO_INCREMENT field: db.define_table('manufactured_by', Field('product', 'string'), Field('brand', 'string'), primarykey=['product', 'brand']) With a similar setup the

[web2py] Re: Django urls to web2py

2011-11-21 Thread Massimo Di Pierro
Is the problem on GAE only? Do you also get the problem when running with dev_appserver?

[web2py] import_from_csv_file problem with reference fields with 1.99.2?

2011-11-21 Thread David Manns
In my application which is hosted on GAE I have backup/restore functions which use export_to_csv_file/import_from_csv_file. While this is not a practical backup/restore for GAE (restore would take far too long and timeout, so for this purpose I use GAE bulk loader tool), I have used it in the

[web2py] Re: Django urls to web2py

2011-11-21 Thread Constantine Vasil
When using trunk and to work on GAE I needed to rename my app and all internal references to it to lowercase.

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread Anthony
On Monday, November 21, 2011 7:06:25 AM UTC-5, villas wrote: Massimo, I tried the expressions, but it did not seem to work. Could you consider providing an example so we could get that working? I would be delighted if VirtualFields could be displayed. Do you think that this would

[web2py] DAL's virtual fields

2011-11-21 Thread Dmitry Vukolov
In the Official web2py Book I read about DAL's Virtual Fields that: ...each method of the class that takes a single argument (self) is a new virtual field. It seems however that any function of the class is treated as a new field and called to calculate its value. As an example I added a

[web2py] Re: update_record() for DB's without an auto_increment field

2011-11-21 Thread DenesL
That is one the restrictions when working with keyed tables. Here are the original notes (see #5): 1) primarykey is a list of the field names that make up the primary key 2) all primarykey fields will have NOT NULL set even if not specified 3) references are to other keyed tables only 4)

Re: [web2py] DAL's virtual fields

2011-11-21 Thread Bruno Rocha
maybe as a static method ( I did not tested, but may works On Mon, Nov 21, 2011 at 3:54 PM, Dmitry Vukolov dmitry.vuko...@gmail.comwrote: class MyVirtualFields(object): def total_price(self): return self.support_function(self.item.unit_price, self.item.quantity)

[web2py] Re: Django urls to web2py

2011-11-21 Thread rochacbruno
For me it does not works wit Uppercase app name even in rocket server.

Re: [web2py] DAL's virtual fields

2011-11-21 Thread Dmitry Vukolov
That actually works! Many thanks for the suggestion. I wish that could be in the book if that's the recommended approach. Dmitry

[web2py] Re: update_record() for DB's without an auto_increment field

2011-11-21 Thread Dmitry Vukolov
Thank you! Good to know that it's an existing limitation rather than an overlooked bug. If that would be in the book, it will save time trying to figure out what's wrong. Dmitry

[web2py] Google Authentication on GAE

2011-11-21 Thread amit
Using the method at http://groups.google.com/group/web2py/browse_thread/thread/641df72d9f897b1b/31f7a52cfcbdb7da?lnk=gstq=google+authentication+GAE#31f7a52cfcbdb7da on 1.99.2, I am getting redirect loop error in the browser: This webpage has a redirect loop The webpage at

[web2py] basic authentication using pam

2011-11-21 Thread Matt Broadstone
Is it possible to use PAM for basic auth? I have basic auth working (thanks to Hong-Khoan Quach's patch), however I can't seem to link it to PAM. We are using PAM successfully for web based user authentication, but basic auth seems to be ignoring this. Thanks, Matt

[web2py] Re: Django urls to web2py

2011-11-21 Thread Constantine Vasil
Exactly - I needed to go everywhere and change to lowercase. But it works now.

[web2py] Appliance Email Form - unauthorized

2011-11-21 Thread Constantine Vasil
Tried to install appliance Email Form but Unauthorized message - what is wrong?

[web2py] Re: Register user programmatic way

2011-11-21 Thread Massimo Di Pierro
I will take a patch On Nov 21, 11:27 am, Vinicius Assef vinicius...@gmail.com wrote: How about including this function in Auth? -- Vinicius Assef. On Mon, Nov 21, 2011 at 10:43 AM, VIREN PATEL viren...@gmail.com wrote: Hi Bruno, Thanks a lot that was really helpful and solved

[web2py] Re: basic authentication using pam

2011-11-21 Thread Massimo Di Pierro
Good point. Basic auth may not work with PAM. Please open a ticket. On Nov 21, 1:26 pm, Matt Broadstone mbroa...@gmail.com wrote: Is it possible to use PAM for basic auth? I have basic auth working (thanks to Hong-Khoan Quach's patch), however I can't seem to link it to PAM. We are using PAM

[web2py] Re: Login form hidden _next field isn't reset

2011-11-21 Thread Vinicius Assef
Does anyone know anything about this problem? On Fri, Nov 18, 2011 at 12:33 AM, Vinicius Assef vinicius...@gmail.com wrote: I'm making some tests with Auth and I'm facing one problem. This is my controller: http://pastebin.com/CNigd5qL I have a normal login form in default/index I'm

Re: [web2py] Re: basic authentication using pam

2011-11-21 Thread Matt Broadstone
On Mon, Nov 21, 2011 at 3:25 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Good point. Basic auth may not work with PAM. Please open a ticket. OK, issue created: http://code.google.com/p/web2py/issues/detail?id=532 Also, in the comments section I've included a patch to allow PAM

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread villas
Hi Anthony, Nearly got it! That was certainly helpful. I can show a VirtualField with your lambda idea, but only when I don't specify fields=(...). Unfortunately this means that I have to show every single field in the table, which isn't practical. I tried to include fields(...,

[web2py] Re: cannot run web2py on windows 7 machine with python 2.7 installed

2011-11-21 Thread Robert Shaver
I am having exactly the same problem. I'm on Windows 7 64 bit. I searched my disk for Python and found 6,647 occurrences of the word. From the various names on the files I believe that I have versions 2.5, 2.6.1 and 2.6.6 as a result of installing web2py, OpenOffice, InkScape and Blender. So

[web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-11-21 Thread Massimo Di Pierro
yes. this was fixed the same day. On Nov 21, 10:24 am, Matt mbroa...@gmail.com wrote: has this patch made it into the codebase? I'm looking at my checkout of 1.99.2 and it doesn't seem to be there (and trunk as well, from the looks of it). Of course, it may have been written differently, I was

[web2py] Re: basic authentication using pam

2011-11-21 Thread Massimo Di Pierro
Your patch is good (for pam and other methods that allow the app to handle the password) and it is in trunk On Nov 21, 3:35 pm, Matt Broadstone mbroa...@gmail.com wrote: On Mon, Nov 21, 2011 at 3:25 PM, Massimo Di Pierromassimo.dipie...@gmail.com wrote: Good point. Basic auth may not work

[web2py] Re: ERROR:Rocket.Errors.Port8000:SSL Error: [Errno 8] _ssl.c:499: EOF occurred in violation of protocol on Upgraded v1.99.1

2011-11-21 Thread Massimo Di Pierro
Please try the nightly build and let me know. On Nov 21, 10:07 am, Matt mbroa...@gmail.com wrote: On Nov 13, 10:54 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I think this should be be fixed in both stable and trunk. I am still seeing this error with 1.99.2, should it have been

[web2py] Problem with using .as_list()

2011-11-21 Thread villas
Why doesn't the as_list() seem to work when fields have been specified? Try this: db(db.table.id == 1).select().as_list()#works fine Now this: db(db.table.id == 1).select(db.table.id,db.table.x).as_list() #doesn't work properly with fields Am i missing something? I think as_dict() is

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread Anthony
On Monday, November 21, 2011 5:08:18 PM UTC-5, villas wrote: Hi Anthony, Nearly got it! That was certainly helpful. I can show a VirtualField with your lambda idea, but only when I don't specify fields=(...). Hmm, I'm not sure why that is. What if you don't specify any fields but

[web2py] IS_IN_SET validator

2011-11-21 Thread villas
This example is given in the validators section of the book: requires = [IS_INT_IN_RANGE(0, 8), IS_IN_SET([2, 3, 5, 7], error_message='must be prime and less than 10')] It does not seem to work. If I attempt to combine IS_IN_SET with any other validator, the dropdown list doesn't work.

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread villas
Yes, that's a good idea and it does seem to work. On the downside, I have a huge number of fields and I think the query will still fetch them all. Also I have to make a very long list of field.readable = False. So, if a better solution appears, I would be very grateful. However, in any

[web2py] Re: IS_IN_SET validator

2011-11-21 Thread villas
After giving it a little more thought, I suppose the solution is to use an onvalidation function. However, it is still worthy of mention that something in the book does not seem to provide an expected result.

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread Anthony
Yes, we should probably come up with a better solution. On Monday, November 21, 2011 8:55:57 PM UTC-5, villas wrote: Yes, that's a good idea and it does seem to work. On the downside, I have a huge number of fields and I think the query will still fetch them all. Also I have to make a very

[web2py] Re: IS_IN_SET validator

2011-11-21 Thread Anthony
IS_IN_SET and IS_IN_DB only produce dropdown widgets when they are not within a list of validators. The book mentions this for IS_IN_DB, but not for IS_IN_SET. Anthony On Monday, November 21, 2011 9:27:35 PM UTC-5, villas wrote: After giving it a little more thought, I suppose the solution

[web2py] Re: Google Authentication on GAE

2011-11-21 Thread howesc
can't remember the symptions, but when using the bulk load option for appconfig to upload/download data i have had to do the following:

[web2py] setting db table for SQLFORM from an argument

2011-11-21 Thread monotasker
I'm trying to abstract several content creation controllers into one controller. I want to use request.args[0] to set the db table in which the new row will be created. So far I've got this: def add(): the_table = request.args[0] tb = db.%s % the_table form = SQLFORM(tb) but I'm

Re: [web2py] setting db table for SQLFORM from an argument

2011-11-21 Thread Bruno Rocha
try db[the_table] http://zerp.ly/rochacbruno Em 22/11/2011 00:49, monotasker scotti...@gmail.com escreveu: I'm trying to abstract several content creation controllers into one controller. I want to use request.args[0] to set the db table in which the new row will be created. So far I've got

[web2py] Re: Problem with using .as_list()

2011-11-21 Thread Massimo Di Pierro
What do you mean does not work properly? What do you see, what do you get? On Nov 21, 6:12 pm, villas villa...@gmail.com wrote: Why doesn't the as_list() seem to work when fields have been specified? Try this: db(db.table.id == 1).select().as_list()    #works fine Now this:db(db.table.id

[web2py] Re: setting db table for SQLFORM from an argument

2011-11-21 Thread Massimo Di Pierro
As Bruno suggested: def add(): tablename = request.args[0] if not tablename in db.tables(): error() # or other set of allowed tables. form = SQLFORM(db[tablename]) On Nov 21, 8:49 pm, monotasker scotti...@gmail.com wrote: I'm trying to abstract several content creation controllers

[web2py] Re: SQLForm.grid - How do I use it properly?

2011-11-21 Thread Massimo Di Pierro
I am bit lost in this thread. Can you summarize the issue? On Nov 21, 7:55 pm, villas villa...@gmail.com wrote: Yes,  that's a good idea and it does seem to work. On the downside, I have a huge number of fields and I think the query will still fetch them all.  Also I have to make a very long

Re: [web2py] setting db table for SQLFORM from an argument

2011-11-21 Thread monotasker
db[the_table] works! Thanks Bruno.

[web2py] Re: setting db table for SQLFORM from an argument

2011-11-21 Thread monotasker
Thanks Massimo. I hadn't included the error handling bit.

[web2py] Insert references in a record

2011-11-21 Thread Adrian Edwards
Hello, I'm having difficulty getting inserts to work with tables that have references and I'm sure its something stupid I'm doing wrong. Hopefully you guys can point me in the right direction. I have the following 2 tables. db.define_table('event_users', Field('event', 'reference events'),

[web2py] Re: Insert references in a record

2011-11-21 Thread Massimo Di Pierro
I am pretty sure the error is not the code you showed us. You are somwhere assigning something to =T(...) where it expects a string. On Nov 21, 11:30 pm, Adrian Edwards aedward...@gmail.com wrote: Hello, I'm having difficulty getting inserts to work with tables that have references and I'm

Re: [web2py] SQLForm.grid - How do I use it properly?

2011-11-21 Thread Nik Go
try this : ,links = [lambda row: A( SPAN(_class='icon magnifier') ,'View Post' ,_class='button',_title='View Post' ,_href=URL(args=[view, db.person, row.id]) ) ] On Monday, November 21, 2011, Rahul wrote: Hi Johann, That is correct but I just wanted to