[web2py] Unable to insert data into sqllite database

2012-06-09 Thread rahulserver
Hi! I have the following table in my model: db.define_table('Transaction_Master',Field('Account',db.Account_Master,requires=IS_IN_DB(db,'Account_Master.id', '%(Account)s %(State)s',zero=T('choose

[web2py] Re: Replacing template engine

2012-06-09 Thread kirpit
Actually not, if you don't want your designers to run pure python and sandbox their templates. On Saturday, June 9, 2012 2:02:51 PM UTC+10, pbreit wrote: Using Jinja2 in Web2py seems like a very bad idea unless 1) you have lots of content already in Jinja2 or 2) you are doing it purely as an

[web2py] Re: windows users... help!

2012-06-09 Thread blye
Brilliant! Thanks to the leaders at the web2py banquet for so quick response viva web2py! On Friday, 8 June 2012 18:43:20 UTC+2, Massimo Di Pierro wrote: We have a new nightly build using python 2.7 (thanks Niphlod). We need help testing that it is backward compatible. Massimo On Friday,

Re: [web2py] Fluxflex will be shut down and no longer available on June 30, 2012

2012-06-09 Thread Andrew
If you're in need of a scalable hosting solution you could always use openshift as well. See my thread where I provide the template to get started (all the wsgi stuff is figured out). Openshift provides up to 3 free gears and includes built-in hosting of mongodb, postgresql, mysql and many

[web2py] static expire headers

2012-06-09 Thread Niphlod
hello everybody... For w2p_tvseries I'd like to set an expire header for banners etc. Usually my apps where behind a real webserver, so with rewrite rules one can always intercept /static/ requests and don't pass them along to web2py. For w2p_tvseries, though, I think that for the 70% of the

[web2py] Help! Changed Password and now I get errors

2012-06-09 Thread Brad Miller
Hi, Here's what happened. I'm hosting a web2py application on webfaction (http://interactivepython.org) This morning, after some maintenance I had tested everything and all was good. Pages were working login/logout was working, database access was working perfectly. Then, because I

[web2py] Re: Unable to insert data into sqllite database

2012-06-09 Thread Massimo Di Pierro
I just tried this and it works fine with me. I only had to change the compute field: Field('Amt_Outstanding',compute=lambda r: (r.Net_Due or 0)-(r.Amt_Paid or 0)) to avoid errors when Net_Due or Amt_Paid are blank. What web2py or python version do you use? I suspect something else is

Re: [web2py] Fluxflex will be shut down and no longer available on June 30, 2012

2012-06-09 Thread Massimo Di Pierro
Can you post a link to the web2py template? On Saturday, 9 June 2012 08:02:56 UTC-5, Andrew wrote: If you're in need of a scalable hosting solution you could always use openshift as well. See my thread where I provide the template to get started (all the wsgi stuff is figured out).

[web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Massimo Di Pierro
You can change password outside of admin but need to hash it first. How did you change it? On Saturday, 9 June 2012 09:22:02 UTC-5, Brad Miller wrote: Hi, Here's what happened. I'm hosting a web2py application on webfaction ( http://interactivepython.org) This morning, after some

[web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Brad Miller
webfaction has a control panel, and I used their control panel to change the password. It was the same mechanism I used to set up the database in the first place. The only difference, of course, is that when I first set it up there were not any tables. I don't know what they do behind the

Re: [web2py] Web2Py on OpenShift

2012-06-09 Thread Jon Molesa
Thank you for this! As soon as I heard about OpenShift I signed up for an account. Immediately I decided I wanted to run web2py apps there. I don't have the time to figure it out though. Thank you for sharing what you have working. GAE didn't completely satisfy me. FluxFlex was buggy and

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Jonathan Lundell
On Jun 9, 2012, at 7:48 AM, Brad Miller wrote: webfaction has a control panel, and I used their control panel to change the password. It was the same mechanism I used to set up the database in the first place. The only difference, of course, is that when I first set it up there were not

Re: [web2py] windows users... help!

2012-06-09 Thread Mariano Reingart
I'm missing something? C:\Users\Mariano\Downloads\web2py_win27\web2pyweb2py.exe Traceback (most recent call last): File c:\Python27\lib\site-packages\py2exe\boot_common.py, line 92, in modul e import linecache zipimport.ZipImportError: can't find module 'linecache' Traceback (most recent

[web2py] Re: Cron problems

2012-06-09 Thread Jan Rozhon
Hi, any update on this topic? I am just facing that same issue, Thanks Michael for writing down a workaround. Jan. Dne středa, 23. května 2012 16:21:02 UTC+2 Massimo Di Pierro napsal(a): Please open a ticket about this. cron was not designed to do this but there is no reason it cannot do

Re: [web2py] Fluxflex will be shut down and no longer available on June 30, 2012

2012-06-09 Thread Andrew
Sure, it's here: https://github.com/prelegalwonder/openshift_web2py I've posted more details in a previous thread called Web2py on OpenShift and there are also significant details in the README.MD on the github project. Let me know if you see need for clarification or changes anywhere. On

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Brad Miller
Thanks Jonathan, I did not realize that migrate could be anything other than True or False! I did some experimenting on my development application as follows: I changed settings.migrate = 'devdb' then in the databases directory I renamed all the *.table files so that the old hash value was

[web2py] web2py hosting

2012-06-09 Thread Massimo Di Pierro
It would be great if somebody where to make a simple good looking web site (even a static one) linking instructions to setup web2py on the various cloud platforms (openshift, webfaction, etc.).

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Jonathan Lundell
On Jun 9, 2012, at 8:55 AM, Brad Miller wrote: Thanks Jonathan, I did not realize that migrate could be anything other than True or False! I did some experimenting on my development application as follows: I changed settings.migrate = 'devdb' then in the databases directory I

Re: [web2py] windows users... help!

2012-06-09 Thread Massimo Di Pierro
Thanks for help testing. Will release another version later today. On Saturday, 9 June 2012 10:45:36 UTC-5, Mariano Reingart wrote: I'm missing something? C:\Users\Mariano\Downloads\web2py_win27\web2pyweb2py.exe Traceback (most recent call last): File

[web2py] Re: Cron problems

2012-06-09 Thread Massimo Di Pierro
In trunk now. On Saturday, 9 June 2012 10:46:27 UTC-5, Jan Rozhon wrote: Hi, any update on this topic? I am just facing that same issue, Thanks Michael for writing down a workaround. Jan. Dne středa, 23. května 2012 16:21:02 UTC+2 Massimo Di Pierro napsal(a): Please open a ticket about

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Jonathan Lundell
On Jun 9, 2012, at 8:55 AM, Brad Miller wrote: Thanks Jonathan, I did not realize that migrate could be anything other than True or False! I did some experimenting on my development application as follows: I changed settings.migrate = 'devdb' then in the databases directory I

Re: [web2py] windows users... help!

2012-06-09 Thread Massimo Di Pierro
Can you please try again? On Saturday, 9 June 2012 10:45:36 UTC-5, Mariano Reingart wrote: I'm missing something? C:\Users\Mariano\Downloads\web2py_win27\web2pyweb2py.exe Traceback (most recent call last): File c:\Python27\lib\site-packages\py2exe\boot_common.py, line 92, in modul

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Brad Miller
in my define tables I use migrate = settings.migrate -- This made sense to me when I looked at migration as a global setting. But I understand now that its not a global setting its a filename specification for each file where True just means to use the hash of the connection string... So, I

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Jonathan Lundell
On Jun 9, 2012, at 9:49 AM, Brad Miller wrote: in my define tables I use migrate = settings.migrate -- This made sense to me when I looked at migration as a global setting. But I understand now that its not a global setting its a filename specification for each file where True just means

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Bruce Wade
I have ran into this problem serveral times when the password changes in the connection string. All you have to do: db = DAL('...', fake_migrate=True) auth.define_tables(fake_migrate=True) This will recreate all the HASH in the databases folder and not change your database. Once you run the code

[web2py] getting nested attributes with cas_auth.py

2012-06-09 Thread Tim Korb
I'm using gluon/contrib/login_methods/cas_auth.py to authenticate against our campus CAS server. Our server returns most of the interesting values nested within a single cas:attributes node, which is not parsed by cas_auth.py. I modified cas_auth.py (starting around line 110) to pull all

[web2py] web2py hosting

2012-06-09 Thread Andrew
Does the official web2py site have a wiki where community members can create / contribute things like this? I'd be happy to put something up for openshift but I don't know anything about the other offerings at this time.

Re: [web2py] Re: Help! Changed Password and now I get errors

2012-06-09 Thread Brad Miller
Well, this appears to mostly work at least using sqlite3 1. change table definitions to use migrate='myprefix_tablename.table' 2. change auth.define_tables(migrate='myprefix_') 3. make backup of databases 4. rename all longhashvalue_table.table to myprefix_table.table 5. change db.py to have

[web2py] Re: upgrading eCardsOnMap to API V3

2012-06-09 Thread Ashraf Mansour
Thanks On Saturday, June 9, 2012 2:23:12 AM UTC+3, puercoespin wrote: Maybe: (function () { window.onload=function(){ var myOptions = { center: new google.maps.LatLng(-34.397, 150.644 ), zoom: 15, mapTypeId:

Re: [web2py] Re: Symbolic links in the applications directory...

2012-06-09 Thread Doug Philips
On Sat, Jun 9, 2012 at 12:01 AM, pbreit pbreitenb...@gmail.com wrote: Hard to say how URL rewriting would affect all this. Maybe I don't understand what you are doing or trying to do. Isn't a matter of effecting this, it is a matter of presenting one application under several names, which, I

[web2py] Re: How can I have static files outside of static directory?

2012-06-09 Thread Carl
It'd be nice that it wouldn't matter but tech often like that. Web2py treats files differently based upon location (see e manual's section on Web2py's static directory). GWT sees its root and all files below and nothing above. And if I stick a GWT HTML file outside of static then Web2py

[web2py] Specify pdf name in appreport plugin

2012-06-09 Thread Jarrod
I have successfully used Lucas D'Avila's very helpful appreport pluginhttps://github.com/lucasdavila/web2py-appreportto make pdf's of invoices generated by my site. However I can't seem to figure out how to specify the name that the pdf should be downloaded as. I am generating the pdf by

Re: [web2py] Re: Not open source yet... but

2012-06-09 Thread tonton
hie im looking at the source code... i think i have most of the infrastructure in place... but to start log2db.py i run into the following error.. Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 205, in restricted exec ccode in environment

Re: [web2py] Re: How can I have static files outside of static directory?

2012-06-09 Thread Christian Foster Howes
ok, then can you use your webserver to handle the static file handling rather than web2py? that sounds like your best bet given your restrictions. cfh On 6/9/12 15:20 , Carl wrote: It'd be nice that it wouldn't matter but tech often like that. Web2py treats files differently based upon

[web2py] Re: Specify pdf name in appreport plugin

2012-06-09 Thread Niphlod
is the document, i.e. this function, returning a stream of bytes representing the pdf ? If so, you're a few steps away Browsers get the name of the file from the Content-disposition header, e.g. Content-disposition : attachment; filename=thedocument.pdf will allow the browser to download

[web2py] Re: Specify pdf name in appreport plugin

2012-06-09 Thread Niphlod
whoops.2 typos... response.headers instead of response.header and response.headers['Content-Type']='application/pdf' instead of headers['Content-Type']='application/pdf' Il giorno domenica 10 giugno 2012 02:10:54 UTC+2, Niphlod ha scritto: is the document, i.e. this function,

[web2py] Re: static expire headers

2012-06-09 Thread Anthony
1) move static files to uploads, tune up the standard download function and add an expire header there 2) create another supersmall app without models, only one controller serving images with response.stream and adding the expire header 1 is bad because modules will be reloaded each time

[web2py] Re: static expire headers

2012-06-09 Thread Niphlod
yes, I meant models do you mean something like models/00.py with in that def servstatic(): ... return response.stream(file) ? so, having a model return will skip all models and controller/function execution ?

Re: [web2py] web2py hosting

2012-06-09 Thread Bruno Rocha
http://www.web2pyslices.com are open to post anything related to web2py. also it is open source and open to modifications (if someone want to include wiki features) *Bruno Cezar Rocha* http://www.CursoDePython.com.br [image: Facebook] http://facebook.com/rochacbruno [image:

[web2py] Remote admin of sqlite - through ssh

2012-06-09 Thread wdtatenh
I'm using sqlite for my database on a data intensive website that I want to push up very soon. I understand I need to go through ssh to administer things remotely. I definitely need to be able to administer groups and assign membership remotely via ssh. But will my changes show up if I make

[web2py] Remote admin of sqlite - through ssh

2012-06-09 Thread pbreit
Schema changes made directly to the db will *not* be reflected in your web2py app. Best to edit your models and migrate. Data edits will work fine (except possibly if you violate and validations). I don't have much of an opinion on the matter but some folks may advise against SQLite as a

Re: [web2py] Re: Not open source yet... but

2012-06-09 Thread Massimo Di Pierro
This (T('Index'),URL('index').xml()==URL().xml(),URL('index'),[]), should be (T('Index'),URL('index')==URL(),URL('index'),[]), On Saturday, 9 June 2012 15:57:02 UTC-5, tonton wrote: hie im looking at the source code... i think i have most of the infrastructure in place... but to start

[web2py] Re: static expire headers

2012-06-09 Thread Massimo Di Pierro
I model can stop the control flow of execution with raise HTTP() not with return On Saturday, 9 June 2012 19:46:13 UTC-5, Niphlod wrote: yes, I meant models do you mean something like models/00.py with in that def servstatic(): ... return response.stream(file) ?

Re: [web2py] Re: Symbolic links in the applications directory...

2012-06-09 Thread pbreit
Hmmm...I still don't totally understand what you are trying to do and what your setup looks like.

[web2py] Re: static expire headers

2012-06-09 Thread Anthony
No, you can't return from a model, but you can raise an HTTP exception to abort the models and return immediately -- something like: import os if request.controller == 'w2pstatic': filepath = os.path.join(request.env.applications_parent, 'applications',