[web2py] Re: mod_rewrite problems on Apache

2013-06-10 Thread thinkwell
handler.py > > I'm not sure if this is the best solution, but it worked for me :) > > //Jon > > On Saturday, June 8, 2013 8:06:27 PM UTC+2, thinkwell wrote: >> >> Hello everyone, >> >> I'm trying to rewrite URLs because I can't install web

[web2py] mod_rewrite problems on Apache

2013-06-08 Thread thinkwell
Hello everyone, I'm trying to rewrite URLs because I can't install web2py on Apache root. I'm using web2py 2.0.9 apps on CentOS 5 & 6 servers. I've fighting this thing for hours... I'm open to using routes.py or getting correct apache syntax. Anything to get a solution. Below is my apache file

[web2py] Re: Download the book as local app?

2012-11-29 Thread thinkwell
Thanks, Massimo, this is great! On Wednesday, November 28, 2012 2:26:19 PM UTC-5, Massimo Di Pierro wrote: > > Yes. Install web2py and then install the book from > https://github.com/mdipierro/web2py-book > > it is just a web2py app. > > On Wednesday, 28 November 2012 05:45:39 UTC-6, Thomas Wimme

[web2py] Re: Migrating from CGI Script

2012-09-22 Thread thinkwell
say "the view is ok, but request.post_vars is empty". If you built > a view in web2py, and it's tied to that controller, it's impossible that > the view can "see" something that the controller "isn't seeing". > > On Saturday, Septem

[web2py] Re: Migrating from CGI Script

2012-09-22 Thread thinkwell
nd > you wanted web2py only to catch the submitted part ? > > request.post_vars include every value (hidden or not) that the controller > receives. if in response.post_vars there's no "submit_ip", than it's > probably your "outside" form that has somethi

[web2py] Re: Migrating from CGI Script

2012-09-21 Thread thinkwell
One more question - here's how I redid the controller because I need these values for hidden fields in the web2py form. def submit_site(): site = request.post_vars.submit_url ip = request.post_vars.submit_ip However, that only results in values of None. Why can't I use request.post_vars

[web2py] Re: Migrating from CGI Script

2012-09-20 Thread thinkwell
Hah! There they are. I guess I need to do some more reading on the request attributes. Thanks Niphlod. On Thursday, September 20, 2012 8:03:20 PM UTC-4, Niphlod wrote: > > have you tried simply printing request.post_vars in submit_site() and see > what it does contain? > > --

[web2py] Migrating from CGI Script

2012-09-20 Thread thinkwell
I'm migrating a CGI script file to Web2py and I need to be able to receive form posts from another page because the CGI script received a form posted from a webserver that *cannot *be migrated to Web2py, unfortunately. Here's the form section: https://web2pyserver/reporter/blockpage/submit_site

[web2py] Re: Deploying as RPM

2012-09-10 Thread thinkwell
For an update here. I was able to go with two very simple spec files since I use puppet for the cron jobs, apache config files, etc and I simply made two RPMs, one of stock web2py and one of my application with my app listing web2py as a dependency. What you're discussing, LightDot, sounds inte

[web2py] Deploying as RPM

2012-08-28 Thread thinkwell
Hello everyone, The report feature I've been toiling over is now finished - YEA! and ready to be to deployed to the /opt/www/web2py directory of the various machines. This is a task for puppet, which we use for config & package management as it handles RPMs and custom repos extremely well, so t

Re: [web2py] NameError one way. 404 NOT FOUND the other...

2012-08-20 Thread thinkwell
18, 2012 6:14:51 PM UTC-4, Marin Pranjić wrote: > > If you set run parameters to: > -a password > You will not get gui popup > > On Aug 18, 2012 9:56 PM, "thinkwell" > > wrote: > > I've set web2py.py as debug file, but it's irritating to have

Re: [web2py] NameError one way. 404 NOT FOUND the other...

2012-08-18 Thread thinkwell
I've set web2py.py as debug file, but it's irritating to have the gui pop open all the time. Also, the TK server window refuses to close after I stop debugging, so after a time there's this proliferation of server windows. :-| I've just included the lines below in each file, which helps autoc

[web2py] Re: NameError one way. 404 NOT FOUND the other...

2012-08-18 Thread thinkwell
The path to report_email.txt is applications/saplogger/views/report_email.txt and the script I'm running is in applications/saplogger. Why I'm getting the 404 in the shell is baffling. Regarding context & environment, this report will be called from cron, and the email module will be imported i

[web2py] NameError one way. 404 NOT FOUND the other...

2012-08-18 Thread thinkwell
Hello everyone, I'm working on emailing a message and I'm having some unexpected issues. Here is my code based on the web2py book: from gluon.tools import Mail from report_vars import * report_month = '7-2012' mail = Mail() mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = o

[web2py] Re: KeyError on pyfpdf

2012-07-18 Thread thinkwell
Thanks everybody for your assistance; I'm rethinking my approach here. I'd thought generating a PDF from html would make formatting quick & easy as well as flexible to output to a webpage. But since the PDF for printing is the primary need, perhaps using PDF cells is the way to go. Thanks, Mar

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
t; http://www.getallfix.com/2011/11/convert-empxpt-and-in-css/ > > On Monday, July 16, 2012 1:08:13 PM UTC-7, thinkwell wrote: >> >> Well, me again. I decided that I wanted to use points as measurements >> instead of percentages, so now it barfs with an AttributeError.

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
Well, me again. I decided that I wanted to use points as measurements instead of percentages, so now it barfs with an AttributeError. from gluon.contrib.pyfpdf import FPDF, HTMLMixin from gluon.html import * pets = TABLE(_width="720pt") pets.append(TR(TH('Dogs', _width="72pt", _align="left")

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
be a Windows-only method.)* So now, things are operational again. Looking forward to Mariano's html.py improvements. On Sunday, July 15, 2012 3:04:04 PM UTC-4, Mariano Reingart wrote: > > On Sat, Jul 14, 2012 at 5:06 PM, thinkwell wrote: > > Hello everyone, > > > > I

[web2py] KeyError on pyfpdf

2012-07-14 Thread thinkwell
Hello everyone, I'm experimenting with pyfpdf with HTML formatting, but it's not going so well. Is a bit buggy. For example, this code generates a KeyError: 'width'. {from gluon.contrib.pyfpdf import FPDF, HTMLMixin from gluon.html import * header = HEAD('html2pdf', _align='center') pets = TA

Re: [web2py] Is web2py the right tool for a report project?

2012-06-14 Thread thinkwell
Yea! response.render is the function that I was looking for. The web2py book says: Almost all of its components are built from scratch and are designed to work together, but they function just as well outside of the complete web2py framework. For example, or the template language can be us

[web2py] Is web2py the right tool for a report project?

2012-06-13 Thread thinkwell
I'm rewriting a python report script that processes CSV files and emails the reports on a monthly basis (triggered from system cron). My python script basically does the following: 1. Parse CSV data. 2. Write html report and save to archive directory on server. 3. Email report as attachment to