[web2py] Re: Web2py Debug Error

2014-12-14 Thread Shaun Smith
Hi I had the following html comment block in my 'index.html' view. When I deleted the block the app ran again. Kind Regards Shaun On Friday, December 12, 2014 11:06:04 AM UTC+2, Shaun Smith wrote: > > Hi > > I am a new user to web2py and am trying to use the debug feature. I have > attac

[web2py] Re: Thread safety and importing db, response, session

2014-12-14 Thread Mark Graves
Right, I knew it looked too easy. Thanks, Anthony! Would it be viable to say in models (or controllers): from gluon import current current.db = db Then in modules: def my_function(current): db = current.db session = current.session request = current.request response = curr

[web2py] Re: Component with argument example

2014-12-14 Thread Anthony
The grid makes use of URL args, so if the base URL of the grid action also includes args, you must tell the grid to preserve those extra-grid args via its "args" argument: form = SQLFORM.grid(db.address.client == itemid, args=request.args[:1]) Anthony On Sunday, December 14, 2014 2:54:06 PM UT

Re: [web2py] Re: Domain model and web2py DAL

2014-12-14 Thread Anthony
It might be easier if you provide a concrete example of what you are trying to achieve (perhaps using the syntax of an existing ORM or using pseudo-code) and explain how the DAL falls short. Anthony On Sunday, December 14, 2014 2:54:42 PM UTC-5, Alan Evangelista wrote: > > Simple is a relative

[web2py] Re: Thread safety and importing db, response, session

2014-12-14 Thread Anthony
No, the book warns to avoid that approach: http://www.web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules You cannot assign the thread local object to a top-level variable in the module, as it will only be assigned once upon first import. Anthony On Sunday, De

[web2py] Cry About Crypt [Web2py Project]

2014-12-14 Thread Andrew
Greetings web2py mailing list! I am posting a web2py project I have created and doing active development on. I am not posting this project for any sort of promotion or to receive financial compensation as the service and code is completely free. Perhaps though, if people find time they would be

Re: [web2py] Installation of an editor plugin in web2py app

2014-12-14 Thread Maboroshi
Your error at this point isn't from ckeditor but you are using a reserved sql keyword in your database table/field. I suggest removing this line *check_reserved=['all']* or change the name of one of the fields/tables in question. As a side reference here is a brief bit of info for implementing cke

Re: [web2py] Re: Domain model and web2py DAL

2014-12-14 Thread Alan Evangelista
Simple is a relative term, I should not have associated it with web2py DAL. What I meant is that I want to make my application logic completely independent from persistent data storage. The only method I know to implement this is using the data mapper design pattern (http://en.wikipedia.org/wik

Re: [web2py] Re: 2 factor auth doesn't seem to take effect.

2014-12-14 Thread Maboroshi
Thank you very much. On Tue, Dec 9, 2014 at 11:09 AM, pn wrote: > > I just tested and it works fine except it seems that the documentation in > the book is incorrect. > > You must add this line to db.py (or in whatever file you define the auth > and set auth.settings); > > auth.settings.two_facto

[web2py] Thread safety and importing db, response, session

2014-12-14 Thread Mark Graves
Hey everyone, I could use a sanity check here from the community. In a controller I get a record, then, I want to pass do some database calls from a module. It seems that the least code I could write would be in models: from gluon import current current.db = db Then in the module at the top

[web2py] Re: vps.net ubuntu script installation for web2py doesn't appear to work

2014-12-14 Thread Vin Yard
I tried setup-web2py-nginx-uwsgi-ubuntu.sh but it didnt work either. Only solution I found is to use the same script that I downloaded from the same repository (same link http://web2py.googlecode.com/hg/scripts/setu

[web2py] Re: migrate and fake_migrate

2014-12-14 Thread Jose
El viernes, 12 de diciembre de 2014 11:13:34 UTC-3, Niphlod escribió: > > nope, can't reproduce the issue. Something very weird is going on on your > development system. > I tell you, I did the following: I uninstalled all ports (I have *FreeBSD 10.1*) and installed the minimum to run web2py

[web2py] Component with argument example

2014-12-14 Thread clara
Hello, I would like to see an example of a component with an argument. I tried it with no luck, If I define the component without arguments it works fine but if I add an argument loading the page that has the component leads to some kind of infinite recursion. Any help on this would be apprecia

[web2py] Re: string form javascript function to controller function using ajax

2014-12-14 Thread Jacinto Parga
I have used this example but request.vars is empty, I cannot get the json string in controller. In view: {{extend 'layout.html'}} Template default/jsontest.html {{=BEAUTIFY(response._vars)}} $(document).ready(function(){ $.ajax({ type: 'POST', url:'[web2py] Re: exe file for web2py app
It's in the book: http://www.web2py.com/books/default/chapter/29/14/other-recipes#How-to-distribute-your-applications-as-binaries On Thursday, December 11, 2014 11:58:59 PM UTC-5, kanchan wrote: > > > Hello, > > My question is that can we make exe file for any web2py application. > > please repla

Re: [web2py] Ways to manage db without ssh tunnel

Also, look into this functionality: http://www.web2py.com/books/default/chapter/29/09/access-control#Application-Management-via-privileged-users--Experimental- On Sunday, December 14, 2014 11:33:36 AM UTC-5, sergenikov wrote: > > Thank you Marco. I think you're right and this should work pretty w

[web2py] Re: ERR_CACHE_MISS while working with SQLFORM.factory()

Ideally, hitting the back button in the browser after a form submission is not a common workflow in your app. If it is, you probably need to come up with an alternative. Using a GET request is not a good idea if POST is the appropriate HTTP verb (e.g., if submitting the form results in changes

Re: [web2py] Ways to manage db without ssh tunnel

Thank you Marco. I think you're right and this should work pretty well and still be safe given good passwords. From what I read in the book this feature is well-done in web2py. Thank you. On Saturday, December 13, 2014 11:15:08

[web2py] Re: ERR_CACHE_MISS while working with SQLFORM.factory()

Thanks for the response. So can we remove this warning while still using SQLFORM.factory() ? . Actually in this mailing list, I read one post regarding the same error, where a form was generated via HTML and "method" was set as "get" instead of "post", to remove the same warning. You may wanna

[web2py] Re: summing fields

http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum--avg--min--max-and-len On Thursday, December 11, 2014 8:32:03 AM UTC+1, Anthony Smith wrote: > > Hi > I have the following sql which returns what I want , but losted on how to > use in my web2py controller. > any po

[web2py] Re: exe file for web2py app

you download the binary, extract it somewhere, put your app into applications (optionally renaming it as "init" as this will be the default application), remove examples and welcome, recompress to an archive and distrubute it. On Friday, December 12, 2014 5:58:59 AM UTC+1, kanchan wrote: > > >

[web2py] Re: A helper and delete argument

A(, noconfirm=True) On Friday, December 12, 2014 2:09:59 PM UTC+1, Pavel wrote: > > I have another question: > Example from works fine. > But, how to prevent showing popup message with warning about deleting > object from page? > > Thanks > -- Resources: - http://web2py.com - http://web2py.

[web2py] Re: ERR_CACHE_MISS while working with SQLFORM.factory()

it's standard behaviour for modern browsers. You can't go back to something that was generated by a POST (the form submission) without a warning, because it's like having the form submitted twice (POST isn't idempotent). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: migrate and fake_migrate

On Friday, December 12, 2014 4:40:59 PM UTC+1, Tom Øyvind Hogstad wrote: > > I have probably the same issue. > After it popped up and I couldn't resolve it I have manually added the > fields to postgre. > > As I understand fake migrate it will regenerate the data needed for > migrate. > nope.

[web2py] Re: bootstrap 3 - if you care help test trunk now

I also had overlay icons, in the auth navbar, as shown. To solve it I had to edit gluon/tools.py:1536 def bootstrap3(): # Default web2py scaffolding

Re: [web2py] Re: bootstrap 3 - if you care help test trunk now

@Jim S Thank you for your post. I'd like to try it -- bootstrap 3 -- but I"m not sure which src files to link to in the layout.html file. For example, should I keep or delete the links to the web2py.css/.js/.ajax files? I've already downloaded the bootstrap 3 files (.css , .js , /font files)

[web2py] Re: Appadmin delete problem

Ah yes! The _after_delete was defined the same way as _after_insert: _after_delete: lambda fields, id: so I had to remove the id, and change it to self: *_after_delete: lambda self:* Den onsdagen den 10:e december 2014 kl. 14:38:57 UTC+1 skrev Anthony: > > Have you defined any _after_delete funct