[web2py] Re: Can't get linkto working in SQLFORM

2011-07-24 Thread jc
Maybe the fix is just remove it from the manual, since the instructions in the manual don't work. On Jul 24, 9:40 am, Massimo Di Pierro wrote: > P.S. I would not suggest using this for anything else by appadmin. > > On Jul 24, 3:39 am, Massimo Di Pierro > wrote: > > > > > > > > > The fact is tha

[web2py] Re: JSON & 1.97.1

2011-07-24 Thread Massimo Di Pierro
No. what error do you get? Did you try call the databales function directly and/or call call/json/datatables directly? On Jul 24, 9:34 pm, toan75 wrote: > I updated from v1.96.4 to v1.97.1 but Json is not working now. > There is a change in v1.97.1 or I did something wrong? > > In controller: > >

[web2py] Re: migrating to postgres from sqlite

2011-07-24 Thread weheh
I think I'm beginning to understand the issue. sqlite is forgiving when deleting tables that are referenced by other tables. postgres doesn't allow that and hangs up. If I first null out the pointers from table A to table B I can then delete table B and not get locked up. Forgive me for being a pos

[web2py] Re: migrating to postgres from sqlite

2011-07-24 Thread mart
this worked: killed all opened terminals, then forced quit the terminal application and that did it. suddenly unlocked... Mart On Jul 24, 11:21 pm, mart wrote: > woops, finger caught the 'enter ' key... anyways that's it then :) > > thanks, > Mart :) > > On Jul 24, 11:19 pm, mart wrote: > > > >

[web2py] Re: migrating to postgres from sqlite

2011-07-24 Thread mart
woops, finger caught the 'enter ' key... anyways that's it then :) thanks, Mart :) On Jul 24, 11:19 pm, mart wrote: > I'm getting the same thing (or similar) but with SQLite... > > i killed anything else that may be connecting to the DB, but now only > thing I can do is select. Can't update, del

[web2py] Re: migrating to postgres from sqlite

2011-07-24 Thread mart
I'm getting the same thing (or similar) but with SQLite... i killed anything else that may be connecting to the DB, but now only thing I can do is select. Can't update, delete, truncate, etc,... is there something to programmatically unlock a DB? the only thing curing this is to wipe out the db.

[web2py] JSON & 1.97.1

2011-07-24 Thread toan75
I updated from v1.96.4 to v1.97.1 but Json is not working now. There is a change in v1.97.1 or I did something wrong? In controller: def call(): #session.forget() return service() @service.json def datatables(): return data In view: .. "sAjaxSource": "{{=URL(f

Re: [web2py] Re: The web2py grid/crud plugin you've always dreamed about!

2011-07-24 Thread Bruno Rocha
Thank you Tom! I will see the problem and solve the issue, thanks for contribution On Sun, Jul 24, 2011 at 9:19 PM, tomt wrote: > Hello, > > I tried a clean install of web2py.app.PowerGrid.w2p and it didn't fix > any problems. > > I upgraded my python from 2.5.2 to 2.7.2, and web2py no longer

[web2py] Re: The web2py grid/crud plugin you've always dreamed about!

2011-07-24 Thread tomt
Hello, I tried a clean install of web2py.app.PowerGrid.w2p and it didn't fix any problems. I upgraded my python from 2.5.2 to 2.7.2, and web2py no longer throws an error on line 446 in modules/plugin_PowerGrid/PowerGrid.py" > with open(path ,"r") as f: Web2py still complains about 'by' in d

[web2py] migrating to postgres from sqlite

2011-07-24 Thread weheh
This is probably not a web2py question, but here goes anyway. I'm migrating to postgres from having prototyped with sqlite. Besides a few instances where I had reference fields defaulting to 0 instead of None, the migration went smoothly. BUT, I'm having the database get locked up all the time when

Re: [web2py] The web2py grid/crud plugin you've always dreamed about!

2011-07-24 Thread Miguel Lopes
Great work, it will be/is very useful for many of us! Thanks, Miguel On Fri, Jul 22, 2011 at 11:35 PM, Bruno Rocha wrote: > Hi, > > I present you PowerGrid Plugin (now in beta 0.1) [ > http://labs.blouweb.com/PowerGrid/] > > What is it? > > A plugin to show, manage and paginate data > It works w

Re: [web2py] Re: Tutorial about making a Layout

2011-07-24 Thread Anthony
On Sunday, July 24, 2011 5:27:12 PM UTC-4, Ramos wrote: > > My dificulty is the {{ include }}tag > > If a layout has for example 4 include tags how does the view knows where to > put the content. > It doesn't, which is why you can have only one {{include}} in a view. However, if you want to in

Re: [web2py] Re: Tutorial about making a Layout

2011-07-24 Thread António Ramos
My dificulty is the {{ include }}tag If a layout has for example 4 include tags how does the view knows where to put the content. Also the block tag is the same as the include tag? thank you António 2011/7/24 Bruno Rocha > I wrote something in pt-BR > http://web2pybrasil.appspot.com/init/plug

[web2py] Avoid chrome issue: Resource interpreted as Image but transferred with MIME type ...

2011-07-24 Thread Charles Law
I have users with their own private storage. They can access their files using a function that returns the files. Here is a snippet of code: response.headers['Content-Type'] = mimetypes.types_map[filetype] path=os.path.join(request.folder,('uploads/'),filename) return res

[web2py] Re: is_upload_filename and requires=False

2011-07-24 Thread Anthony
How about requires=IS_EMPTY_OR(IS_UPLOAD_FILENAME(...)) Anthony On Sunday, July 24, 2011 1:42:57 PM UTC-4, Andrew wrote: > Hello I am trying to figure out how to require a File extension for an > upload but make the upload not required. > > Field('file','upload', required=False, > require

[web2py] X-AppEngine-country in web2py

2011-07-24 Thread Dmitry Sadovnychyi
How to use X-AppEngine-country headers in web2py? web2py returns its headers.

[web2py] is_upload_filename and requires=False

2011-07-24 Thread Andrew Evans
Hello I am trying to figure out how to require a File extension for an upload but make the upload not required. Field('file','upload', required=False, requires=IS_UPLOAD_FILENAME(extension ='(pdf|doc|txt)' , error_message='Inappropiate extension, Please Upload PDF or DOC file only')), Any ideas

[web2py] How to use X-AppEngine-country HTTP Header in web2py?

2011-07-24 Thread Dmitry Sadovnychyi
response headers dont print X-AppEngine-country.

Re: [web2py] Re: Can't get linkto working in SQLFORM

2011-07-24 Thread Bruno Rocha
I always use virtual fields for links. http://zerp.ly/rochacbruno Em 24/07/2011 05:40, "Massimo Di Pierro" escreveu: > P.S. I would not suggest using this for anything else by appadmin. > > On Jul 24, 3:39 am, Massimo Di Pierro > wrote: >> The fact is that is how it works but the manual may be i

Re: [web2py] Re: Tutorial about making a Layout

2011-07-24 Thread Bruno Rocha
I wrote something in pt-BR http://web2pybrasil.appspot.com/init/plugin_wiki/page/curso-web2py-017 http://zerp.ly/rochacbruno Em 24/07/2011 14:36, "Anthony" escreveu: > On Sunday, July 24, 2011 1:04:41 PM UTC-4, Ramos wrote: > >> Ok, but the book is only text i need some images to understand. >> >

Re: [web2py] Re: Tutorial about making a Layout

2011-07-24 Thread Anthony
On Sunday, July 24, 2011 1:04:41 PM UTC-4, Ramos wrote: > Ok, but the book is only text i need some images to understand. > > i read this tutorial in portuguese with some images to go along to see what > we are talking about layouts but the example does not work as expected . > http://www.tuxtilt

[web2py] Re: inserts from background process not visible on admin page

2011-07-24 Thread Michael Ellis
Never mind. I hadn't realized that updates and inserts from a background process needs an explicit db.commit(). Seems to be working correctly now by just blindly calling db.commit() after the insert returns. On Jul 24, 1:02 pm, Michael Ellis wrote: > I'm running a background process started w

Re: [web2py] Re: Tutorial about making a Layout

2011-07-24 Thread António Ramos
Ok, but the book is only text i need some images to understand. i read this tutorial in portuguese with some images to go along to see what we are talking about layouts but the example does not work as expected . http://www.tuxtilt.com/web2py-views-e-static-files-layout/ I need a layout for dummi

[web2py] inserts from background process not visible on admin page

2011-07-24 Thread Michael Ellis
I'm running a background process started with web2py -S as described in the web2py book. The background process receives data from an external process and inserts it into a table in the sqlite3 db. This appears to be succeeding but when I try to access the table from the admin page using a norma

[web2py] Re: Tutorial about making a Layout

2011-07-24 Thread Anthony
Are you talking about how to design a layout from an HTML/CSS perspective (for which you should probably consult outside resources, as that is not a web2py specific issue), or just the mechanics of how to assemble a web2py layout view template (assuming you already know the HTML/CSS structure yo

Re: [web2py] Re: Search Form Help

2011-07-24 Thread Ismael Serratos
Thank you Anthony I'm reading the info I think it's better than what I have now: View: {{extend 'layout.html'}} #keyword { height: 25px; width:800px; background-color : #F0F0F0 ; color : #0E1930; font-size : 12px; font-family : Verdana,

Re: [web2py] wiki 1st question: problem with an anchor

2011-07-24 Thread Jonathan Lundell
On Jul 23, 2011, at 10:53 PM, Martin Weissenboeck wrote: > I have written a text page "abc" with web2py wiki containing a label [[a]]. > There are two links in default/index.html: > http://127.0.0.1:8000/test/plugin_wiki/page/abc#a";>Link 1 > {{=A('Link 2',_href=URL('test','plugin_wiki','page',

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-24 Thread Iceberg
I prefer to use crud, but it is not qualified for your workaround I think. On the other hand, you said that there is a "custom" widget which interfere with validators. Is it possible that I switch "back" to an old style widget, which respects validators? Because I need server side validation more

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-24 Thread Massimo Di Pierro
try one more thing: form = SQLFORM() form.element('input#appointment_participants') ['requires']=IS_NOT_EMPTY() if form.accepts(...) The problem is that the custom widget interfere with validators and validators may have to be attached to the widget. On Jul 24, 8:22 am, Iceberg wrote: > Hi

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-24 Thread Iceberg
Hi Massimo, Thanks for trying to help. Perhaps I did not clearly explain the point. I hope to add an IS_NOT_EMPTY() constraint to any "list:reference table_name" field. My previous snippet is copied from web2py book, but in my real need, that "list:reference" field is not necessary a tag. So I'm

[web2py] Re: Web2py talk proposal - Codebits 2011

2011-07-24 Thread blackthorne
I'm rehashing this topic to ask for your contributions to this talk. Now this is the main IT event in Portugal and it's widely dominated by web development so whatever I present on web2py must be a killer! I'm preparing this in advance so there is time to include all of your best ideas, tips and co

[web2py] Re: Freezes Ramdonly after 36 hrs of running.

2011-07-24 Thread Massimo Di Pierro
does it freeze without cron? On Jul 24, 4:29 am, Phyo Arkar wrote: >    Web2py seems to be freezing (One CPU using 100%) Randomly. The > pages are only normal web pages with database access (simple Select > Query). > >    I cannot reproduce the problem but it happens like every 3-4 days. > Also A

[web2py] Freezes Ramdonly after 36 hrs of running.

2011-07-24 Thread Phyo Arkar
Web2py seems to be freezing (One CPU using 100%) Randomly. The pages are only normal web pages with database access (simple Select Query). I cannot reproduce the problem but it happens like every 3-4 days. Also Admin freeze while doing cron jobs (Cleaning expiring sessions) , so i had to sta

Re: [web2py] Re: FORM questions

2011-07-24 Thread Kenneth Lundström
Thanks Anthony, I changed it to: from decimal import Decimal and now it works. Kenneth That's an issue with your Python code. You should either move the import outside the function or only import specific objects from the Decimal module (which is probably a better idea -- "from module impor

[web2py] Re: Can't get linkto working in SQLFORM

2011-07-24 Thread Massimo Di Pierro
P.S. I would not suggest using this for anything else by appadmin. On Jul 24, 3:39 am, Massimo Di Pierro wrote: > The fact is that is how it works but the manual may be incorrect. > > linkto is used for appadmin and appadmin wants to know which od is > involved in the query,for example > > db.tab

[web2py] Re: Can't get linkto working in SQLFORM

2011-07-24 Thread Massimo Di Pierro
The fact is that is how it works but the manual may be incorrect. linkto is used for appadmin and appadmin wants to know which od is involved in the query,for example db.table.field==1 so linkto has to be of the form URL('action',args='db') It has been so for two years. It cannot be changed wit

[web2py] Re: Questions about chapter 3 in documentation - "request.vars.visitor_name"

2011-07-24 Thread jc
I too am a beginner, but here is my two ha'p'orth... On Jul 24, 5:01 am, Jared Stunn wrote: > I know this is really basic but I dont understand. Can somebody please > explain what is happening in the excerpt below. I am doing chapter 3 > of the documentation found > here:http://www.web2py.com/bo

[web2py] Tutorial about making a Layout

2011-07-24 Thread António Ramos
hello, i´m having dificulty understanding how to make my own layout. The web2p book is very fast explaining this. Where can i find a video about making a layout? thank you António

[web2py] Re: How to add a IS_NOT_EMPTY constrait to list:reference field?

2011-07-24 Thread Massimo Di Pierro
I understand and what you need to do is a bit more complex than needs to be. For this reason we have plugin_tagging and tagging in plugin_wiki. Another approach is the following... class TAGGING: def __call__(self,field,value): return INPUT(_name='%s_%s' % (field._tablename,field.nam