[web2py] Multiple instances of an application-- shared controllers & views; different database

2012-06-21 Thread Nate Atkinson
Hi, I'm running web2py v1.99.7 behind apache 2.2 on Ubuntu 12.04. I've written an application for work. It's web2py front end to a MySQL database. I am deploying multiple instances of the application for the different branches of our company. So, one instance for the Sacramento branch, one for

[web2py] Re: Multiple instances of an application-- shared controllers & views; different database

2012-06-21 Thread Nate Atkinson
Hi, thanks It's a single instance of web2py on a single machine. There is a separate application for each branch. If doing this with links in the filesystem is the correct way, I was thinking I could write a small python script to copy what needs to be copied, link what needs to be linked, upd

[web2py] Re: web2py 2.0.2 is out

2012-10-02 Thread Nate Atkinson
I seem to have run into a backwards compatibility issue. This weekend, I did some system upgrades. I moved my web2py (1.99.7) + MySQL application off a single server running Ubuntu to two VM's running Debian stable (one VM for web2py + apache, one for MySQL). Web2py was deployed using the scrip

[web2py] Proper way to calculate/display a time delta?

2011-10-12 Thread Nate Atkinson
Hi, The company I work for places environmental measuring devices at different locations. I've designed a simple database to keep track of where we have devices. One thing that's important to us is how long a device has been on site. It's probably easiest to understand if I just paste some code.

[web2py] Re: Proper way to calculate/display a time delta?

2011-10-12 Thread Nate Atkinson
d delta each day for example... But if you don't need to filter base in > you select request base on the delta the virtual column is maybe the best > option. > > Hope it help. > > Richard > > On Wed, Oct 12, 2011 at 10:49 AM, Nate Atkinson wrote: > > > > >

[web2py] Some quick help with w2p plugin sortable

2011-10-17 Thread Nate Atkinson
Hi, I'm trying to organize several places defined in a table called db.plads into ordered routes. I'm trying to use the sortable plugin (http://web2py.com/plugins/default/sortable) to allow me to order the route. The places on the route are showing up correctly, but when I click to drag and re-or

[web2py] How to use SQLFORM.widgets.checkboxes.widget to insert multiple values to DB? Is this even the correct widget to use? The correct way to do what I want to do?

2011-10-21 Thread Nate Atkinson
es widget, 0 gets inserted instead of the id of the place on that row. 2) If I select multiple checkboxes, the form does not validate. It gives me 'value not allowed' below each checkbox. I have two questions: 1) Am I even going about this the correct way? Am I totally off base on how to implement records of payments? 2) If I am going about this the correct way, how can I insert the correct value for plads.id? How can I insert multiple values? Thanks for any help. Best regards, Nate Atkinson

[web2py] Re: Specifying Fields in Grid

2011-10-21 Thread Nate Atkinson
Have you tried including db.products.id in the fields? On Oct 21, 1:30 pm, horridohobbyist wrote: > I'm trying to specify exactly which fields to display in a grid, but I > just can't get the syntax right. And the docs are of no help. > > Here's what I tried, among other things: > > SQLFORM.grid(

[web2py] Re: How to use SQLFORM.widgets.checkboxes.widget to insert multiple values to DB? Is this even the correct widget to use? The correct way to do what I want to do?

2011-10-21 Thread Nate Atkinson
xes, but unless anyone has a solution using checkboxes, this will have to do. On Oct 21, 1:07 pm, Nate Atkinson wrote: > Hi, > > I have a question on using the checkboxes widget, and the correct way > to go about what I want to do. Here's some background: > > The company I wo

[web2py] StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Nate Atkinson
Hi, I'm trying to create a CSV view for a set of rows. Here's the code for the view: {{import StringIO, csv}} {{outfile = StringIO.StringIO()}} {{mywriter = csv.writer(outfile, dialect=csv.excel_tab)}} {{mywriter.writerow(['Name', 'Address', 'City', 'State'])}} {{for row in places:}} {{mydata = [

[web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Nate Atkinson
hat are called once, > plus three blocks of {{...}} (including pass) within your loop (resulting > in 3 blank lines per record). > > Instead, try putting all the code in a single block: > > {{ > [all code goes here] > > }} > > Anthony > > > > > > >

[web2py] Uploading a file without storing to a database?

2014-01-30 Thread Nate Atkinson
Hi, I have a question about uploading and reading text files. I'll explain a slightly simplified version of the problem and what I'm trying to do in broad details, and then explain where I'm having difficult with the code in web2py. If you're not interested in the background, skip the next two