[web2py] Re: widgets

2010-06-13 Thread leone
Thank for your suggest. I am amazed because my code SQLFORM contains two fields, only one with widget that i made. Observing the result html page code there is no evident difference between two fields. Correct id and correct name, but only one exists in form.vars. I thougth that every input tag exi

[web2py] Re: widgets

2010-06-13 Thread leone
I used your suggest, without success. My code: form = SQLFORM.factory ( Field('test1','string', widget=mywidget, default='...'), Field('test2','string', widget=mywidget, default='...'), ) def mywidget(field, value): _id = '%s_%s' % (field._table

[web2py] PIL to change images on the fly...

2010-06-13 Thread Jason Brower
I want to use PIL to change images to be smaller so they render faster, I could do it like this where they are entered into a database and uploaded, but I have up to 8 different sizes to work with,and with a constantly changing design, it would be difficult to make the database changes as well. Thi

[web2py] Re: flot related help

2010-06-13 Thread dbb
Thanks, it helps On Jun 9, 4:36 pm, mdipierro wrote: > Although this does not usesflot, it can give an idea. > > http://web2py.com/appliances/default/show/12 > > On Jun 9, 3:20 pm, dbb wrote: > > > Hello: > >  I am trying to useflotto draw a graph by reading the data from the > > database > >  

[web2py] Re: upgrade rocket error with ssl

2010-06-13 Thread The Czar
Problem solved. Python 2.5 does not include an ssl module and I guess openssl isn't good enough. I had to download the ssl 1.15 package from the python website and manually build & install it. The server now executes as expected. On Jun 12, 4:47 pm, The Czar wrote: > Some additional information:

[web2py] Re: upgrade rocket error with ssl

2010-06-13 Thread The Czar
Problem solved. Python 2.5 does not include an ssl module and I guess openssl isn't good enough. I had to download the ssl 1.15 package from the python website and manually build & install it. The server now executes as expected. On Jun 12, 8:04 am, mdipierro wrote: > did you upgrade the source o

[web2py] Multiple domains one web2py installation.

2010-06-13 Thread annet
I posted the following question at WebFaction: One of my customers asked me whether it would be possible to have his domain centralfit.nl reference a page within my web2py app. Is this simply a matter of adding the domain centralfit.nl to the Control Panel, and creating a website that references t

[web2py] Internationalization of invalidators' error_message

2010-06-13 Thread dlin
I don't understand why not the invalidators' error_message only use English. eg. class IS_NOT_EMPTY(Validator): def __init__(self, error_message='enter a value', empty_regex=None): why not class IS_NOT_EMPTY(Validator): def __init__(self, error_message=T('enter a value'), empty_regex=None

[web2py] Multiple domains one web2py installation.

2010-06-13 Thread annet
I posted the following question at WebFaction: One of my customers asked me whether it would be possible to have his domain centralfit.nl reference a page within my web2py app. Is this simply a matter of adding the domain centralfit.nl to the Control Panel, and creating a website that references t

[web2py] Re: Multiple domains one web2py installation.

2010-06-13 Thread annet
To add to the confusion: On my follow up question: So, I would need an installation of web2py for every customer who would like to have his domain reference a function within my application? And this also holds true, if I'd install an application for that customer within web2py? I received this

[web2py] Re: widgets

2010-06-13 Thread mr.freeze
Can you show me the html that is produced by your widget and the html produced by default? On Jun 13, 3:27 am, leone wrote: > I used your suggest, without success. > My code: > > form = SQLFORM.factory ( >                 Field('test1','string', widget=mywidget, > default='...'), >              

Re: [web2py] Re: Multiple domains one web2py installation.

2010-06-13 Thread Vasile Ermicioi
please take a look if that is what you need http://groups.google.com/group/web2py/browse_thread/thread/fac136d7e1120166/b9a4f8eb744e29cb notes: - I also use webfaction - webfaction application is a different thing than a web2py application

[web2py] Re: Multiple domains one web2py installation.

2010-06-13 Thread annet
Hi Vasile, > please take a look if that is what you > needhttp://groups.google.com/group/web2py/browse_thread/thread/fac136d7e1... Thanks for pointing me in the right direction. I'll give it a try and let you know if it works. > - webfaction application is a different thing than a web2py appli

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

2010-06-13 Thread weheh
Aha! So then could you write the following: import random Field('filename','upload', uploadfolder=['c:/web2py/myapp/uploads','d:/extrastorage/myapp/ uploads'][random.randint(0,1)], uploadseparate=2, ) and expect the files to be uniformly distributed across 2 filesystems? That (or its equiva

[web2py] Re: Multiple domains one web2py installation.

2010-06-13 Thread Yarko Tymciurak
On Jun 13, 9:51 am, annet wrote: > Hi Vasile, > > > please take a look if that is what you > > needhttp://groups.google.com/group/web2py/browse_thread/thread/fac136d7e1... > > Thanks for pointing me in the right direction. I'll give it a try and > let you know if it works. > > > - webfaction app

[web2py] Select the most recent entry from multiple tables

2010-06-13 Thread Giuseppe Luca Scrofani
Hi all, it is possible to make a query to the db and sort the elements of multiple tables by date? I will try to be more specific with an example, I have this controller, the structure of the model should be evident: def index(): # This is the index controller dataset_one = db().select(db.da

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

2010-06-13 Thread NickFranceschina
anyone? On Jun 12, 4:52 pm, NickFranceschina wrote: > 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 ofjsonconversion? > > >>> records.json() > > '[{"description": "my description", "created_by": 1,

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

2010-06-13 Thread Yarko Tymciurak
On Jun 13, 1:00 pm, NickFranceschina wrote: > anyone? > > On Jun 12, 4:52 pm, NickFranceschina > wrote: > > > > > 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 ofjsonconversion? > > > >>> reco

[web2py] import of web2py modules very complicated

2010-06-13 Thread pierreth
I found that importing modules in Web2py seems to be very complex: http://web2py.com/book/default/section/4/18 I have a module in 'modules' and I do 'import modules.my_module' to import the module in my application. This is working fine with Eclipse Pydev because I have setup the Python path for

Re: [web2py] import of web2py modules very complicated

2010-06-13 Thread Jonathan Lundell
On Jun 13, 2010, at 4:46 PM, pierreth wrote: > I found that importing modules in Web2py seems to be very complex: > > http://web2py.com/book/default/section/4/18 > > I have a module in 'modules' and I do 'import modules.my_module' to > import the module in my application. > > This is working fi

[web2py] Unable to connect to mysql DB - sql.py mod

2010-06-13 Thread The Czar
For some reason, attempted connection to a mysql v4.1.25 db on FreeBSD fails. The web2py is the latest version - but it happened on earlier versions also. The error & db.py for the application failing looks like this: Error traceback Traceback (most recent call last): File "/m/content/www/data/

[web2py] Insert current datetime in layout.html

2010-06-13 Thread Giuseppe Luca Scrofani
Hi, how I can insert in a page not served by a controller (think layout.html in the welcome application) current day and month? I've tested something like this {{import datetime; datetime.datetime.now()}} but even if this worked it will be horrible (import datetime every single page load...)

[web2py] Multiple form submission - is doc wrong?

2010-06-13 Thread weheh
I have a multiple form submission with a custom form. #controller form1=SQLFORM.factory(db.table,...) form2=SQLFORM.factory(db.table,...) ... if form1.accepts(request.vars,formname='form1',onvalidation=xyz): ... do something ... if form2.accepts(request.vars,formname='form2',onvalidation=xyz):

[web2py] Re: Internal error

2010-06-13 Thread howesc
Hi Cory, it's very hard to tell from the info so far. good that you have narrowed it down to a DB issue. have you checked the error files that web2py produces to see what is in there? those "tickets" are often quite helpful. (excuse me if you already checked) my best guess though is that

[web2py] Re: PIL to change images on the fly...

2010-06-13 Thread howesc
create a function for serving images, and add the sizes as parameters: http://mysite.com/applciation/images/download/foo.png/ 300/400" /> and in the function do the resize and output the binary data of the image. i'm not 100% sure of the best way to do it out side of google app engine (because

[web2py] Re: Internal error

2010-06-13 Thread Cory Coager
Here is the error when using SQLite: Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted exec ccode in environment File "/path/to/applications/test/models/db.py", line 15, in ? db = DAL('sqlite://storage.sqlite') File "gluon/sql.py", line 3855, in DAL raise Runt

[web2py] Re: Internal error

2010-06-13 Thread Cory Coager
Here is the error when using PostGreSQL: Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted exec ccode in environment File "/path/to/applications/test/models/db.py", line 17, in ? db=SQLDB('postgres://user:p...@localhost:5432/database') File "gluon/sql.py", line

[web2py] Re: Internal error

2010-06-13 Thread Cory Coager
I did end up getting it working with MySQL although I would have preferred PostGreSQL.

[web2py] Re: python 2.4 support

2010-06-13 Thread Cory Coager
I found some compatibility problems with web2py 1.79.2 and python 2.4.3. The syntax in gluon/tools.py doesn't appear to work in this version of python so I made to make some modifications to get it working. Here is a diff: 2838,2841c2838,2839 < if not refsearch: <

[web2py] Re: python 2.4 support

2010-06-13 Thread Cory Coager
Found another problem with the welcome application. When attempting to register an account I get this error: Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted exec ccode in environment File "/path/to/applications/welcome/controllers/default.py", line 57, in ?

[web2py] Re: python 2.4 support

2010-06-13 Thread Cory Coager
Another problem is, I can't launch from the cli because the rocket module doesn't work with python 2.4: -bash-3.2$ python web2py.py -i 127.0.0.1 -p 8001 -a 'password' sh: ifconfig: command not found WARNING:root:unable to import Rocket web2py Enterprise Web Framework Created by Massimo Di Pierro,

[web2py] Re: import of web2py modules very complicated

2010-06-13 Thread pierreth
On 13 juin, 17:54, Jonathan Lundell wrote: > Try local_import instead of import (same manual page). OK :-) I needed that to fix the warning of Pydev. Now I use a template like that at beginning of mvc files: # Fake the imports needed by the static code analyzer. if False: import gluon.langu

[web2py] Re: working with views or stored procedures.

2010-06-13 Thread Sky
seems DAL does not support views, yes ? On Jun 13, 10:57 am, Sky wrote: > 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("pmont

[web2py] Struggling with file upload ... yet again :(

2010-06-13 Thread weheh
I'm using the latest trunk stuff with the new uploadseparate capability. # model db.define_table('book', Field('filename','upload',autodelete=True, uploadseparate=2, requires=( IS_UPLOAD_FILENAME(extension='pdf|txt|doc'), IS_LENGTH(500,10)) ) #controller form=SQLFORM.factory(db.

[web2py] Unused key variable

2010-06-13 Thread pierreth
How can I fix the 2 unused 'key' variable warning I have with Pydev in web2py/applications/web2pyfun/controllers/appadmin.py? I mean could someone fix it in the web2py code? It is the only warnings I have from web2py.

[web2py] sqlite modeller

2010-06-13 Thread nhisyam
Hi everyone, I am looking for the link for a webpage which allow users to draft/ draw database model which then can be exported as sqlite file. I have clicked the link few times (long time ago) which was available from web2py website. However now I couldn't find it anywhere. I totally forgot the n

[web2py] Re: Multiple form submission - is doc wrong?

2010-06-13 Thread Kimmo
Your input element has a comma in between 'name' and 'value' attributes. I don't think it belongs there. On Jun 14, 2:50 am, weheh wrote: > I have a multiple form submission with a custom form. > > #controller > form1=SQLFORM.factory(db.table,...) > form2=SQLFORM.factory(db.table,...) > ... > if

[web2py] Re: sqlite modeller

2010-06-13 Thread Yarko Tymciurak
The generic www sql modeler is: http://code.google.com/p/wwwsqldesigner/ Not sure if anyone has been tracking this, but the code does have web2py (and sqlite) generation in the source tree. - Yarko On Jun 13, 9:13 pm, nhisyam wrote: > Hi everyone, > > I am looking for the link for a webpage wh

[web2py] Re: Struggling with file upload ... yet again :(

2010-06-13 Thread szimszon
uploadseparate could be only True or False but that is not the problem here... I uploaded files only through forms and did't use store function expicitly... On jún. 14, 05:56, weheh wrote: > I'm using the latest trunk stuff with the new uploadseparate > capability. > > # model > db.define_table('

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

2010-06-13 Thread szimszon
No the uploadfolder can have only one value c:/web2py/myapp/uploads or d:/extrastorage/myapp/uploads... uploadseparate can have only True or False. ... uploadfolder='c:/web2py/myapp/uploads', uploadseparate=True ... than you have c:/web2py/myapp/uploads/.//... On jún. 13, 17:33, weheh wro

Re: [web2py] Re: PIL to change images on the fly...

2010-06-13 Thread Jason Brower
Yeah I like that approach. I just can't figure out how to make a file like object like this images from PIL to be returned and actually work. :/ Something my brain can fathom. Best Regards, Jason On Sun, 2010-06-13 at 17:37 -0700, howesc wrote: > create a function for serving images, and add th

[web2py] Re: Struggling with file upload ... yet again :(

2010-06-13 Thread weheh
You're right, uploadeseparate is True or False, but this has no impact on what I'm having trouble with. I tried this: db.book[book_id.update(filename=db.book.filename.store(request.vars.filename)) This causes the no_table.filename/8a/no_table.name.8ae28bb9335txt to attempt to be copied to bo

[web2py] Re: Multiple form submission - is doc wrong?

2010-06-13 Thread weheh
Yah, just typing here in this little box, not real cut and paste. Original code was an INPUT helper, hence the commas.

[web2py] Re: Struggling with file upload ... yet again :(

2010-06-13 Thread weheh
One more thing is that after I copy the no_table.filename file to the book.filename file, I want to delete the full path to the no_table.filename file. Is there a convenient attribute somewhere with the path to the original no_table.filename or do I have to reconstruct it myself from the no_table.f

[web2py] WebFactional restart web2py

2010-06-13 Thread Pai
Hi, total noob question here.. how do you restart web2py on webfactional? I ssh in and put in python web2py.py -z 5 it seems like it is trying to start another instance of web2py rather than trying to shut it down. Any body has any idea how shut it down and start it back up again? any help

[web2py] Re: WebFactional restart web2py

2010-06-13 Thread Yarko Tymciurak
On Jun 14, 12:42 am, Pai wrote: > Hi, > > total noob question here..   how do you restart web2py on > webfactional?  I ssh in and put in > > python web2py.py -z 5 > > it seems like it is trying to start another instance of web2py rather > than trying to shut it down.  Any body has any idea how shu

[web2py] Multiline labels for fields in SQLForm

2010-06-13 Thread Johann Spies
I would like to have multiline labels for fields in input forms. Is it possible to use SQLForm to produce that or should I do by hand using FORM? Regards Johann -- "Finally, brethren, whatsoever things are true, whatsoever things are honest, whatsoever things are just, whatsoever things are p

[web2py] Re: WebFactional restart web2py

2010-06-13 Thread Pai
ahhh thank you thank you :) I was looking for document about web2py on the webfactional site but only thing I found that that one pager! Pai On Jun 14, 12:56 am, Yarko Tymciurak wrote: > On Jun 14, 12:42 am, Pai wrote: > > > Hi, > > > total noob question here..   how do you restart web2py on >

[web2py] Re: Pycon APAC and Web2py

2010-06-13 Thread Anand Vaidya
Some quick updates: 1) The labnote book is released as an Opensource app and it can be found @ http://cynote.sourceforge.net/ They are actually using the app as a digital journal 2) Met zoom quiet :-) 3) I did a lightning talk on web2py and demo'd just enough web2py. Heard later from some attend

[web2py] Re: Struggling with file upload ... yet again :(

2010-06-13 Thread weheh
So I'm back to filename=db.book.filename.store(request.vars.filename.file,request.vars.filename.filename). Now it runs without errors, the destination file is properly created, but it's contents are blank.

[web2py] Re: Multiline labels for fields in SQLForm

2010-06-13 Thread weheh
I believe you ought to be able to do that by setting labels in your models and possibly using the XML() helper to encapsulate the labels that have BR() in them. On Jun 14, 2:14 am, Johann Spies wrote: > I would like to have multiline labels for fields in input forms.  Is > it possible to use SQLF