[web2py] Re: Adding a new table to web2py with a reference field to an established table and getting error

2016-03-18 Thread Heather Dawe
Hi Anthony, Many thanks for this. A complete noobie error - sorry to waste your time but I really appreciate your help. It was the error message that threw me! Best wishes, Heather On Thursday, 17 March 2016 15:55:17 UTC, Anthony wrote: > > You are missing a comma: > > Field('ReportInstanceIndi

Re: [web2py] issue when import from one web2py module into another

2016-03-18 Thread Richard Vézina
Don't know why it doesn't nothing special from my side... On Thu, Mar 17, 2016 at 2:59 PM, Leonel Câmara wrote: > from other_module import function > > should work too > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source

[web2py] Re: web2pyslices unsuable

2016-03-18 Thread rochacbruno
Hi, I just restored the website http://www.web2pyslices.com/home There was a problem with database string configuration. Or someone with admin access included the data on config database, or somebody accidentally ran the install script again replacing all the config data. The code of w2pslice

[web2py] Re: web2py type 'exceptions.AttributeError'

2016-03-18 Thread Anthony
Please post additional info as requested on SO: http://stackoverflow.com/questions/36040286/web2py-type-exceptions-attributeerror#comment59731217_36040286 Anthony On Wednesday, March 16, 2016 at 7:27:52 PM UTC-4, Nikhil Rayaprolu wrote: > ># view > #show.html > {{extend 'layout.html'

[web2py] Re: Adding a new table to web2py with a reference field to an established table and getting error

2016-03-18 Thread Anthony
You are missing a comma: Field('ReportInstanceIndicatorInstance', 'reference ReportInstanceIndicatorInstance') Python concatenates adjacent string literals delimited by whitespace, so without the comma, Python interprets: 'ReportInstanceIndicatorInstance' 'reference ReportInstanceIndicatorIns

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-18 Thread RAGHIB R
Tell me if I am wrong. 1)So inside the compressed zip folder you upload for phonegap app wrapping, you simply put the w2p file of your file inside the zipped folder. 2) we add this to the controller: @request.restful() def api(): response.view = 'generic.json' def GET(tablename,id):

Re: [web2py] Re: How to insert different grid elements in tab panels?

2016-03-18 Thread Massimiliano
Try to give a each grid a uniq formname: SQLFORM.grid(db.post, formname=‘grid_post’) SQLFORM.grid(db.post, formname=‘grid_comments’) On Wed, Mar 16, 2016 at 1:25 AM, Ron Chatterjee wrote: > Basically, I go to panel one and "view" the grid element. And if I click > on "back" button it takes me

[web2py] Re: Couple of questions about improving performance in models

2016-03-18 Thread Anthony
On Friday, March 18, 2016 at 1:19:40 PM UTC-4, Lisandro wrote: > > > Now, the part that I'm worried about is this: *inside the same model, I > store each record in a variable*, like this: > > db.define_table('days', Field('name'), Field('plural_name')) > > MONDAY = db.days[1] > TUESDAY = db.days[2

[web2py] Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread webmaster
Steps to replicate (3 mins): 1. Load Web2py from source off website. Copy gaehandler.py and app.yaml to /web2py. 2. In applications/welcome/models/db.py, change the DAL connection to "db = DAL('google:sql://[$project]:[$instance]/[$database]')" 3. python dev_appserver.py --hos

[web2py] DePy 2016

2016-03-18 Thread Massimo Di Pierro
http://mdp.cdm.depaul.edu/DePy2016 There are a few days left to submit a talk proposal for DePy. Talks on web2py are very much welcome. :-) Also if you plan to attend you better register sooner rather than later. last year we had to close registration well in advance. Massimo -- Resources: -

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread webmaster
2.12.2 is definitely not broken, since that's what I've been using live on GAE for about six months. (www.trytha.com) I did the precise steps I outline above while I was preparing the post. Not much to it, and it started working again as soon as I replaced the new /pydal with the old. I've b

[web2py] Re: Using MySQL in GAE locally (is it actually possible?)

2016-03-18 Thread Massimo Di Pierro
To my knowledge is was broken in 2.12 not in 2.13. I had tested it. Will test it again. On Friday, 18 March 2016 14:45:28 UTC-5, webmas...@trytha.com wrote: > > I narrowed the problem to pydal. I could get things to work in web2py > 2.12.2, but in 2.13.4, something has changed which makes GAE n

[web2py] web2py slices again

2016-03-18 Thread Massimo Di Pierro
I really want to know who did the upgrade on web2py slices that broke. We need to know because we want to know what changes were made in order to make sure it is fully recovered. Apparently multiple people had admin access. That access will be revoked. Please step forward. Privately if you want

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread Massimo Di Pierro
gae on 2.12.2 was broken. It is no broken in current stable and trunk. On Friday, 18 March 2016 15:55:21 UTC-5, webmas...@trytha.com wrote: > > Steps to replicate (3 mins): > > >1. Load Web2py from source off website. Copy gaehandler.py and >app.yaml to /web2py. >2. In applications

[web2py] Re: URL parsing in controller

2016-03-18 Thread webmaster
Booya! I'm still learning web2py/python myself and that felt a lot like the type of thing I might have had trouble with. ;) Hit the "answered" button so anyone who searches for this in the future will see the solution. On Friday, March 18, 2016 at 5:16:13 PM UTC-7, Jeff Riley wrote: > > Thank

[web2py] Re: URL parsing in controller

2016-03-18 Thread Dave S
On Friday, March 18, 2016 at 1:18:23 PM UTC-7, webm...@trytha.com wrote: > > Maybe something about "args=request.args(2,5)"? > > He's trying to do a slice, but that would be [2:5], innit? > You could try to test this: > > args=[request.args(2),request.args(5)] > > > shouldn't those '(' and ')

[web2py] Re: response.render not using the right view

2016-03-18 Thread Anthony
The problem is you are passing a URL as the first argument to response.render, but it takes the path to a view (it assumes a root path under the application's /views folder, so you only need to give the path from that point). Anthony On Friday, March 18, 2016 at 2:21:31 PM UTC-4, Jacob Thoenne

[web2py] sqlite database files corrupted?

2016-03-18 Thread P Page-McCaw
I have a pretty simple web2py application that inputs information about academic seminars and then displays the seminar notices on our departmental home page. It is called, creatively, SeminarCalendar. This is hosted by pythonanywhere. It has all of 4 tables. 3 of which have 3 fields or fewer.

[web2py] Re: modal not work when upload form field have the data

2016-03-18 Thread 黄祥
thanks all, i've tried both but got unexpected result (no error occured) *- iframe* : the other modal is loaded too status loading ... (because i have a modal that have a modal on it (modal raw material have another modal name modal category) ) *code* views/transaction_purchase/purchase_order_for

Re: [web2py] issue when import from one web2py module into another

2016-03-18 Thread Richard Vézina
import module_name Then module_name.function works fine... Richard On Thu, Mar 17, 2016 at 2:48 PM, Richard wrote: > Hello, > > Is there any thing to consider when trying to import from one module to > another? > > I try import a specific fonction like so : > > from other_module import funct

[web2py] Re: Using MySQL in GAE locally (is it actually possible?)

2016-03-18 Thread webmaster
I narrowed the problem to pydal. I could get things to work in web2py 2.12.2, but in 2.13.4, something has changed which makes GAE no longer work for me. That appears to be the source of my problem. But web2py is supposed to be backwards compatible, so. Just did a test. Whatever broke h

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-18 Thread webmaster
All done on an Ubuntu Server 14.04 VM running on an OSX El Capitan host. On Friday, March 18, 2016 at 3:42:34 PM UTC-7, webm...@trytha.com wrote: > > 2.12.2 is definitely not broken, since that's what I've been using live on > GAE for about six months. (www.trytha.com) > > I did the precise step

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-18 Thread Leonel Câmara
I usually just create a REST API returning JSON as is very well documented in the book and then just call it from the phonegap/cordova application using ajax (for instance you can include jquery in your phonegap application and it has getJSON which works very well for this). Then I make a regul

[web2py] Upload locations in web2py_ckeditor plugin

2016-03-18 Thread David Orme
Hi, I've installed the web2py_ckeditor plugin from: https://github.com/timrichardson/web2py_ckeditor4/releases I think this will working really nicely for providing a table of simple blog posts, but I'd like to control where uploaded files get stored. I had a look at the source and it seemed li

[web2py] Re: URL parsing in controller

2016-03-18 Thread Jeff Riley
Ah you are totally correct. The controller is default and manage_customers is the function. I am still getting used to these constructs. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] Re: Reportlab add image to pdf

2016-03-18 Thread Winter Kryz
I tried the os.path.join but didn't work. Can someone help me with this, please? -- 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 messag

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-18 Thread RGB
So you don't edit your web2py app anywhere. Instead, you just write REST API inside index.html of the compressed zip that is used to upload for the phonegap app. Is it? Can you show the index.html you have used for any of your app? On Friday, March 18, 2016 at 10:10:56 PM UTC+5:30, Leonel Câmara

[web2py] URL parsing in controller

2016-03-18 Thread Jeff Riley
Hello All, I am pulling my hair out. I am trying to redirect the view button on a smartgrid. I can get the button to redirect to the view I want, but I cannot parse the URL correctly to get the correct sheet id. Here is my controller @auth.requires_membership('manager') def manage_customers(

[web2py] Re: Reportlab add image to pdf

2016-03-18 Thread Edwood
The error message suggests the script cannot find the image in that folder. Using pyFPDF this is how I will build the path using "os.path.join": os.path.join(request.folder,'static/images', 'logounca.png') On Friday, March 18, 2016 at 8:53:11 PM UTC-4, Winter Kryz wrote: > > I tried the os.