[web2py] Wordpress model file

2013-12-20 Thread guruyaya
I have several projects in my work, that require handling wordpress. As I hate doing stuff in PHP, and DAL is my prefered tool for a lot of my work, I've created a model file of wordpress. I hope you'll find it useful, and I'd love to hear your feedback Have fun: https://github.com/guruyaya/web

[web2py] setting up web2py for godaddy.com

2013-12-20 Thread AY
Hi, I am trying to setup web2py for godaddy.com Anyone with experience with Godaddy.com? Or any suggestions? Regards, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

[web2py] Re: response.models_to_run in web2py 2.8.2

2013-12-20 Thread Massimo Di Pierro
Thanks. It is in trunk! On Friday, 20 December 2013 08:56:20 UTC-6, Anthony wrote: > > I have identified the problem and sent a patch to Massimo (attached). In > the meantime, it should work if you change: > > response.models_to_run.append(...) > > to: > > response.models_to_run = [...] >

Re: [web2py] Re: after_insert - database transaction?

2013-12-20 Thread 黄祥
another way around i think you can do : e.g. def __after_insert_invoice(f, id): db(db.treatment.id == f.treatment_no).update(status = 'Invoice') treatment = db(db.treatment.id == f.treatment_no).select().first() db(db.registration.id == treatment.registration_no).update(status = 'Invoice') regist

[web2py] Re: Blob image to web2py style

2013-12-20 Thread 黄祥
please take a look at : http://web2py.com/books/default/chapter/29/13/deployment-recipes#Uploading-files-in-database best regards, stifan > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/we

[web2py] Re: output the name of file stored in table in upload filed?

2013-12-20 Thread 黄祥
i think you still need to use python to retrieve the row.files.document.name in the html side. e.g. not tested {{= row.files.document.name}} best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] javascript in controller

2013-12-20 Thread sonu kumar
Hi, When I use below code in controller to show form. It works fine but when I see html source of html page...it shows some charachters...which is shown in red below. how to remove them? form=FORM(TABLE(TR('Select protease:',SELECT(values,requires=IS_NOT_EMPTY("choose one value"),_name='prote

[web2py] Re: Populating a SQLFORM select with auth.user

2013-12-20 Thread samuel bonill
sorry; @auth.requires_login() def addpump(): """ add pump """ form = SQLFORM(db.pumpData) if form.process().accepted: redirect(URL('listpumps')) return dict(form=form) @auth.requires_login() def listpumps(): query = db(db.carOwner.carowner==auth_user.id).select()

[web2py] Re: Populating a SQLFORM select with auth.user

2013-12-20 Thread samuel bonill
try this: @auth.requires_login() def addpump(): """ add pump """ form = SQLFORM(db.pumpData) if form.process().accepted: redirect(URL('listpumps')) return dict(form=form) @auth.requires_login() def listpumps(): query = db(db.carOwner.carowner==auth_user.id).sele

[web2py] adding dropdown of 3rd table on 2nd table in form

2013-12-20 Thread deepak sandhu
model: # coding: utf8 db.define_table('dept', Field('name',unique=True,label='Department Name'), format='%(name)s') db.define_table('course', Field('dept_id','reference dept'), Field('name',unique=True,l

[web2py] Re: altering tables and gets database not working. trying to find a way to empty the database.

2013-12-20 Thread Carlos Zenteno
To answer your question. I go to a SQLITE utility (if your are using SQLITE) and delete the tables from there and then do #1 in your list, delete the database files for the same tables. It works for me this way... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - htt

[web2py] server slow down when face multiple requests

2013-12-20 Thread sonu kumar
Hi All, I have built one application using web2py and running on Apache server on unix environment. During testing of this application what I found is slowing down of my application when two users from different computer request my application or submit any job. I have no idea why it is happenin

[web2py] Re: janrain login not working anymore?

2013-12-20 Thread Peter Govers
I'm sorry, made a typo in patch above. Also changed code to be backwards compatible with older web2py versions. Updated PR and added new patch. Op vrijdag 20 december 2013 20:58:11 UTC+1 schreef Peter Govers: > > It seems the Jainrain Legacy Sign-in Widget has hit its end-of-life and > has bee

[web2py] output the name of file stored in table in upload filed?

2013-12-20 Thread deepak sandhu
this is view file: {{for row in rows:}} download {{pass}} by doing so I get the download link of all the files one by one but all of them are named "download" which gets confusing to know which one is which. So I was trying to output their name: row.files.document.name or

[web2py] Re: Linking program to web service

2013-12-20 Thread Dave S
On Friday, December 20, 2013 4:36:14 AM UTC-8, sly cooper wrote: > > I am new to python but before I proceed with the language, I would like to > know if I can link my python based program to a web service. I will be > using this for my project, so if I cannot use a web service as my database >

Re: [web2py] how to define adal model at runtime

2013-12-20 Thread Manuele Pesenti
Il 19/12/13 11:53, Giuseppe D'Amico ha scritto: > Hi I am new to web2py I need to connect to a legacy database that > could be postgresql or mysql, I would like to know if there is a way > to define the model of the database at runtime? could it be of any help? http://www.web2pyslices.com/slice/s

[web2py] TclError bad option iconphoto

2013-12-20 Thread Daniel Nogues
Hello, I'm setting up web2py on a Mac OS X 10.5.8 with Python 2.7.2 I have so far done these steps: 1. create VENV with no_site_packages 2. activate VENV 3. run: pip install web2py 4. run: pip install mercurial 5. run: w2p_clone from VENV 6. launch web2py with: python ./web2py/web2py.py At step

[web2py] Possibly a problem with CAS redirection in v2.8.2

2013-12-20 Thread Vinicius Assef
Hi guys, I'm playing around with CAS and faced this error: begin here The webpage at http://localhost:8000/cas/default/user/cas/login?service=http://localhost:8000/consumer/default/user/login# has resulted in too many redirects. Clearing your cookies for this site

[web2py] Re: janrain login not working anymore?

2013-12-20 Thread Peter Govers
It seems the Jainrain Legacy Sign-in Widget has hit its end-of-life and has been replaced by Social Sign-in Widget. I've changed RPXAccount login_form (gluon/contrib/login_methods/rpc_account.py) to migrate Janrain's Legacy Sign-in Widget to the current Social Sign-in Widget. For more info: ht

[web2py] Re: Trouble setting up database that chooses predefined options.

2013-12-20 Thread Dave S
On Thursday, December 19, 2013 9:06:27 PM UTC-8, Cliff wrote: > > Hi Dave > > Thanks for the reply! That was somewhat the path I was on. I like the > boolean idea. Where I am hung up now though is how I would list all the > bowl games on a page then update picks, like how i mentioned before. Wou

[web2py] Blob image to web2py style

2013-12-20 Thread Adam Filić
I have mysql database with lot of blob images in it and I want to migrate from PHP to web2py. What is the best and easiest way to expose blob image to web2py style? Any suggestion? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] Font size and FPDF Report

2013-12-20 Thread Alfonso Pastor Sierra
Hi, I have the code for a PDF Report: def export_pdf(): title = "Informe de impresiones" head = THEAD(TR(TH("Fecha/Hora",_width="16%"), TH("Impresora",_width="17%"), TH("Host",_width="10%"), TH("Usuario",_width="10%"),

[web2py] janrain login not working anymore?

2013-12-20 Thread Rene Dohmen
Hi, We use the janrain login method in a couple of our webapps. As of today it suddenly stopped working... Are there any other users that use the janrain login methods? (and have it working?) On the janrain site I found a story about and old and a new way to use janrain. The Iframe way seems

[web2py] Temporarily Poll View

2013-12-20 Thread EW
I have a load component with a grid in it and a user-triggered action that could insert/update the database table that my grid's based on. Depending on many factors, the database insert could take a long time, say 45s+. I would like to update the view to show the updating grid while the insert

[web2py] Re: Linking program to web service

2013-12-20 Thread Leonel Câmara
I don't see what the choice of programming language has to do with being able to connect to a webservice. Although, python certainly makes it very easy. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

Re: [web2py] call username in query

2013-12-20 Thread Federico Ferraro
query=((db.battle_log.created_by == auth.user_id)) 2013/12/20 Warrick > Hi All, > > I am writing a SQLFORM.grid, but I want user to be able to only read, > delete and edit their own records. > > I am wanting to write a query, but how do I reference the logged in user's > username from .db.aut

[web2py] Re: Can't Start Scheduler Worker

2013-12-20 Thread EW
Never mind...command line works -- 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 Google Groups

[web2py] Can't Start Scheduler Worker

2013-12-20 Thread EW
I've never used a scheduler before and am having trouble starting up. When I try to start the workers (tried from command line and from gui), I get this error message: starting browser... starting scheduler from widget for "namebrowser"...

Re: [web2py] Re: after_insert - database transaction?

2013-12-20 Thread Johann Spies
On 20/12/2013 16:32, Massimo Di Pierro wrote: Mind that _after insert take id, and a Row object: db.invoice._after_insert.append(lambda row,id: function_updating_transactions(id)) Thanks Massimo. Regards Johann -- J.H. Spies - Tel. 021-982 2694 / 082 782 0336 / 021-808 4699(w) Po

[web2py] Re: response.models_to_run in web2py 2.8.2

2013-12-20 Thread Anthony
I have identified the problem and sent a patch to Massimo (attached). In the meantime, it should work if you change: response.models_to_run.append(...) to: response.models_to_run = [...] When mutating response.models_to_run, it doesn't recognize that it has changed, so you need to do

Re: [web2py] LDAP Auth

2013-12-20 Thread Richard Vézina
Could you show your mods? It could help to understand the issue you have how we can solve them... Richard On Thu, Dec 19, 2013 at 7:30 PM, Maggs wrote: > Yes secure ldap is causing a lot of problems. I hope it gets sorted out > eventually. For now I'm having to modify the framework for my nee

[web2py] Populating a SQLFORM select with auth.user

2013-12-20 Thread rsantellan
Hi! I'm new in web2py and I started to make a simple application to test it. My db.py file is like this: # -*- coding: utf-8 -*- from gluon.tools import * db = DAL('mysql://root:@localhost/web2pyPumpIt',pool_size=5,check_reserved=['all']) auth = Auth(db) auth.define_tables()

[web2py] Online classes

2013-12-20 Thread Horia Sar
Thanks so much Massimo.Looking forward to watch the videos! -- 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 subs

[web2py] call username in query

2013-12-20 Thread Warrick
Hi All, I am writing a SQLFORM.grid, but I want user to be able to only read, delete and edit their own records. I am wanting to write a query, but how do I reference the logged in user's username from .db.auth_user? query: query=((db.battle_log.created_by = “”)) Thanks -- Resources: - ht

[web2py] Linking program to web service

2013-12-20 Thread sly cooper
I am new to python but before I proceed with the language, I would like to know if I can link my python based program to a web service. I will be using this for my project, so if I cannot use a web service as my database then python will not be useful to me. -- Resources: - http://web2py.com -

Re: [web2py] Re: after_insert - database transaction?

2013-12-20 Thread Massimo Di Pierro
Mind that _after insert take id, and a Row object: db.invoice._after_insert.append(lambda row,id: function_updating_transactions(id)) On Friday, 20 December 2013 08:25:09 UTC-6, Johann Spies wrote: > > Thanks Niphlod! > > Would something like this do the trick? > > db.invoice._after_insert.appen

Re: [web2py] Re: after_insert - database transaction?

2013-12-20 Thread Johann Spies
Thanks Niphlod! Would something like this do the trick? db.invoice._after_insert.append(lambda id: function_updating_transactions(id)) Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- Resources: - http://web2py.com -

[web2py] Re: how do I create, multiple forms and precess them, using 'for' statement?

2013-12-20 Thread Ivo
I have chosen to go the custom form way. The only issue I have is that upon hitting submit, the button submits all the forms on the page instead of just the one owning the button. I think this also screws up my validation and it prevents records from being inserted to the db. controller: def

Re: [web2py] Re: Online classes

2013-12-20 Thread António Ramos
i downloaded the w2p file and got that error. I git cloned the repo and copied the app to my web2py path. Works! 2013/12/20 Johann Spies > How did you download it? > > > Johann > > > On 19 December 2013 23:39, António Ramos wrote: > >> I get error >> unable to install application notifier >>

[web2py] Re: hide error messages is returning NONE value for messages

2013-12-20 Thread Michel Hayek
Thanks Anthony, works great. -- *This e-mail is confidential and may also be privileged. If you are not the intended **recipient, please notify the sender immediately, delete it from your system and do **not copy, disseminate, distribute or disclose any information contained therein.* --

[web2py] Re: after_insert - database transaction?

2013-12-20 Thread Niphlod
every request is done in a cursor. every cursor by default in the dbapi spec is executed inside a transaction. Unless you do db.commit() and db.rollback() manually, every relational engine will either "save" all the modifications in a single transaction or it will rollback all of them. On Frida

[web2py] Re: after_insert - database transaction?

2013-12-20 Thread Johann Spies
Apologies - message sent prematurely. On 20 December 2013 15:18, Johann Spies wrote: > I have never used after_insert or before_insert before and the > documentation in the book does not answer enough of my questions. > > > Having the following models I want to create an invoice and record some

[web2py] Re: response.models_to_run in web2py 2.8.2

2013-12-20 Thread Paolo Valleri
I am not able to debug it a little more but as you can see here: https://github.com/web2py/web2py/commits/master/gluon/compileapp.py a few changes have been made on how models are handled, perhaps something broken backward compatibility ? Have you already tried with 2.7.4 ? Paolo On Friday, Dec

[web2py] after_insert - database transaction?

2013-12-20 Thread Johann Spies
I have never used after_insert or before_insert before and the documentation in the book does not answer enough of my questions. Having the following models I want to create an invoice and record some of its particulars in the invoice table and then link the transactions that were invoiced to the

[web2py] Re: response.models_to_run in web2py 2.8.2

2013-12-20 Thread rochacbruno
If somebody can help ans test it there is an live app here: https://web2admin.pythonanywhere.com/admin password: 35c15f36 error: https://web2admin.pythonanywhere.com/welcome/web2admin ticket: https://web2admin.pythonanywhere.com/admin/default/ticket/welcome/177.189.155.195.2013-12-20.11-35-10.5

[web2py] response.models_to_run in web2py 2.8.2

2013-12-20 Thread rochacbruno
Hi, I use web2admin in some applications, I was running older version of web2py and them I decided to upgrade to 2.8.2 for testing. I found an issue with response.models_to_run and reported a ticket in web2admin repo: https://github.com/rif/web2admin/issues/9 web2admin uses a conditional model

[web2py] Re: Visibiity of values created in a module

2013-12-20 Thread Richard Brown
Hi Anthony, that worked thanks - although I had found this solution before and tried it without apparent success at the time. I can only assume I put it in the wrong place or there was another problem. A couple of related Scheduler questions if I may: Firstly, I have included all database access

[web2py] Re: Web2Py Pages module (basic CMS)

2013-12-20 Thread Ruud Schroen
We are still working on a plugin. But we are facing a problem regarding reserved keywords which prevents us from creating a plugin. db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all']) *check_reserved=['all'] *needs to be removed in order for it to work right now, the problem i

[web2py] Re: how can i join 3 tables and output a the all three together joined in web2py?

2013-12-20 Thread Loïc
I posted a response on SO : http://stackoverflow.com/questions/20697034/how-can-i-join-3-tables-and-output-a-the-all-three-together-joined-in-web2py/20698864#20698864 Le vendredi 20 décembre 2013 07:06:41 UTC+1, deepak sandhu a écrit : > > model: > > > # coding: utf8 > db.define_table('d