[web2py] what is a simple way to display program variables

2013-11-14 Thread Alex Glaros
To debug a controller, what is a simple way to display values? For example, if I have a crashing controller where variable "record_id" is not making it into the table, where is an easy place to display contents of variable record_id? thanks, Alex -- Resources: - http://web2py.com - http://we

Re: [web2py] Re: web2py "Components" for layout.html and other HTML pages [ not derived from layout.html]

2013-11-14 Thread Arnon Marcus
+1 I was thinking the same thing, as a starting point in preperation of converting my we2py-app's client-side into a SPA. Having a componentized scaffold could help me get to that milestone faster. I am not saying web2py should become a SPA framework, just a "frendlier" option for these use-cas

[web2py] Re: How to view the referenced table field name and not their id

2013-11-14 Thread Sarbjit
Thanks stifan for reply, As stated earlier, this is an sample example. For the second problem, in my actual problem I am having different records present for same owner (Consider same NAME for person field). Now when I say, my PERSON table can have multiple records with the same name, it means

[web2py] Re: How to view the referenced table field name and not their id

2013-11-14 Thread 黄祥
> > *Problem1 :- Referenced field id is seen in grid, I want to have the > referenced field 'name' value* > > Please insert few records using appadmin/grid and view the records, it > will show the NAME field (DOG table) having the value as ID for the PERSON > table. How can I view the name of t

[web2py] How to view the referenced table field name and not their id

2013-11-14 Thread Sarbjit
Below example can show the behavior, please do not mind over the table logic/names (this is just to show the behavior) *Model:* db.define_table('person', Field('name'), Field('country')) db.define_table('dog', Field('name'), Field('ownername', 'reference person')) db.dog

[web2py] jQuery ReferenceError from within component with file upload

2013-11-14 Thread weheh
Ah, don't you love components with file upload? I'm back! So I am using the hack that makes components work with file upload. My view looks like this: {{= form}} $("#file-form input.upload").button(); // this uses jquery UI's button routine {{# hack because jquery.form.js does not p

[web2py] Re: call function with parameter from views

2013-11-14 Thread User
I think by default, functions with arguments are not exposed. From: http://stackoverflow.com/questions/3003449/web2py-controllers-with-parameters "web2py specifically detects valid controller functions as those functions that have no arguments" On Thursday, November 14, 2013 9:03:34 PM UTC-5,

[web2py] Re: call function with parameter from views

2013-11-14 Thread User
1. On the line: {{=SPAN(A(T('Process 3'), _href=URL('revert(ids)' ) ) ) }} You have the function call inside a string so it will just be treated as a string. If you wanted to call it as a function you would probably need to do like this: {{=SPAN(A(T('Process 3'), _href=URL(revert(ids) ) ) ) }

[web2py] call function with parameter from views

2013-11-14 Thread 黄祥
hi, i have a function that must be passed with parameter, if i test to call it from controllers it works well. e.g. in controller def outstanding_rent(): query = db.rent_detail.status == 'Rent' grid = SQLFORM.grid(query, selectable = lambda ids: revert(ids) ) return locals() def revert(ids): fo

[web2py] web2py and phonegap

2013-11-14 Thread sasogeek
I've only recently learned of phonegap and i've seen a few posts concerning web2py and phonegap in this forum but i'd like to ask a question of my own since they're questions from last year and maybe there may have been new developments that do not follow up on those threads, and my question is,

[web2py] Different code at web2py.com/examples/static/epydoc vs code.google.com/p/web2py/source/browse?

2013-11-14 Thread User
Why is the source code for the navbar function http://web2py.com/examples/static/epydoc/web2py.gluon.tools-pysrc.html#Auth.navbar different than the code for http://code.google.com/p/web2py/source/browse/gluon/tools.py#1318 For example, the latter has nested functions such as Anr(), menu(), and

[web2py] Re: configuring routes for web2py behind reverse proxy

2013-11-14 Thread DeanK
For anyone in the future trying to do this with Apache2 on Ubuntu: ProxyHTMLInterp On LogLevel Debug ProxyHTMLLogVerbose On ProxyPass /link/ http://my.server.com/ ProxyPassReverse /link/ http://my.server.com/ ProxyHTMLURLMap http://my.server.com /link/ ProxyPassReverse / SetOutputFilter pr

[web2py] web2py ajax failing when behind reverse proxy

2013-11-14 Thread DeanK
I'm having trouble with a web2py site sitting behind an Apache2 reverse proxy that uses web2py's built in ajax capability. The main domain server configuration is setup like this to point to the server running my web2py app: ProxyHTMLInterp On LogLevel Debug ProxyHTMLLogVerbose On ProxyPass /l

[web2py] Re: mongodb upload field raising exception "data must be an instance of str"

2013-11-14 Thread Alan Etkin
> > and it returns the same error. The thing is how do I fix this? I tried: > > 5405elif fieldtype == "blob": > if value== None: > > > But ain't sure if that is right or not. > I suppose it is ok but should be tested. Please file an issue at http://code.google.com/p/we

[web2py] Re: serious memdb issue

2013-11-14 Thread Joel Rathgaber
Does this only apply to GAE use? We use memcache for sessions but not GAE. Thanks, --Joel. On Wednesday, November 13, 2013 6:19:14 PM UTC-6, Massimo Di Pierro wrote: > > A serious issue has been reported on web2y-developers. The issue has to do > with the memdb module. You are using it if you u

[web2py] Re: Using MEMDB with Scheduler

2013-11-14 Thread Joel Rathgaber
That's too bad. Is there a reason for it, or just haven't found any use for it yet? On Wednesday, November 13, 2013 10:49:43 AM UTC-6, Niphlod wrote: > > nice shot, but scheduler isn't supported in MEMDB. > > On Wednesday, November 13, 2013 6:25:40 AM UTC+1, Joel Rathgaber wrote: >> >> Hey all

[web2py] mongodb upload field raising exception "data must be an instance of str"

2013-11-14 Thread Francisco Betancourt
Hello everyone. We are using a mongodb for our application an ran into a little problem. We declare the following table: db.define_table("pricing_plan", Field("title", "string", notnull=True), Field("image", "upload"), Field("description", "text"), Field("price", "integer", notn

[web2py] Re: How is the current menu styled to be horizontal?

2013-11-14 Thread JoeCodeswell
Dear Paolo, Thanks for the reply. I guess it wasn't a z-index problem. The adding z-index:500px; change did not work. However, I did a position:relative; top:100px; on the and more of the menu worked. Thanks for the concept, Paolo. I'll keep at it. Love and peace, Joe On Thursday, Novembe

Re: [web2py] Re: RuntimeError: no driver available... but not in interactive shell

2013-11-14 Thread Manuele Pesenti
Il 14/11/13 18:41, Massimo Di Pierro ha scritto: > I assume you are using Oracle. You need to install cx_Oracle. I beg your pardon Massimo, the problem is that cx_Oracle is already installed and I can correctly connect to the Oracle database using the web2py interactive shell (using -S and -M optio

[web2py] pop up message while running a background process

2013-11-14 Thread sonu kumar
Hi All, How do I pop up a message after form submission?? I have a form which takes query and after submission it takes approx 10-20 sec to execute my whole script in background. I would like to display a message something like "your job is running" and after completion of background process it

[web2py] Re: redirect depending on controller name

2013-11-14 Thread Alex
1. I found out that the url parameters are automatically preserved if I do not redirect the request. e.g. routes_in = ( ('/$a/$c/list', '/$a/$c/view'), ) and a url '/myapp/client/list?name=alex' gets mapped to '/myapp/client/view?name=alex' but if I want to redirect the request routes_in = ( (

Re: [web2py] Error uploading 60 character named .pptx file

2013-11-14 Thread Limedrop
Actually, the web2py setting you're looking for is 'length'. Here's an example: db.define_table('document', Field('document_filename', writable=False, compute = lambda row: request.post_vars.document.filename), Field('document','upload',autodelete=True, requires=IS_LENGTH(min

[web2py] Re: Managing temporary tables

2013-11-14 Thread Niphlod
working with temp tables in any webapp is kinda scary, just because temp tables (at least in sql world) are actually though to survive an entire "connection". If instead you mean "temp table" as a real table, that gets created and dropped (so, managed) entirely by your application, again you'll

[web2py] Re: return PDF content created from a blob field

2013-11-14 Thread Niphlod
set the relevant response.headers (such as content-type = 'application/pdf' and content-disposition = attachment; filename="afilename.pdf") then response.stream(content) and you should be good to go (as long as the said "blob" holds the entire content of the pdf) -- Resources: - http://web

Re: [web2py] SQLFORM update upload field - override 'file' anchor text

2013-11-14 Thread Jim S
Resolved it with a little piece of jquery... $('#news_article__row a').text('download'); Not ideal, but works... -Jim On Thursday, November 14, 2013 2:48:08 AM UTC-6, Niphlod wrote: > > as any widget in web2py, it's defined here > > https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.

[web2py] Re: How to make registrations invitation-only with Janrain login/registrations

2013-11-14 Thread Dragan Matic
In the first phase it would be used for beta testing where codes can't be used twice. Later on it could be also used for users to invite their friends, but for now I would just like to give users possibility to register with Janrain but only if they have invitation code. On Thursday, Novembe

[web2py] Re: Web2py freezing on live deployment!

2013-11-14 Thread Derek
any luck? On Thursday, November 7, 2013 12:26:44 AM UTC-7, Niphlod wrote: > > hard ? with DAL it's pretty easy if a module exposes the dbapi just > force the driver and implement the connect method and it's usually good to > go. > I'll test it when I get back home. > -- Resources: - http:/

[web2py] Re: How is the current menu styled to be horizontal?

2013-11-14 Thread Paolo Caruccio
Maybe but actually I didn't deeply test the code. It was only a demo in order to explain the concept. Anyway please try: div.nav ul, #navbar, #navbar ul {margin:0; padding:0; list-style:none; white-space:nowrap; text-align:left; padding:1px 1px 0 1px; background:#eee; z-index:500px;} and let

[web2py] Re: How is the current menu styled to be horizontal?

2013-11-14 Thread JoeCodeswell
Dear Paolo, Your post has gotten me *very close* to what i want to achieve. However, when i hover over a "root" menu item and then down over the sub-menu items, the hand cursor disappears when the list is long enough to be shown over a rendered page element like an . Any ideas how to fix this?

Re: [web2py] security concerns

2013-11-14 Thread Massimo Di Pierro
We need to cover some of those. It is more of an issue of updating the docs than the code. I think the code cover them all. On Thursday, 14 November 2013 11:03:52 UTC-6, Derek wrote: > > Yes, security means a lot and there are always new attack vectors. The > 'OWASP TOP 10' changes from year to

[web2py] Re: RuntimeError: no driver available... but not in interactive shell

2013-11-14 Thread Massimo Di Pierro
I assume you are using Oracle. You need to install cx_Oracle. On Thursday, 14 November 2013 10:10:12 UTC-6, Manuele wrote: > > Hi, > > I get this error[1] but running interactive shell using same web2py.py > with options -S myapp -M everythig runs ok... where can I look for the > problem? > At

[web2py] Re: dashboard using bootstrap

2013-11-14 Thread Massimo Di Pierro
Did you see this: http://vinceg.github.io/Bootstrap-Admin-Theme/ On Thursday, 14 November 2013 05:53:08 UTC-6, Rahul s wrote: > > Hi, People I would like to build a Dashboard page using bootstrap, the > page should contain graphs and tables. I am beginner in this but i am > trying, please help

Re: [web2py] Re: web2py "Components" for layout.html and other HTML pages [ not derived from layout.html]

2013-11-14 Thread JoeCodeswell
It seems to me that "Form Widgets " as published in a Plugin form by s-cubism , and endorsed by The web2py Book - Plugins repositories could b

[web2py] return PDF content created from a blob field

2013-11-14 Thread Fred Guedes Pereira
Hello, Is there a way to return PDF content generated from a blob db field? My table has a blob field whose content is PDF. I would like to create a 'PDF page' from those bytes and return it. Thanks, Sorry for possible duplication. Fred -- Resources: - http://web2py.com - http://web2py.com

Re: [web2py] security concerns

2013-11-14 Thread Derek
Yes, security means a lot and there are always new attack vectors. The 'OWASP TOP 10' changes from year to year, but it's a good start. Web2Py is using OWASP guidelines but that's not enough if you have a developer also not following those guidelines. https://www.owasp.org/index.php/Category:OW

[web2py] RuntimeError: no driver available... but not in interactive shell

2013-11-14 Thread Manuele Pesenti
Hi, I get this error[1] but running interactive shell using same web2py.py with options -S myapp -M everythig runs ok... where can I look for the problem? At the following link[2] you can find the daemon script content I use to run my application. Thank you a lot Best regards Manuele [1] DE

Re: [web2py] Error uploading 60 character named .pptx file

2013-11-14 Thread Loïc
I had a similar issue some time ago, but Windows was my testing machine, not the production server OS. So it was not very annoying... If you want to host on Windows, you may have to store the original filename in the database, and change it on the disk : http://web2py.com/books/default/chapter/2

Re: [web2py] Re: web2py & pycharm...

2013-11-14 Thread Richard Vézina
Paolo, I don't think the community version has the support for web2py included. Sadly, I think you have to pay for the professionnal version to get it... Richard On Thu, Nov 14, 2013 at 3:13 AM, Paolo Valleri wrote: > hi, > I've just tried the 'community edition' and I got many Unresolved > ref

[web2py] Re: Problems with mail.send()

2013-11-14 Thread Kariloy Markief
Well I'm not sure where and how to open a ticket but in the meantime I search through the internet for a solution and then the source code and the answer lies in adding server.esmtp_features["auth"] = "LOGIN PLAIN" at the right place in Mail class at the gluon/tools.py file. for my current app

Re: [web2py] Managing temporary tables

2013-11-14 Thread Richard Vézina
Johann, what about creating a postgres view with you query and then just interface it as table in web2py... Of course you will not be able to do any of CRUD, but you can select/consult you data. I do that for many usage, for instance get a subset of membership user id, for reporting (my report is a

Re: [web2py] Error uploading 60 character named .pptx file

2013-11-14 Thread Niphlod
path is everything going from *d:\* to *.pptx*, not just the filename On Thursday, November 14, 2013 11:03:05 AM UTC+1, Rahul wrote: > > Okay - > So in my case the file name actually passed to DB is as highlighted below > - this is 229 characters long (still smaller than 260 limit). Can the >

[web2py] Re: dashboard using bootstrap

2013-11-14 Thread Rahul s
Hi, People I would like to build a Dashboard page using bootstrap, the page should contain graphs and tables. I am beginner in this but i am trying, please help me out and guide where i can learn to design or what should i have to do ..Thnks in advance On Thursday, November 29, 2012 3:28:52 PM

Re: [web2py] SQL UNIQUE IN WEB2PY : CONSTRAINT unique_test UNIQUE (num_part1, num_part2, num_part3, title)

2013-11-14 Thread Ida N
This does not create a unique constrain on 'a' and 'b', it is noting like running the command ALTER TABLE umultiple ADD CONSTRAINT test_unique UNIQUE (a, b)! it create and extra column in the column in the table alled 'ab' and puts the unique constrain on that! if you follow this approch for eve

[web2py] SQLFORM grid Export all the fields and not only visible fields

2013-11-14 Thread Gaurav Agrawal
Hello, SQLFORM.grid(db.table_name,fields=visiblefields) visiblefields is a list that contains only few fields among the all the fields in the table When I use the export option to export in html, it contains only the fields that are available in the visiblefields but the view/edit normally cont

[web2py] Managing temporary tables

2013-11-14 Thread Johann Spies
I want to work with a selection of article_id's in combination with publication year. This list of records can anything form a few to many thousands. To use .belongs(listofthousands) is very slow so I am thinking of using Postgresql's create table temptable as (select ...) and then in the control

Re: [web2py] Re: count of reference usage

2013-11-14 Thread webpypy
Thank you , Massimo & viniciusban , Would please write down the statement for calculating the count of Things for every person? instead of >>> for row in persons_and_things.select(): print row.person.name, row.thing.name Alex Boat Alex Chair Bob Shoes Curt Boat I would like to get

Re: [web2py] Re: count of reference usage

2013-11-14 Thread Vinicius Assef
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#count,-isempty,-delete,-update On Thu, Nov 14, 2013 at 4:04 AM, webpypy wrote: > > Thank you , Massimo. > > Would please write down the statement for calculating the count of Things > for every person? > > instead of >

Re: [web2py] security concerns

2013-11-14 Thread Vinicius Assef
Encrypting data does not turn them secure, by itself. If someone has access to the cryptographic key, the encryptation worths nothing. So, about security, you don't consider only the framework. But you DB access, your server password, etc. On Wed, Nov 13, 2013 at 5:04 PM, sasogeek wrote: > A fr

Re: [web2py] Error uploading 60 character named .pptx file

2013-11-14 Thread Rahul
Okay - So in my case the file name actually passed to DB is as highlighted below - this is 229 characters long (still smaller than 260 limit). Can the upload field handle such long file names ? Do you think that could be the problem? How do we specify file name character limit in db.py when de

Re: [web2py] Re: web2py & pycharm...

2013-11-14 Thread Tim Richardson
The book has some tips in using IDEs with web2py. You can go a long way by adding in false imports if false: import ... see chapter "other recipes" pycharm pro edition has built-in web2py support which means out of the box integrated debugger support and support for the all the includes. But

[web2py] Re: orderby variable, uknown column

2013-11-14 Thread Niphlod
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=multiple%20equivalent On Wednesday, November 13, 2013 10:15:27 PM UTC+1, Noah Corradin wrote: > > Thank you so much! was this covered in some documentation i may have > missed? > > On Wednesday, November 13, 2013

Re: [web2py] SQLFORM update upload field - override 'file' anchor text

2013-11-14 Thread Niphlod
as any widget in web2py, it's defined here https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L488 On Thursday, November 14, 2013 2:58:59 AM UTC+1, Jim S wrote: > > Any takers? Won't bother again if no response to this one... > > > -Jim > > > On Tue, Nov 12, 2013 at 1:36 PM, Jim S >

[web2py] Re: mssql connection

2013-11-14 Thread Cacpacific O
Thank you... / will try & feedback .. :) On Thursday, November 14, 2013 5:14:12 AM UTC+7, Derek wrote: > > Possible... > > Microsoft OLE DB Provider for ODBC Drivers error '80004005' > [Microsoft][ODBC Driver Manager]Data source name not found and no default > driver specified. > This usually

Re: [web2py] Error uploading 60 character named .pptx file

2013-11-14 Thread Niphlod
On Thursday, November 14, 2013 6:21:26 AM UTC+1, Rahul wrote: > > Hi Ricardo, > Thanks for the response, but I don't understand why it should be > a windows limit. I have many files with much larger names in windows, never > had such a problem. Besides this only occurs when we are upl

Re: [web2py] Re: web2py & pycharm...

2013-11-14 Thread Arnon Marcus
The community edition does not support web2py. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the

Re: [web2py] Re: web2py & pycharm...

2013-11-14 Thread Paolo Valleri
hi, I've just tried the 'community edition' and I got many Unresolved references for request, response and so on. Have you found a way to fix ? Paolo On Tuesday, October 1, 2013 2:29:49 AM UTC+2, Richard wrote: > > This suppose to be solve : > http://youtrack.jetbrains.com/issue/PY-10810 > > I h