[web2py] working with views or stored procedures.

2010-06-12 Thread Sky
I need to display data from a VIEW ( not table) of database. can any one help me ? i used dein_table, am i correct ? db.define_table("vwparts_inetflowbase", SQLField("pyear", "string"), SQLField("pmonth", "string"), SQLField("pday", "string"), SQLField("phour", "string"),

[web2py] database locked SQLITE

2010-06-12 Thread dbb
Help resolving this issue, the database keeps locking, the trace is : Traceback (most recent call last): File "C:\web2pyy\gluon\restricted.py", line 173, in restricted exec ccode in environment File "C:/web2pyy/applications/ET/models/db.py", line 58, in db.vho.import_from_csv_file(ope

[web2py] Re: widgets

2010-06-12 Thread Iceberg
On Jun12, 12:47pm, leone wrote: > I coded a widget to use with a Field object. > Because I need some javascript actions i wrote pure html-javascript > code that my widget returns. > It runs, but when I accept the form values are in request.vars, but > not in form.vars. > How can i store values in

[web2py] Re: widgets

2010-06-12 Thread mr.freeze
Here are some examples that may help: http://www.web2pyslices.com/main/default/search?query=7&criteria=category As Iceberg says, your widget must have the proper attributes to be accepted by form.accepts. I like to render the field using the default widget then modify it. This way I know it has t

[web2py] Re: widgets

2010-06-12 Thread Iceberg
On Jun12, 12:47pm, leone wrote: > I coded a widget to use with a Field object. > Because I need some javascript actions i wrote pure html-javascript > code that my widget returns. > It runs, but when I accept the form values are in request.vars, but > not in form.vars. > How can i store values in

[web2py] Re: widgets

2010-06-12 Thread Iceberg
On Jun12, 12:47pm, leone wrote: > I coded a widget to use with a Field object. > Because I need some javascript actions i wrote pure html-javascript > code that my widget returns. > It runs, but when I accept the form values are in request.vars, but > not in form.vars. > How can i store values in

[web2py] Re: upgrade rocket error with ssl

2010-06-12 Thread The Czar
Some additional information: running python-2.5,2 and web2py 1.78.3 has exactly the same problem. On Jun 12, 10:38 am, The Czar wrote: > Duh. Sorry - it is the source on FreeBSD > > On Jun 12, 8:04 am, mdipierro wrote: > > > did you upgrade the source or binary version? windows or mac? > > > On

[web2py] Re: upgrade rocket error with ssl

2010-06-12 Thread The Czar
Some additional information. I used a vanilla source of 1.79.2 and the same error is reported. By vanilla I mean an unzipped source distribution into an empty directory and attempted to start the server with the same command line. gluon/main.py @ line 622 throws the same error On Jun 12, 10:38 am

[web2py] Re: Internal error

2010-06-12 Thread Cory Coager
It seems to be failing on the model. I can't seem to get any DAL working. If I do a simple hello world test it works fine. If I add in a model like sqlite or postgresql, it gives "Internal error". Whats going on here?

[web2py] difference between rows.json() and gluon.serializers.json(rows)

2010-06-12 Thread NickFranceschina
if I have a records collection (of type Rows) from a select() call through the DAL... why is the output different between these two versions of json conversion? >>> records.json() '[{"description": "my description", "created_by": 1, "id": 1, "created_on": "2010-06-06 23:21:52", "name": "my name"}

[web2py] Re: upload file -- lot of file in one directory

2010-06-12 Thread szimszon
No because you can specify the location of uploaded material so it can be on any filesystem, and uploadseparate work under uploadfolder to... On jún. 12, 21:57, weheh wrote: > One more question -- doesn't this eliminate the need for > Field(...uploadfolder=pathname,...)? I suppose keeping the > u

[web2py] Re: upload file -- lot of file in one directory

2010-06-12 Thread weheh
One more question -- doesn't this eliminate the need for Field(...uploadfolder=pathname,...)? I suppose keeping the uploadfolder parameter is a good thing to keep for anyone who wants to use it for their own special purpose. But if the issue is about storing a gazillion upload files for efficient r

[web2py] Re: upload file -- lot of file in one directory

2010-06-12 Thread weheh
OK, now that I've read thru szimson's code closely I think this is an excellent general solution. It eliminates the need for what I used to do, which was to add a user_id layer. The only additional thought I have is that it might be nice to have a way to specify which filesystem to store on, in cas

[web2py] Re: upload file -- lot of file in one directory

2010-06-12 Thread weheh
I also came to the same conclusion that 2 chars, each in the range [0-9][a-z][A-Z], is probably sufficient. On Jun 10, 1:54 am, szimszon wrote: > Patch sent with >   /./ in use where > self.uploadseparate == 2 :) > > On jún. 9, 22:11, mdipierro wrote: > > > I suggest a subfolder for every table.

[web2py] Re: No module named PIL

2010-06-12 Thread Kenneth
You were correct Yarko, from command line I was using python 2.4.3 and web2py used python 2.5.1. So I installed PIL again now for python 2.5 and now it is working. Thank You. Kenneth On 12 kesä, 16:19, Yarko Tymciurak wrote: > On Jun 12, 6:27 am, Kenneth wrote: > > > Thank you Richard for th

[web2py] Re: upgrade rocket error with ssl

2010-06-12 Thread The Czar
Duh. Sorry - it is the source on FreeBSD On Jun 12, 8:04 am, mdipierro wrote: > did you upgrade the source or binary version? windows or mac? > > On Jun 12, 9:36 am, The Czar wrote: > > > I just upgraded from 1.76 to 1.79.2 using the built-in upgrade > > feature. Attempting to start the server w

[web2py] Re: Internal error

2010-06-12 Thread Cory Coager
I'm using python 2.4 on a shared host. I installed hashlib, uuid, pysqlite, psycopg2, MySQL-python, PyGreSQL. I'm using web2py with mod_python with my htaccess as follows: SetHandler python-program PythonHandler web2py_modpython PythonDebug On PythonPath "sys.path + ['', '/path/to/w2env/lib/pyth

[web2py] Re: upgrade rocket error with ssl

2010-06-12 Thread mdipierro
did you upgrade the source or binary version? windows or mac? On Jun 12, 9:36 am, The Czar wrote: > I just upgraded from 1.76 to 1.79.2 using the built-in upgrade > feature. Attempting to start the server with SSL yields the following > error. Any ideas on what's happening here? BTW - the gluon c

[web2py] Re: fresh from http://code.google.com/p/web2py/

2010-06-12 Thread mdipierro
This was a ug in trunk was fixed yesrterday On Jun 12, 3:47 am, szimszon wrote: > Same > as:http://groups.google.com/group/web2py/browse_frm/thread/d0d6de082de4f... > > On jún. 11, 15:45, mdipierro wrote: > > > somewhere you have > > > orderby='table.field'|'table.field' > > >  instead of > > >

[web2py] upgrade rocket error with ssl

2010-06-12 Thread The Czar
I just upgraded from 1.76 to 1.79.2 using the built-in upgrade feature. Attempting to start the server with SSL yields the following error. Any ideas on what's happening here? BTW - the gluon code looks redundant - am I missing something? Thanks in advance. here is the startup info: python we

[web2py] Re: No module named PIL

2010-06-12 Thread Yarko Tymciurak
On Jun 12, 6:27 am, Kenneth wrote: > Thank you Richard for the fast reply, > > I tested with python and "from PIL import Image" and the only result > was a new line, so I´m guess python finds PIL but not web2py. Kenneth - This means your two Python environments are different. If you installed

[web2py] Re: No module named PIL

2010-06-12 Thread Kenneth
Thank you Richard for the fast reply, I tested with python and "from PIL import Image" and the only result was a new line, so I´m guess python finds PIL but not web2py. Kenneth On Jun 12, 1:59 pm, Richard wrote: > you likely installed PIL from source into a directory not in your > Python path

[web2py] Re: No module named PIL

2010-06-12 Thread Richard
you likely installed PIL from source into a directory not in your Python path. >From the command line you can use PIL with: $ python >>> from PIL import Image On Jun 12, 8:50 pm, Kenneth wrote: > Hello, > > I´m trying to create thumbnails from images uploaded to my > application. I´ve found a c

[web2py] No module named PIL

2010-06-12 Thread Kenneth
Hello, I´m trying to create thumbnails from images uploaded to my application. I´ve found a couple of ways to do this but I need PIL to get things to work. I installed PIL from source and some extra libraries (jpeg, freetype). But I still get error "No module named PIL". I´m 99% sure this is not

[web2py] Re: Uploading files

2010-06-12 Thread Kenneth
Thank You Massimo now I got it to work,

[web2py] kpx cms issue fix

2010-06-12 Thread molhokwai
Hello, Found an issue in kpax cms and implemented a quick fix: Issue: In /kpax/controllers/access.py redirect method called with an array instead of a string: line 47: if ch: redirect(request.vars.forward) Fix: line 47: if ch: redirect(request.vars.forward[0]) Voilà. Thanks a lot for web2py and

[web2py] Re: fresh from http://code.google.com/p/web2py/

2010-06-12 Thread szimszon
Same as: http://groups.google.com/group/web2py/browse_frm/thread/d0d6de082de4fe54# On jún. 11, 15:45, mdipierro wrote: > somewhere you have > > orderby='table.field'|'table.field' > >  instead of > > orderby=db.table.field|db.table.field > > On Jun 11, 7:25 am, szimszon wrote: > > > validators.