[web2py] Re: web2py entry on wikipedia needs to be updated

2010-12-14 Thread Luther Goh Lu Feng
I do not know how updated are the comparisons here: http://www.web2py.com/examples/static/web2py_vs_others.pdf But I wonder if it will be useful to have it on the wikipedia page so that it is more easily updated by those using other frameworks. I believe it also helps the understanding of the

Re: [web2py] Re: Simple debugger

2010-12-14 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 6:32 AM, weheh richard_gor...@verizon.net wrote: I want to go to Eclipse but didn't succeed in getting it to install run the first time through. Have you tried NetBeans? It's goot support for Python (still beta), and it wasn't so bad the last time I tried. Although I

[web2py] Re: json and forms

2010-12-14 Thread selecta
I am not 100% sure about this but sometimes it makes a difference if you have a python object string representation or a real json object i would add the following to my model import gluon.contrib.simplejson as simplejson and in the view write $.jqplot('plot1', [{{=simplejson.dumps(points)}}],

[web2py] New to web2py and jqgrid

2010-12-14 Thread dlord
I am new to web2py and have been writing a CD and DVD database collection software. I am currently wanting to list some 3000 records in a jqgrid table. I am currently calling the jqgrid like this: controller: def view_records(): return dict(records=plugin_wiki.widget('jqgrid',db.catalog))

Re: [web2py] grid

2010-12-14 Thread Bruno Rocha
To avoid confusion and to avoid problems with the author's old plugin for DataTables. http://web2py.com/plugins/default/datatable I decided to rename the plugin, and I am in doubt, what about? MagicTable, MagicGrid, SmartTable, SmartGrid, RadTable, RadGrid ? -- Bruno Rocha

Re: [web2py] New to web2py and jqgrid

2010-12-14 Thread Richard Vézina
I had much success with DataTables and Bruno Rocha has built web2py API to integrate it more closely into web2py. One of the usefull thing with DataTables is that you can fix Header and Column Richard On Tue, Dec 14, 2010 at 8:56 AM, dlord lord.da...@gmail.com wrote: I am new to web2py and

Re: [web2py] grid

2010-12-14 Thread Branko Vukelic
PowerTable? ;) On Tue, Dec 14, 2010 at 4:02 PM, Bruno Rocha rochacbr...@gmail.com wrote: To avoid confusion and to avoid problems with the author's old plugin for DataTables. http://web2py.com/plugins/default/datatable I decided to rename the plugin, and I am in doubt, what about?

Re: [web2py] grid

2010-12-14 Thread Martín Mulone
Datatable2, MagicDatatable, SmartDataTable, RadDataTable. Because you are using datatable :P 2010/12/14 Bruno Rocha rochacbr...@gmail.com: To avoid confusion and to avoid problems with the author's old plugin for DataTables. http://web2py.com/plugins/default/datatable I decided to rename the

[web2py] Displaying Uploaded PDF Documents

2010-12-14 Thread azarkowsky
In my web2py application I'm allowing users to upload PDF documents (via an upload field) and then on another page I provide a download link, however, I think because of the file renaming security feature these PDF documents are truly being downloaded again (saved locally to each user's desktop)

[web2py] Creating the database tables

2010-12-14 Thread Hybride
Hi everyone, Am sorry for such a ridiculous question, but how does one go about actually initiating/dealing with database tables in web2py? I use the default SQLite3 that comes with web2py, but would not have an issue actually changing over to MySQL. Is there any chance someone can point me in

[web2py] Re: it case you missed it...

2010-12-14 Thread VP
I am happy with what Massimo intends web2py's license to be. I think a lot of people are too. App developers should not have to worry about the licensing issues. I think the license should be precise and concise. Further because it combines two types of licenses into one, it should not be

[web2py] Re: Strange behaviour on SQLFORM update

2010-12-14 Thread DenesL
The problem is the use of 'id' in the vars. What happens is that the form already has an 'id' field, although it is hidden it is still being sent back on submit, and then you add another 'id' in the vars so you end up with two, hence '|1|1|'. To fix just use a variable name that is not in the

[web2py] Re: simple db app

2010-12-14 Thread DenesL
Correction, you should not set vars using field names already in the form, otherwise they will be duplicated. def show(): rid=request.vars.rid record=db(db.addresses.id==rid).select() def input(): form = SQLFORM(db.addresses) if form.accepts(request.vars,

Re: [web2py] Creating the database tables

2010-12-14 Thread Richard Vézina
Look at you model definition... db.define_table('user', Field('email','string',length=50), Field('name','string',length=50), migrate=True ) If you omit premary key the PK will be id as an integer. You should use the default instead of keyed table... migrate=False prevent web2py to create for

[web2py] Re: Escape JSON vars without escaping JSON control characters

2010-12-14 Thread DenesL
Maybe one of the examples in __init__.py under gluon/contrib/ simplejson can help. Otherwise post a sample of your data and how you need it. On Dec 14, 1:28 am, spiffytech spiffyt...@gmail.com wrote: I'm fetching data from my database, converting it to JSON with simplejson.dumps(), then

[web2py] Re: Displaying Uploaded PDF Documents

2010-12-14 Thread DenesL
I believe this is more an option between 'save the file' or 'open in the browser', but in either case the PDF file has to be sent/ downloaded to the client in order to be seen. Otherwise the client would require direct access to the PDF file location, as in shared resources over an internal

Re: [web2py] grid

2010-12-14 Thread Richard Vézina
Hello Bruno, DataTables not your plugin.. Did you notice with FF when you fix Column when you xscroll that the fixed column also tends to drag with the other columns... With Chrome no problem... With IE it is even worse the fixed column overlay... Richard On Tue, Dec 14, 2010 at 11:24 AM,

Re: [web2py] Displaying Uploaded PDF Documents

2010-12-14 Thread Bruno Rocha
For security reasons, web2py does not expose the 'uploads' folder to the user, this folder can be accessed only by the 'download' function. You can do that: change the upload folder with 'uploadfolder' parameter. model db.define_table('pdfs',

[web2py] Re: problem with request_reset_password?

2010-12-14 Thread DenesL
As you suspect, the error is caused by the missing arguments **b, but it is hard to tell why without seeing your code. On Dec 13, 5:58 pm, kevski corbett.ke...@gmail.com wrote: I snipped a lot of the intermediate stuff out but basically I try to use the lost_password link on the login page

[web2py] Re: simple db app

2010-12-14 Thread Rick
Thanks for the help! I got it working with this code: == controller file == def index(): records = db().select(db.addresses.ALL, orderby=db.addresses.person) return dict(records=records) def create(): form = SQLFORM(db.addresses) if form.accepts(request.post_vars,

Re: [web2py] Re: it case you missed it...

2010-12-14 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 5:06 PM, VP vtp2...@gmail.com wrote: I am happy with what Massimo intends web2py's license to be.  I think a lot of people are too.  App developers should not have to worry about the licensing issues.  I think the license should be precise and concise.  Further because

Re: [web2py] grid

2010-12-14 Thread Richard Vézina
Here the answer : http://datatables.net/forums/comments.php?DiscussionID=2815 - Known limitations: Absolute positioning is used, so in some browsers which are a little slower (basically everything but Webkit), there can be a little jarring when scrolling. Fixed positioning cannot be used for

Re: [web2py] Re: Simple debugger

2010-12-14 Thread Lorin Rivers
I couldn't get NetBeans to debug my web2py code. On a Mac. Eclipse was a challenge to get set up and in one case, where I had some oddly broken code, the breakpoints didn't work how I expected them to. I had to step into EVERYTHING, down into the bowels of web2py, which was a real pain. I

[web2py] basic views question

2010-12-14 Thread Lorin Rivers
I have an app Debug, a controller reports.py, functions in that controller index and test (plus a bunch of others). def index(): return dict(message=reports index) def test(): return dict(message=hello from reports.py) In the directory structure ../views: appadmin.html /default:

[web2py] Re: Displaying Uploaded PDF Documents

2010-12-14 Thread mart
well... if a pdf needs to be viewed within a browser, there is always flex. Although, Flex it self will not support PDF (because the reader and the flash layer live separately), there are workarounds with either flex-iframe (http://code.google.com/p/flex-iframe/) or flexpaper

Re: [web2py] Re: Simple debugger

2010-12-14 Thread Thadeus Burgess
The problem with web2py is the built in internal server. Since it executes itself on a completely separate thread, there is no way (that I know currently) to connect a debugger to it. I have ran into this problem with all of the python frameworks I have tried (Django, Flask, Pylons, web2py) all

Re: [web2py] Re: Simple debugger

2010-12-14 Thread Bruno Rocha
I have debug running well in eclipse, with step through, but I dont like to use an IDE. 2010/12/14 Thadeus Burgess thade...@thadeusb.com The problem with web2py is the built in internal server. Since it executes itself on a completely separate thread, there is no way (that I know currently)

Re: [web2py] basic views question

2010-12-14 Thread Bruno Rocha
if def test() is defined inside default.py, the test.html should be in /views/default/test.html 2010/12/14 Lorin Rivers lriv...@mosasaur.com I have an app Debug, a controller reports.py, functions in that controller index and test (plus a bunch of others). def index(): return

Re: [web2py] basic views question

2010-12-14 Thread Lorin Rivers
No, it's in reports.py, a controller. On Dec 14, 2010, at 13:37 , Bruno Rocha wrote: if def test() is defined inside default.py, the test.html should be in /views/default/test.html 2010/12/14 Lorin Rivers lriv...@mosasaur.com I have an app Debug, a controller reports.py, functions in

Re: [web2py] basic views question

2010-12-14 Thread Bruno Rocha
if your controller is named 'reports.py', you need this tree: ../views/reports/test.html 2010/12/14 Bruno Rocha rochacbr...@gmail.com if def test() is defined inside default.py, the test.html should be in /views/default/test.html 2010/12/14 Lorin Rivers lriv...@mosasaur.com I have an app

Re: [web2py] Re: Simple debugger

2010-12-14 Thread ron_m
winpdb (free and nothing to do with Windows) is a Python debugger that is multi-thread capable,

Re: [web2py] Re: Simple debugger

2010-12-14 Thread Phyo Arkar
i debug all the time using eclipse , and it can handle threads well , what is the problem?? For easiest eclipse setup for python and web development , use Aptana , it can get Aptana PyDev plugin directly after installed (just a few click from plugin-manager). www.aptana.com To setup debug for

[web2py] 1:N relationship (collections) with mixed objects (from different tables)?

2010-12-14 Thread Carlos
Hi, In object databases, one can define a 1:N relationship (collections) pointing to mixed objects (from different classes/tables). I'm wondering if this is possible with web2py?. Let's say I have the following separate tables (just as an example, not to discuss the actual design): - image

[web2py] Store user information in auth_user?

2010-12-14 Thread pbreit
Tips on storing user information? Best to put it in auth_user or separate table? (ie: address, DOB, email preferences, etc).

Re: [web2py] basic views question

2010-12-14 Thread Bruno Rocha
so, you need views inside /views/reports/.html 2010/12/14 Lorin Rivers lriv...@mosasaur.com No, it's in reports.py, a controller. On Dec 14, 2010, at 13:37 , Bruno Rocha wrote: if def test() is defined inside default.py, the test.html should be in /views/default/test.html

Re: [web2py] Re: Simple debugger

2010-12-14 Thread Branko Vukelic
I absolutely prefer ipdb for debugging and Vim for editing. The combo is unbeatable. :) Try splitting the buffer in Netbeans or Aptana. In Vim, it's just ``:split``. :) I love this editor. 3 -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:

[web2py] Re: embedded server gives broken chunks?

2010-12-14 Thread mdipierro
hmmm... This is a rocket question. can you send me a more complete example (the function, and the python code to call it)? On Dec 13, 7:39 am, Leo lle...@gmail.com wrote: Using Python 2.5.4 and web2py 1.84.4, I call a function decorated with @service.run from python using robj =

[web2py] Re: Bug report

2010-12-14 Thread mdipierro
Anther rocket question Tim, are you around? On Dec 13, 7:46 am, dederocks dediro...@gmail.com wrote: Hello, When shutting down Web2py (trunk version on windows 7, python 2.7), I get the following error: starting browser... Unhandled exception in thread started by bound method

Re: [web2py] basic views question

2010-12-14 Thread Lorin Rivers
Thanks, I got it now. On Dec 14, 2010, at 14:10 , Bruno Rocha wrote: so, you need views inside /views/reports/.html 2010/12/14 Lorin Rivers lriv...@mosasaur.com No, it's in reports.py, a controller. On Dec 14, 2010, at 13:37 , Bruno Rocha wrote: if def test() is defined inside

[web2py] Posgresql-query - DAL

2010-12-14 Thread Johann Spies
The postgresql equivalent is: select * from gr02 where service_provider in (7, 10) I have tried: isps = (7,10) tb = 'gr02' data = db('%s.service_provider in (%s)' % (tb,isps)).select() Traceback (most recent call last): File console, line 1, in module File

Re: [web2py] Posgresql-query - DAL

2010-12-14 Thread Thadeus Burgess
db(db.gr02.service_provider.belongs([7,10])).select() -- Thadeus On Tue, Dec 14, 2010 at 2:38 PM, Johann Spies johann.sp...@gmail.comwrote: The postgresql equivalent is: select * from gr02 where service_provider in (7, 10) I have tried: isps = (7,10) tb = 'gr02' data =

Re: [web2py] Simple debugger

2010-12-14 Thread Lorin Rivers
Branko, Can you explain how you use iPython and ipdb together to debug web2py apps? How do I invoke web2py? How do I pass parameters to it like I do when invoking it with python (e.g., python web2py -a mumble -p 8000 -i 127.0.0.1) Thanks! On Dec 13, 2010, at 23:13 , Branko Vukelic wrote: On

Re: [web2py] Simple debugger

2010-12-14 Thread Branko Vukelic
Think of ipdb as of a print statement on steroids. If you want to debug a particular part of your app, you simply add this before that section in the source code: import ipdb; ipdb.set_trace() When the server hits that part of the code, it will halt execution and display a prompt in the

Re: [web2py] Simple debugger

2010-12-14 Thread Lorin Rivers
Branko, Thanks for that. When I attempt to invoke web2py in iPython it seems to hang. I tried this: ipython web2py.py -a 1234 -i 127.0.0.1 -p 8000 On Dec 14, 2010, at 15:09 , Branko Vukelic wrote: Think of ipdb as of a print statement on steroids. If you want to debug a particular part of

Re: [web2py] Simple debugger

2010-12-14 Thread Branko Vukelic
On Tue, Dec 14, 2010 at 10:18 PM, Lorin Rivers lriv...@mosasaur.com wrote: ipython web2py.py -a 1234 -i 127.0.0.1 -p 8000 ipython != ipdb ipdb is an embedded shell + debugger. ipython is just a shell. I used to be able to use the ipython's embedded shell in my projects, but that didn't work in

[web2py] Re: web2py Chat Problem

2010-12-14 Thread howesc
i have never used that but this: File gluon/sql.py, line 742, in __getattr__ KeyError: 'name' implies that the database table you are querying does not have a name field. check your tables to make sure they were created properly.

[web2py] a few questions

2010-12-14 Thread Shel
I have been searching for answers to a couple of questions, but nothing I have tried has worked so far. Any help or advice would be appreciated. Q1 - I have a dropdown in an SQLFORM that shows a list of character names based on the model in Db.Py (db.Story.Char_ID_Player.requires = IS_IN_DB(db,

[web2py] Re: a few questions

2010-12-14 Thread Shel
Oops, that first question should be: I would like to limit this dropdown so that it only contains rows where the field Characterz.Characterz_IsStandard == 1 On Dec 14, 3:30 pm, Shel joralemonshe...@gmail.com wrote: I have been searching for answers to a couple of questions, but nothing I have

[web2py] auth model

2010-12-14 Thread Rick
Hi, I'm trying to make a very simple todo application for many users. The passwords and usernames would be given from a administrator, so hence there wouldn't be any registration through e-mail. My problem is that I don't know how to properly write the model/db.py file. I tried with this, where

[web2py] Re: a few questions

2010-12-14 Thread Shel
For my first question, I ended up doing: standard_characters=db.executesql(Select Characterz.id, Characterz_NameLOL from Characterz where Characterz.Characterz_IsStandard=1) db.Story.Char_ID_Player.requires = IS_IN_SET(standard_characters, '%(Characterz_NameLOL)s') Which appears to work.

[web2py] Re: auth model

2010-12-14 Thread pbreit
To customize auth, have a look at: http://web2py.com/book/default/chapter/08#Customizing-Auth For one thing, the table definitely needs to be placed between auth = Auth(globals(), db) and auth.define_tables()

[web2py] Re: it case you missed it...

2010-12-14 Thread mdipierro
I agree that we may need clarification because it does not state that the scaffolding app is public domain (it now says it in trunk), and it does not say that importing web2py modules from an app should not be considered linking and therefore it does not violate the GPL. If you guys can come up

[web2py] Re: More DAL examples missing?

2010-12-14 Thread mdipierro
OOps. That should just point to book chapter 6 On Dec 14, 1:36 am, pbreit pbreitenb...@gmail.com wrote: The Examples page (http://web2py.com/examples/default/examples) includes a link to more DAL examples (http://web2py.com/examples/default/dal) which errors invalid function.

[web2py] Re: web2py entry on wikipedia needs to be updated

2010-12-14 Thread mdipierro
Yes t2 and t3 should be removed. On Dec 12, 11:50 pm, Bruno Rocha rochacbr...@gmail.com wrote: I think we can replace T2,T3 info with 'plugin_wiki' info. I am trying to understand that wiki markup.. :P

[web2py] Re: web2py entry on wikipedia needs to be updated

2010-12-14 Thread mdipierro
I think the comparisong should be in a public wiki, also accessible to authors of other frameworks but not on the web2py page because people are going to complain. On Dec 14, 3:13 am, Luther Goh Lu Feng elf...@yahoo.com wrote: I do not know how updated are the comparisons

[web2py] Re: How to do a list:upload Field?

2010-12-14 Thread mdipierro
list:upload does not exist. It could be implemented but I need to think more about pros and cons. On Dec 13, 2:54 pm, Savio Sabino savi...@gmail.com wrote: This exists? On Dec 13, 5:53 pm, Savio Sabino savi...@gmail.com wrote: The best solution to this is a widget to insert multi record of

Re: [web2py] Re: More DAL examples missing?

2010-12-14 Thread Bruno Rocha
.I made this in default.py, but I forget to update the app before sending. default.py def dal(): redirect('http://www.web2py.com/book...') /default.py 2010/12/15 mdipierro mdipie...@cs.depaul.edu OOps. That should just point to book chapter 6 On Dec 14, 1:36 am, pbreit

[web2py] Re: administrator controller

2010-12-14 Thread mdipierro
I think we need a better public repository for plugins so that people can contribute. On Dec 13, 11:52 am, Christopher Steel chris.st...@gmail.com wrote: it is literally the same plugin but with a menu item... I was going to add some more features but had to move on to other projects... On

[web2py] Re: Socket for bidirectional messaging

2010-12-14 Thread gopiballava
Hi Luther, Thanks for the pointer and suggestion. orbited looks like a clean, nifty solution that I may end up using for other parts of this project. What I'm looking for is the web2py server side: How to best handle multiplexing multiple sockets that stay open over a duration of minutes to

[web2py] Re: Strange behaviour on SQLFORM update

2010-12-14 Thread mdipierro
Try replace form.accepts (request.vars,session) with form.accepts (request.post_vars,session) or simply form.accepts (request,session) On Dec 14, 10:11 am, DenesL denes1...@yahoo.ca wrote: The problem is the use of 'id' in the vars. What happens is that the form already has an 'id' field,

[web2py] Re: a few questions

2010-12-14 Thread DenesL
standard_characters = db( db.Characterz.Characterz_IsStandard == 1 ).select( db.Characterz.id, db.Characterz.Characterz_NameLOL) Use your own field names as key in col3. On Dec 14, 8:09 pm, Shel joralemonshe...@gmail.com wrote: For my first question, I ended up doing:    

[web2py] Re: 1:N relationship (collections) with mixed objects (from different tables)?

2010-12-14 Thread DenesL
The id field makes each record unique in any table. db.define_table('collection', Field('images','list:reference image'), Field('videos','list:reference video'), Field('maps','list:reference map'), ...) # check for reserved keywords before using On Dec 14, 3:01 pm, Carlos

Re: [web2py] Re: administrator controller

2010-12-14 Thread Bruno Rocha
2010/12/15 mdipierro mdipie...@cs.depaul.edu I think we need a better public repository for plugins so that people can contribute. web2py.com/appliances can be splited in categories ['Applications','modules','plugins'] or @martin created an application for WAE

[web2py] passing width and height args to download controller from image

2010-12-14 Thread Andrew Evans
How can I pass the width and height values as arguments from my image to my download controller cause I want to resize images based on those values on the fly and can't figure that part out img width=arg1 height=arg2 any ideas

[web2py] Re: passing width and height args to download controller from image

2010-12-14 Thread mdipierro
Look at the IS_IMAGE validator. There is code in there that extracts the size. On Dec 14, 10:24 pm, Andrew Evans randra...@gmail.com wrote: How can I pass the width and height values as arguments from my image to my download controller cause I want to resize images based on those values on the

[web2py] Re: administrator controller

2010-12-14 Thread mdipierro
If we can repurpose Martin's app and he is willing to maintain it, that would be the best solution. I can also split appliances. Not hard to do but we need a way to vote and keep track of versions. Massimo On Dec 14, 9:48 pm, Bruno Rocha rochacbr...@gmail.com wrote: 2010/12/15 mdipierro

Re: [web2py] Re: passing width and height args to download controller from image

2010-12-14 Thread Andrew Evans
Hi I don't think that's what I need.. perhaps it is I have my download controller for example it takes in arguments for width and height. def download(): if len(request.args) == 1: return response.download(request, db) else: myImage = request.args[0] myImage =

Re: [web2py] Re: passing width and height args to download controller from image

2010-12-14 Thread Andrew Evans
I think I got it need to pass the args as a tuple thanks for the help :-)

Re: [web2py] Posgresql-query - DAL

2010-12-14 Thread Johann Spies
On 14 December 2010 23:02, Thadeus Burgess thade...@thadeusb.com wrote: db(db.gr02.service_provider.belongs([7,10])).select() Thanks. Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we

[web2py] Re: Socket for bidirectional messaging

2010-12-14 Thread ron_m
The new gluon/dal.py that is currently in trunk can be embedded standalone so the socket server could understand the database through the same model files as the web2py application. Just another possibility to look at. Ron

Re: [web2py] Re: Socket for bidirectional messaging

2010-12-14 Thread Phyo Arkar
ron_m that is quite interesting. On 12/15/10, ron_m ron.mco...@gmail.com wrote: The new gluon/dal.py that is currently in trunk can be embedded standalone so the socket server could understand the database through the same model files as the web2py application. Just another possibility to look