Re: [web2py] March 4 Lab 8

2014-03-04 Thread Calvin Morrison
I am so glad I am not taking intro to programming ever again. I hate string manipulation! Massimo - you might want to resend this to your actual students Calvin On 4 March 2014 14:20, Massimo Di Pierro massimo.dipie...@gmail.com wrote: During lab today you will begin writing the solutions

Re: [web2py] trying to help young son learn Python, and...

2014-03-04 Thread Calvin Morrison
Hi, http://web2py.com/books/default/chapter/29/13/deployment-recipes this page offers different deployment recipes for hosting like PythonAnywhere. If your host (i am unfamiliar with go-daddy) provides you root/shell access to a linux box, you shouldn't have any trouble. I am Running my web2py

Re: [web2py] Best practices for using mercurial within web2py

2014-02-21 Thread Calvin Morrison
Also, relatedly, I was trying to restart apache from within a web2py app. That was giving me errors, so I'm doing something else. Is there a way to do this? you can do it from the shell. Look up your relevant distro information on init scripts. usually it's something like sudo service

Re: [web2py] Using Homemade task queues

2014-01-30 Thread Calvin Morrison
Look at the scheduler documentation. I have mine called this way from my db.py. This calls a few different tasks, adding file size and also calling a task called unzip / untar which are functions i have written to handle zipping and unzipping. Hopefully this explains it somewhat def

[web2py] Slow response

2014-01-27 Thread Calvin Morrison
Hi guys, I have a fairly typical web2py application I am trying to deploy with a standard CentOS 6 configuration using Apache and MySQL. What seems to be bugging me right now is that the responses are very slow, around .7 seconds to load the home page. I have a feeling this is because of my

[web2py] CentOS install notes

2014-01-27 Thread Calvin Morrison
I've been having trouble with centOS getting a 503 Service unavailable using Apache's httpd. If anyone else is seeing this same problem, I found that this solved my problem: adding this to my main httpd.conf: WSGISocketPrefix /var/run/wsgi -- Resources: - http://web2py.com -

Re: [web2py] Printing statements from Python

2014-01-26 Thread Calvin Morrison
A ghetto way: just open a file and use regular write commands On Jan 26, 2014 1:30 PM, horridohobbyist horrido.hobb...@gmail.com wrote: I'm looking for a simple way to print out statements in Python. I understand the 'print' function outputs to the console on the server side, but once web2py

Re: [web2py] Re: Writing Web2Py specification and finding free lance Web2Py coders

2014-01-13 Thread Calvin Morrison
elance.com? On 11 January 2014 23:04, Simon Ashley gregs...@gregsier.com.au wrote: Often thought that it would be good to push this to another level. We have projects from time to time that would be good to outsource, if people were interested. Something like a project post board, with

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-09 Thread Calvin Morrison
Brando, Thanks for working this out! it would be good to make a web2py slice or add it to the documentation/ examples Calvin On 8 January 2014 14:35, Brando bhe...@trustcc.com wrote: This works, added the requires statement for form validation: def submit(): import datetime form =

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
I just wrote my own way to do it yesterday which worked great. I would love it to go upstream. It's just a standard file upload with the multiple attribute. here's the entire thing: it spits out a form. my db looks like this: db.define_table('uploads', Field('username', 'string'),

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
. On Wednesday, January 8, 2014 7:18:28 AM UTC-8, Calvin Morrison wrote: I just wrote my own way to do it yesterday which worked great. I would love it to go upstream. It's just a standard file upload with the multiple attribute. here's the entire thing: it spits out a form. my db looks

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
it to the local disk? On Wednesday, January 8, 2014 7:18:28 AM UTC-8, Calvin Morrison wrote: I just wrote my own way to do it yesterday which worked great. I would love it to go upstream. It's just a standard file upload with the multiple attribute. here's the entire thing: it spits out

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
Yes I am getting that same problem here. Like I said, I don't really know how to properly test if the variable has been set. Any input from more wise web2pyers would be great Calvin On 8 January 2014 14:03, Brando bhe...@trustcc.com wrote: Calvin, I'm getting this error when I select only 1

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Calvin Morrison
that'd be a Jquery thing. jQuery(input#fileid).change(function () { alert(jQuery(this).val()) }); On 8 January 2014 14:36, Brando bhe...@trustcc.com wrote: Question, how could I make it so I don't have to click the submit button. How could i make it to where they choose the files and

Re: [web2py] Re: custom widgets

2014-01-07 Thread Calvin Morrison
great thanks! On 7 January 2014 15:18, Anthony abasta...@gmail.com wrote: 1. Where should I put my custom widget logic? Right now i have it grossely stored in my db.py You can always put it in a module file and import it. 2. Can i pass more information to my widget other than field,

[web2py] require based on another field.

2014-01-02 Thread Calvin Morrison
Hi! I have a field called Job Type, and another field database that depends on the type. If the user selects Train for Job Type, they don't need to enter a database (a integer id), but i don't know how to make validators do this for me. Right now I have this: db.jobs.db.requires =

Re: [web2py] Re: save upload filename in database

2013-12-31 Thread Calvin Morrison
Here is my solution! if hasattr(request.vars['up_file'],filename): form.vars.filename = request.vars['up_file'].filename if form.process().accepted: redirect(URL('data', 'index')) elif form.errors: response.flash = form has errors On 28 December 2013 17:08, Calvin Morrison

Re: [web2py] Re: save upload filename in database

2013-12-28 Thread Calvin Morrison
=[IS_NOT_EMPTY(), IS_UPLOAD_FILENAME(extension=ext_regex)]), You can submit a form that does not upload a file into up_file? On Thursday, 26 December 2013 13:21:35 UTC-6, Calvin Morrison wrote: I'm following the documentation trying to figure out how to correctly save a filename to my uploads

[web2py] Re: save upload filename in database

2013-12-28 Thread Calvin Morrison
('up_file', 'upload', uploadseparate=True, requires =[IS_NOT_EMPTY(), IS_UPLOAD_FILENAME(extension=ext_regex)]), You can submit a form that does not upload a file into up_file? On Thursday, 26 December 2013 13:21:35 UTC-6, Calvin Morrison wrote: I'm following the documentation trying to figure

[web2py] save upload filename in database

2013-12-27 Thread Calvin Morrison
I'm following the documentation trying to figure out how to correctly save a filename to my uploads database. Basically i have the same code as the website shows in it's examples def submit(): import datetime form = SQLFORM(db.uploads, fields=['up_file', notes], deletable=True)