[web2py] Re: Error creating tables on a MySQL database on DotCloud?

2012-01-02 Thread Thomas Dall'Agnese
Actually, I just tried on FluxFlex and it doesn't work neither! I have the same error if I use the MySQL database (provided by FluxFlex) but it works using SQLite. The project is open source, available here: https://github.com/ThomasDalla/FansubCheck_web2py/tree/master/public_html/applications/f

[web2py] Re: How can I access HTTP Headers?

2012-01-02 Thread James M.
I looked into those two suggestions, the header doesn't seem to be available. I am starting to think that custom headers aren't passed to web2py... On Jan 2, 9:26 pm, Anthony wrote: > I think the 'Your-Header' header should be accessible via: > > request.env.http_your_header > > or > > request.w

[web2py] Re: How can I access HTTP Headers?

2012-01-02 Thread James M.
I am using twilio. When twilio posts to the url I supplied, they sign the request with a customer HTTP header X-Twilio-Signature, which I can use to validate that it is actually twilio making the request. On Jan 2, 9:17 pm, lyn2py wrote: > What headers are you specifically looking for that are n

[web2py] Re: how to integrate web2py with existing static website

2012-01-02 Thread Massimo Di Pierro
You can do at the level of the web server. If you are using rocket only... create an app called dummy and put the static side under dummy/static create a routes.py that says: routes_in = [('.*:http://domain.com:GET /$anything','/dummy/static/ $anything')] it will map any ($anything) GET request

[web2py] Re: How can I access HTTP Headers?

2012-01-02 Thread Anthony
I think the 'Your-Header' header should be accessible via: request.env.http_your_header or request.wsgi.environ.HTTP_YOUR_HEADER Anthony On Monday, January 2, 2012 11:31:49 PM UTC-5, James M. wrote: > > I need to get a request header that is being sent with an http post. > I thought I could a

[web2py] Re: How can I access HTTP Headers?

2012-01-02 Thread lyn2py
What headers are you specifically looking for that are not available? Have you looked under request.env, e.g. request.env.http_referer (and other headers like http_host, http_user_agent)? On Jan 3, 12:31 pm, "James M." wrote: > I need to get a request header that is being sent with an http post

[web2py] How can I access HTTP Headers?

2012-01-02 Thread James M.
I need to get a request header that is being sent with an http post. I thought I could access it with something like: request.headers['HTTP_SOME_HEADER'] but it doesn't work... I looked at all request attributes and don't see the headers. Any idea how to get it?

[web2py] Re: dropbox python api

2012-01-02 Thread Massimo Di Pierro
Only dropbox On Jan 2, 7:38 pm, Joseph Jude wrote: > To use this do you need APIs both from dropbox & janrain? > > Thank you, > Joseph

[web2py] Re: How can I reduce shell memory usage?

2012-01-02 Thread Massimo Di Pierro
I remind you web2py/scripts/make_min_web2py.py which makes web2py much smaller by eliminating rarely used module that consume lots of space. I am not sure about the impact on Ram but the impact on Disk space is significative. Massimo On Jan 2, 3:04 pm, Michael Ellis wrote: > Found some advice

[web2py] how to integrate web2py with existing static website

2012-01-02 Thread Plumo
hello, I have an existing static website (generated by jekyll): domain.com domain.com/blog and then I have some web2py apps served under sub-domains: sales.domain.com contact.domain.com For various reasons I want the web2py apps served alongside the static part under sub-directories: domain.

[web2py] Re: Deployment problem on dotcloud with PostgreSQL

2012-01-02 Thread Jérôme Petazzoni
Hi Thomas, web2py used to work fine on dotCloud. I remember writing the web2py tutorial 1 year ago :-) The tutorial needs to be updated, since the CLI has evolved significantly since then. Anyway! If I remember well, when trying some web2py apps, I had the following issues: - a lot of apps defi

[web2py] Re: processing user input

2012-01-02 Thread Anthony
You can use the 'onvalidation' callback: http://web2py.com/books/default/chapter/29/7#onvalidation form.process(..., onvalidation=my_form_calculation) You can also define a custom validator for the field to calculate and return the transformed value -- see http://web2py.com/books/default/chapt

[web2py] Re: csv conflict in model

2012-01-02 Thread Anthony
Hmm, maybe we shouldn't have a function with the same name as a Python standard lib module. For, now, you could also do: import csv as stdlib_csv stdlib_csv.reader(...) or from csv import reader reader(...) Anthony On Monday, January 2, 2012 8:18:33 PM UTC-5, Plumo wrote: > > I get an error w

[web2py] Re: compute field error

2012-01-02 Thread Plumo
thanks - problem solved

[web2py] Re: processing user input

2012-01-02 Thread lyn2py
To access the form values, use: if form.process().accepted: value = form.vars.some_field If you will be changing the values inserted, use: if form.process(dbio=false).accepted: form.vars.some_field = modify(form.vars.some_field) #but you will need to insert data into the db yourself

[web2py] Re: dropbox python api

2012-01-02 Thread Joseph Jude
To use this do you need APIs both from dropbox & janrain? Thank you, Joseph

[web2py] csv conflict in model

2012-01-02 Thread Plumo
I get an error when trying to parse CSV data in my model: for row in csv.reader(open(sample_file)): AttributeError: 'function' object has no attribute 'reader' It seems the problem is that appadmin.py has a csv() function that overrides the csv import in my model. I tried renaming this function

[web2py] Re: processing user input

2012-01-02 Thread Adrian Edwards
to expand on this a bit, I tried to put the calculations before the if form.process().accepted: but I haven't been able to figure out how to access the value entered by the user. So this may just be as simple as accessing something like form.custom.widget.value Adrian. On Jan 2, 7:35 pm, Adria

[web2py] processing user input

2012-01-02 Thread Adrian Edwards
Hello all, I have a page where a user enters in some data, and then some calculations need to occur before the data is put into the database. Right now I have form = SQLFORM(db.entries, entry) and whatever the user enters is successfully put into db.entries. So now I want to do the calculation

[web2py] Re: Reading lines from uploaded SQLFORM.factory file

2012-01-02 Thread Alan Etkin
Uploadfolder sets a custom folder instead of app/uploads. The function parameters are available at API docs: http://web2py.com/examples/static/epydoc/web2py.gluon.dal.Field-class.html On 2 ene, 18:34, Jim Steil wrote: > found the solution. > > in the code below, change line > > importfile = requ

[web2py] Re: Web2Py Blob Upload/Download Samples for GAE?

2012-01-02 Thread Alan Etkin
There is an example of file upload with blob in the book: 13.4.5 Uploading files in database This thread is about GAE file threshold http://groups.google.com/group/web2py/browse_thread/thread/3f941a16d512d3e/08e3f88869e122ee?lnk=gst&q=gae+uploads#08e3f88869e122ee For download of files there is a

[web2py] Web2Py Blob Upload/Download Samples for GAE?

2012-01-02 Thread Gerard
Hi everyone, I've written python code running in appengine using their webapp framework. I'm trying to figure out how to upload blobs. Does anyone know of a tutorial or sample online of a web2py controller that uploads a blob? Thanks.

Re: [web2py] Reading lines from uploaded SQLFORM.factory file

2012-01-02 Thread Jim Steil
found the solution. in the code below, change line importfile = request.vars.importFile.file to importfile = request.vars.importFile.value Still don't know why I need the uploadfolder, but this solved my main issue. -Jim On 1/2/2012 12:39 PM, Jim Steil wrote: Hi I have an upload fiel

[web2py] Re: How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
Found some advice from Massimo in another thread. After adding try: _junk = db except NameError: _w2pdir = "/Users/mellis/web2py/" sys.path.append(_w2pdir) from gluon import DAL db = DAL("sqlite://storage.sqlite", folder = _w2pdir + "applications/welcome/database

[web2py] Re: redirecting python console output to web browser page

2012-01-02 Thread Paolo Caruccio
There is another HTML5 technology to push stream from server to client : EventSource aka Sent-Server Events (http://dev.w3.org/html5/eventsource/). Its behaviour is like ajax long polling. I'm - just now - experimenting a simple mechanism to send to clients a message when the database changes. P

[web2py] Re: How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
Thanks Ross,  that sounds like a good approach.  I do something analogous in my app.   All my scripts live in the app/modules/ directory.  My app is a remote monitoring system running on a Foxconn NetTop under Linux Mint 10.   There is a web2py http interface used for installation and configuration

[web2py] Reading lines from uploaded SQLFORM.factory file

2012-01-02 Thread Jim Steil
Hi I have an upload field defined in a SQLFORM.factory form as follows: def wasptime(): from reports.payroll import wasptime response.title = 'WASPTime Payroll Import Conversion' form = SQLFORM.factory( Field('importFile', 'upload', label='WASPTime File',

[web2py] Re: How can I reduce shell memory usage?

2012-01-02 Thread Ross Peoples
Mike, I haven't done any profiling on it, but I've had a lot of success using the multiprocessing library, importing the DAL, and using it directly without using the rest of the web2py environment. I usually accomplish this by creating a module (not model) and spinning off the other processes f

[web2py] How can I reduce shell memory usage?

2012-01-02 Thread Michael Ellis
I have an application that uses multiple instances of web2py shells for long running data acquisition and analysis. Having multiple independent processes is working really, really well but I'd like to reduce the total memory footprint in each of them. I'm not finding much in the way of really g

[web2py] Re: Print a page, best practice?

2012-01-02 Thread Anthony
Something like this using CSS media queries might help: http://blog.lysender.com/2009/01/printing-a-page-without-showing-it/ Anthony On Monday, January 2, 2012 12:02:23 PM UTC-5, Falk wrote: > > Hi, > > I'm pretty new to web2py, I picked it beq I needed to get something up > running pretty fast

[web2py] Re: Procedurally add images?

2012-01-02 Thread vapirix
Beautiful. Thanks, Massimo. Once again proving why this is the best framework to get things accomplished with. =) On Jan 2, 11:25 am, Massimo Di Pierro wrote: > Given > > db.define_table('image',Field('file','upload')) > > You can do: > > import glob > for filename in glob.glob('*.png'): >     db

[web2py] Re: Procedurally add images?

2012-01-02 Thread Massimo Di Pierro
Given db.define_table('image',Field('file','upload')) You can do: import glob for filename in glob.glob('*.png'): db.image.insert(file=db.image.file.store(open(filename,'rb'))) On Jan 2, 10:55 am, vapirix wrote: > I know I can step through my database and add url paths to all of my > da

[web2py] Print a page, best practice?

2012-01-02 Thread Falk
Hi, I'm pretty new to web2py, I picked it beq I needed to get something up running pretty fast. And it seemed really nice with a good balance with framework and freedom :) I have searched the groups and not really come up with anything that seems to fit. I'm creating a simple ticketsystem to a

[web2py] Re: Architecture question: can I use Web2py template engine to generate emails?

2012-01-02 Thread Peter O
I am glad that I found this answer, after printing all the intermediary variables for a couple of hours. Is this considered a Gotcha, or better be documented if it is the design? :)

[web2py] Procedurally add images?

2012-01-02 Thread vapirix
I know I can step through my database and add url paths to all of my database entries, but is there a way to have web2py process every image as an upload (since it's an upload field), and properly store in the uploads folder for sake of consistency? It would be a lot better than a year from now fig

[web2py] Re: redirecting python console output to web browser page

2012-01-02 Thread Ross Peoples
Yes, you can, though it's much more difficult to stream it live to a web page. You would need to use JavaScript (comet or polling) to get the output as it is generated and display it in the browser. There are many ways to do this, but it's not the simplest thing in the world. Off the top of my

Re: [web2py] Re: web2py with twitter bootstrap - very clean interface ...

2012-01-02 Thread Bruno Rocha
On Mon, Jan 2, 2012 at 11:25 AM, Vikas Singhal wrote: > Any news on integrating it in web2py? > I am waiting the final 2.0 version to update it -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Re: Cannot get janrain to work

2012-01-02 Thread jc
Thank you so much. It was driving me mad. Now it works.

Re: [web2py] Re: web2py with twitter bootstrap - very clean interface ...

2012-01-02 Thread Vikas Singhal
Any news on integrating it in web2py?

[web2py] Re: MARKMIN clarification

2012-01-02 Thread Massimo Di Pierro
I agree with you something is wrong... and needs fixing. On Jan 2, 7:26 am, lyn2py wrote: > I double-checked... there are no extra spaces after the dashes. > > I tried on a new post, this is the produced HTML: > here's some blockquote: > this is a message > for first parathis is a message > for s

Re: [web2py] Re: Happy new year

2012-01-02 Thread Randolph Chaves
Feliz Año Nuevo (from Melo, Uruguay) On Mon, Jan 2, 2012 at 9:47 AM, Albert Abril wrote: > M'encanta aquesta comunitat. > Feliç any 2012 a tot el món! > > 2012/1/2 Rahul > >> Nutan Nav-varsha che sarvanna Abhinandan! >> >> >> >> On Jan 2, 4:27 pm, guruyaya wrote: >> > Sahna Tova Umetuka! >> >

Re: [web2py] Re: utf-8 and pyfpdf

2012-01-02 Thread José Luis Redrejo Rodríguez
Hi Martin, I'm using this in the controller, without any problem: # coding: utf8 ... from gluon.contrib.pyfpdf.pdflabels import PDFLabel import sys reload(sys) sys.setdefaultencoding( "latin-1" ) ... def label_parejas(): ...             text="%s\n%s\n%s %s\n%s" % (nombre

[web2py] Re: MARKMIN clarification

2012-01-02 Thread lyn2py
I double-checked... there are no extra spaces after the dashes. I tried on a new post, this is the produced HTML: here's some blockquote: this is a message for first parathis is a message for second parathis is a message for third para here's some blockquote: -- this is a message for first par

Re: [web2py] Re: Happy new year

2012-01-02 Thread Albert Abril
M'encanta aquesta comunitat. Feliç any 2012 a tot el món! 2012/1/2 Rahul > Nutan Nav-varsha che sarvanna Abhinandan! > > > > On Jan 2, 4:27 pm, guruyaya wrote: > > Sahna Tova Umetuka! > > > > On Jan 2, 12:01 pm, Martín Mulone wrote: > > > > > > > > > > > > > > > > > late but happy new year! >

[web2py] Re: Happy new year

2012-01-02 Thread Rahul
Nutan Nav-varsha che sarvanna Abhinandan! On Jan 2, 4:27 pm, guruyaya wrote: > Sahna Tova Umetuka! > > On Jan 2, 12:01 pm, Martín Mulone wrote: > > > > > > > > > late but happy new year! > > > 2012/1/1 Massimo Di Pierro > > > > Happy new year everybody! > > > -- > >  http://martin.tecnodoc.co

[web2py] Re: Happy new year

2012-01-02 Thread guruyaya
Sahna Tova Umetuka! On Jan 2, 12:01 pm, Martín Mulone wrote: > late but happy new year! > > 2012/1/1 Massimo Di Pierro > > > Happy new year everybody! > > -- >  http://martin.tecnodoc.com.ar

[web2py] Re: EMails and PGP

2012-01-02 Thread szimszon
Can't say for sure but here are some links: http://sourceforge.net/projects/pyme/files/pyme/pyme-0.8.1/ http://sourceforge.net/projects/pyme/files/pyme/pyme-0.8.1/pygpgme-0.8.1.win32.exe/download http://pyme.sourceforge.net/

Re: [web2py] Happy new year

2012-01-02 Thread Martín Mulone
late but happy new year! 2012/1/1 Massimo Di Pierro > Happy new year everybody! -- http://martin.tecnodoc.com.ar