[web2py] Re: web2py 3rd edition available in PDF from LULU.com

2010-08-23 Thread dederocks
I bought the book too, it's great. Just wish comenting highlighting were enabled so that I could bookmark, highlight, fix typos ;-) as I go along -- but there must be a reason for locking this PDF feature? BR, Andre On 21 août, 15:31, ra3don ra3do...@gmail.com wrote: The 3rd edition was

[web2py] Re: Understanding SQLFORM

2010-08-23 Thread Niphlod
+1 for the latter, I totally forgot to point also the error on form.vars @david, try the last one by mdipierro and tell us if the problem of submitting the form goes away.. Niphlod On 23 Ago, 03:28, mdipierro mdipie...@cs.depaul.edu wrote: Your code can be simplified as follows: This is

[web2py] Re: auth.settings.retrieve_password_next not being honoured

2010-08-23 Thread Adi
Help me please! :) On Aug 20, 6:38 pm, Adi aditya.sa...@gmail.com wrote: Tried both. No change. I think retrieve_password is the form where an email to reset password is sent. After sending the mail I want to go to my own controller function. On Aug 20, 4:26 pm, mdipierro

[web2py] Re: nice model, weird things

2010-08-23 Thread Niphlod
nice! It works perfectly. Sorry if that annoyed you, but I tend to implement functionality before nice representing, and the format parameter is quite always the last one in the development process. I'll try to push up that in the line of priorities ;-) Thanks again Niphlod On 23 Ago, 03:17,

[web2py] link on browser-based editor: Bespin

2010-08-23 Thread Timmie
Hello, have yoou heard about Bespin? https://bespin.mozillalabs.com/docs/userguide/index.html Maybe a good thing to add to the admin interface. What do you think? Regards.

Re: [web2py] link on browser-based editor: Bespin

2010-08-23 Thread Michele Comitini
seems very promising: +1 what everyone think? could be used for helping with this? http://groups.google.com/group/web2py/browse_thread/thread/cacb3553eea9f0a4/7bf34ec481232e8c?lnk=gstq=my+editor#7bf34ec481232e8c 2010/8/23 Timmie timmichel...@gmx-topmail.de: Hello, have yoou heard about

Re: [web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-23 Thread Michele Comitini
Hi all, I do develomplent with many different things, different languages architectures and looking for tools for managing software projects is a must for me ;-) I think the problem here is that web2py has started to receive the deserved attention by the user and developer community. Prof.

[web2py] filename length bug in sql.py under win32

2010-08-23 Thread Sw1
Hi, I posted some time ago a problem related to uploading a file with a very long filename under window ( it crashes ). I have been able to spot that the issue is in sql.py around line 2799( function store ). So the pb is related to the python interpreter under win32 that doesn't allow the

Re: [web2py] link on browser-based editor: Bespin

2010-08-23 Thread Albert Abril
@Michele Bespin is more an editor more web-oriented, the editor that you are linking (Stef Editor) is more Desktop oriented. @Timmie Bespin is a Mozilla Labs project, it is being developed for many time, maybe would be a great idea to integrate it in web2py. Bespin seems a new Vim , but

Re: [web2py] Re: Line continuation problem in new parser?

2010-08-23 Thread Michael Ellis
Probably didn't. I encountered it while trying to clean up some view code that was looking messy. I'm in favor of supporting line continuation if at all possible or, if not, at least issuing an error message to that effect. On Sun, Aug 22, 2010 at 9:14 PM, mdipierro mdipie...@cs.depaul.edu

[web2py] Re: web2py 3rd edition available in PDF from LULU.com

2010-08-23 Thread mdipierro
It was not done on purpose. They processed the PDF I provided (which I believe is unlocked). On Aug 23, 1:55 am, dederocks dediro...@gmail.com wrote: I bought the book too, it's great. Just wish comenting highlighting were enabled so that I could bookmark, highlight, fix typos ;-) as I go

[web2py] Re: auth.settings.retrieve_password_next not being honoured

2010-08-23 Thread mdipierro
One more try please: auth.settings.request_reset_password_next On Aug 23, 2:32 am, Adi aditya.sa...@gmail.com wrote: Help me please! :) On Aug 20, 6:38 pm, Adi aditya.sa...@gmail.com wrote: Tried both. No change. I think retrieve_password is the form where an email to reset password

[web2py] Re: Multiple submit not working on component

2010-08-23 Thread Miguel Lopes
As an update, the issue remains with the following combinations: * if input type='submit' and different names * if input type='button', with or without different name attributes However, input type='text' are present in form.vars. For the interested a solution for usage in components is to use

[web2py] Startup issues

2010-08-23 Thread dederocks
Hello, I'm trying to run web2py, but as I go into 'the real stuff', problems start to arise. Just so you know, I'm running python 2.7 on a windows 7 OS, using the 1.83 source code. a) I get a warning that cron is disabled because there is no file locking. Starting the app with administrative

[web2py] RFC: validator IS_NOT_IN_SET

2010-08-23 Thread Vidul Petrov
Hi all, I needed IS_NOT_IN_SET validator and added it in my custom validators.py, do you think it is useful? class IS_NOT_IN_SET(IS_IN_SET): example:: INPUT(_type='text', _name='name', requires=IS_NOT_IN_SET(['max', 'john'],zero='')) the argument of

[web2py] redirection question

2010-08-23 Thread david.waldrop
I have a basic update form code that is called via a HREF form another view and form a menu. The problem is the redirect to the referrer is not working. I looked in the forums and have tried to debug. I understand the form is posting back to itself which is why the form is redirected to itself.

[web2py] Dropdown List with Select

2010-08-23 Thread David
This seems list a simple task but I can't figure out a way to do it with Web2Py I want to have a dropdown list of services that someone can select and then be taken to the correct profile page etc I want to build this list of names dynamically from my services model. How do I pull the

[web2py] web2py minimalist version

2010-08-23 Thread Jose
I have hosting in webfaction and I am very satisfied with the service and support. Yesterday I was trying alwaysdata, which provides a free hosting alternative. The free option has some limitations, such as used disk space (10MB) and RAM (40MB). Following the tutorial [2], in a few minutes was

[web2py] Re: Multiple submit not working on component

2010-08-23 Thread mdipierro
I think this is a bug in the web2py in the form processing system. I will fix it tonight. On Aug 22, 9:54 pm, Miguel Lopes mig.e.lo...@gmail.com wrote: I'm using the same name to all input type submits technique. This is very nice because it avoids some js and works like a charm :-) In a

[web2py] Re: Startup issues

2010-08-23 Thread mdipierro
there are two issues: 1) file locking. I assume you are using windows and running from source. You need to install the Mark Hammond win32 extensions. 2) shell error Cannot operate on a closed database.. This is a known problem. Do not use the web based shell to interact with the database. Use

[web2py] Re: web2py and SEO

2010-08-23 Thread puercoespin
Sorry, but the first link don't work. Insteand, http://www.google.com/support/webmasters/ and, in help resources can found the google doc in search engine optimization. There are useful articles and videos SEO related too. Regards. On 22 ago, 14:53, puercoespin jzaragoza.puercoes...@gmail.com

[web2py] Re: SQLHTML is not defined - Autocomplete Widget

2010-08-23 Thread annet
Changing SQLHTML to SQLFORM solved the SQLHTML not defined problem. SQLFORM, however, doesn't support limitby. SQLFORM.widgets.autocomplete(request,db.plaats.plaats,limitby=(0,10),min_length=2) I am working with web2py 1.83.2. Kind regards, Annet.

Re: [web2py] Re: How to start server from within a python file ?

2010-08-23 Thread Stef Mientki
thanks Massimo, but it doesn't work by me ... On 23-08-2010 04:33, mdipierro wrote: from gluon.main import HttpServer here the problem begin, Maybe I should start with a more basic question, what should I do with the sources ? I don't see a setup file, so I just dumped the source files in

Re: [web2py] How to start server from within a python file ?

2010-08-23 Thread Stef Mientki
that's great Jason, On 23-08-2010 05:22, Jason Brower wrote: It's very nice to see you using linux. If you have any questions that are linux related please tell me and I can try to help you. :D ok here is the first problem What's the way to start the web2py server from a python script ?

Re: [web2py] How to start server from within a python file ?

2010-08-23 Thread Michele Comitini
Hi Stef, you are using device names and backslashes (they are not understood by unix the same way windows does), could be that? http://en.wikipedia.org/wiki/Filename mic and gives the following error message: Traceback (most recent call last): File D:\Data_Python_25\support\test.py, line 21,

Re: [web2py] How to start server from within a python file ?

2010-08-23 Thread Stef Mientki
thanks Mic, but that's not the problem ( I changed them in single forward slashes), the problem is the file structure of web2py, I'm definitely missing something there. cheers, Stef On 23-08-2010 21:46, Michele Comitini wrote: Hi Stef, you are using device names and backslashes (they are not

[web2py] Re: Startup issues

2010-08-23 Thread dederocks
Sorry for coming with old hats (to be included in the book?), and thanks for the quick help! On 23 août, 18:20, mdipierro mdipie...@cs.depaul.edu wrote: there are two issues: 1) file locking. I assume you are using windows and running from source. You need to install the Mark Hammond win32

[web2py] Re: IS_IMAGE() broke?

2010-08-23 Thread Joe Wakefield
I was also experiencing this issue, but found that rebuilding the database only worked until the first valid upload, after which it is broken again. In my case, I am using: Field('photo', 'upload', uploadfield='photo_data', requires=IS_IMAGE(extensions=('jpeg'))), Field('photo_data', 'blob',

Re: [web2py] Re: nice model, weird things

2010-08-23 Thread Adrian Klaver
On 08/22/2010 06:17 PM, mdipierro wrote: You did not set any validator.Validators will be set outomatically if you teach web2py how to represent records in the referenced tables: db.define_table('tablefoo', Field('foo', length=5), format='%(foo)s')

[web2py] Re: How to start server from within a python file ?

2010-08-23 Thread mdipierro
No. you either dubmp the gluon folder in site-packages site-packages/gluon or better import sys sys.path.append('location/to/web2py/') On Aug 23, 2:16 pm, Stef Mientki stef.mien...@gmail.com wrote:  thanks Massimo, but it doesn't work by me ... On 23-08-2010 04:33, mdipierro

[web2py] Re: nice model, weird things

2010-08-23 Thread mdipierro
http://web2py.com/book/default/chapter/03?search=would+be+automatic On Aug 23, 1:30 pm, Adrian Klaver adrian.kla...@gmail.com wrote: On 08/22/2010 06:17 PM, mdipierro wrote: You did not set any validator.Validators will be set outomatically if you teach web2py how to represent records in

[web2py] Re: IS_IMAGE() broke?

2010-08-23 Thread mdipierro
Something is wrong here IS_IMAGE(extensions=('jpeg')) should be IS_IMAGE(extensions=('jpeg',)) A tuple of one element must contain a comma. Not sure if that may be the cause of your problem. On Aug 23, 3:16 pm, Joe Wakefield coffeeburr...@gmail.com wrote: I was also experiencing this issue,

[web2py] Model with many to many defined across multiple database instances

2010-08-23 Thread ron_m
I have a model which has sites and servers with a many-to-many relation described by site_servers as follows: # Global table of known sites db.define_table('sites', Field('uuid', 'string', length=64, default=str(uuid.uuid4()), writable=False), Field('last_modified', 'datetime',

Re: [web2py] Re: nice model, weird things

2010-08-23 Thread Adrian Klaver
On Monday 23 August 2010 2:02:53 pm mdipierro wrote: http://web2py.com/book/default/chapter/03?search=would+be+automatic Thanks. I was looking in the wrong place, DAL and Form sections. -- Adrian Klaver adrian.kla...@gmail.com

[web2py] Re: build a row base questionnaire

2010-08-23 Thread Russell
A much more sophisticated solution Massimo! I completely missed the orderby='random' functionality. Going back to the original question, the point here is that when you have a 'normalised' table of question/answers, you need to decouple from SQLFORM (with SQLFORM.factory) and handle the db

Re: [web2py] Re: How to start server from within a python file ?

2010-08-23 Thread Stef Mientki
hi Massimo, On 23-08-2010 22:56, mdipierro wrote: No. you either dubmp the gluon folder in site-packages site-packages/gluon then it crashes on not having a version number or better import sys sys.path.append('location/to/web2py/') the program just hangs completely: import

[web2py] Re: Model with many to many defined across multiple database instances

2010-08-23 Thread ron_m
To simplify I just used standard id fields, copied the scaffold (welcome) application with create new application in admin and then in db.py changed the db line to match MySQL and created the database else: # else use a normal relational database # db =

[web2py] Re: integrate editarea in application

2010-08-23 Thread Cory Coager
I checked the manual and didn't see anything regarding TEXTAREA. Is there a way to enable the editarea editor on TEXTAREA fields? On Aug 21, 1:41 am, KMax mkostri...@gmail.com wrote: What does mean 'without going through the admin interface' ? Try search TEXTAREA in book?

[web2py] Re: ajax post before ajax reload

2010-08-23 Thread KMax
This is link to example http://web2py.ru/test Click on 'show me' then on any in link of list and update. Second update will reflect changes in first time On 23 авг, 11:52, KMax mkostri...@gmail.com wrote: ## to db.py added db.define_table('mytable',Field('myfield','string')) ##

[web2py] Re: integrate editarea in application

2010-08-23 Thread Martin.Mulone
Perhaps you are looking for widgets in controls, to extend textarea as editor. Check similar example at http://www.web2pyslices.com/main/slices/take_slice/18 On 23 ago, 20:01, Cory Coager ccoa...@gmail.com wrote: I checked the manual and didn't see anything regarding TEXTAREA.  Is there a way

[web2py] Re: How to start server from within a python file ?

2010-08-23 Thread mdipierro
It does not hang. It starts the server. The server blocks. If you want to start the server is a new thread: import os, sys, thread, time filepath = r'P:/Web2Py/web2py_src/web2py' sys.path.append ( filepath ) os.chdir ( filepath ) ## == absolutely necessary to get the version

[web2py] Re: filename length bug in sql.py under win32

2010-08-23 Thread mdipierro
This is a complex issue. The length of a filename is limited to 200 chars + extension. There is no way to limit the length of path+filename since the path depends on where web2py is installed and it outside web2py control. Even we were to limit len(filename) to 1 character, this function may

[web2py] Re: Multiple submit not working on component

2010-08-23 Thread mdipierro
well... it is a bug not not in web2py, in jQuery: http://www.johnnycode.com/blog/2010/04/08/jquery-form-serialize-doesnt-post-submit-and-button-values-duh/ We cannot fork jQuery to fix this. Eventually they will fix it. Massimo On Aug 23, 8:46 am, Miguel Lopes mig.e.lo...@gmail.com wrote: As

[web2py] crud.archive issue with unique

2010-08-23 Thread Jurgis Pralgauskis
Hello, if I have unique field in mytable. How should crud.archive deal with it? I tried setting it after mytable and mytable_archive declaration, but then it doesn't apply it to mytable... db.mytable.name.unique=True ps.: in http://web2py.com/book/default/chapter/07#Record-Versioning and in

[web2py] Re: crud.archive issue with unique

2010-08-23 Thread mdipierro
you cannot set the unique attribute after the table definition. Moreover it would be a problem with archive unless you make the archive table manually with fields that corrspond to the table to be archived but with unique=False. Massimo On Aug 23, 10:14 pm, Jurgis Pralgauskis

[web2py] Web2py and threads

2010-08-23 Thread pierreth
Hello, I would like to know how Web2py is managing threads. Is it like Java servlets where requests are mapped to servlets while one servlet object can be used by multiple threads at the same time to serve many requests? Are some users here using Jython with Web2py to get around the ugly Pyhton

[web2py] Re: My editor ...

2010-08-23 Thread Johan
Is it possible to post a free version of this _as it is_ ? Some of us my find it very useful. Or even, a version without the wysiwyg, if that's the problem.

[web2py] Re: Web2py and threads

2010-08-23 Thread mdipierro
In Java a serverlet, as far as I understand, is a class which conforms to some API that allows it to serve one http request. Each instance is executed in its own thread. The Python equivalent of the serverlet API is a WSGI application and web2py is based on WSGI, therefore the parallelization

[web2py] Re: Web2py and threads

2010-08-23 Thread mdipierro
P.S. In the end the bottle neck is ALWAYS database access. On Aug 24, 12:20 am, mdipierro mdipie...@cs.depaul.edu wrote: In Java a serverlet, as far as I understand, is a class which conforms to some API that allows it to serve one http request. Each instance is executed in its own thread. The