[web2py:32130] "Add" button next to "combo box"

2009-10-02 Thread Renato-ES-Brazil
Hi guys! When the form displays the select with several options from the other table, using the "is_in_db" configuration, couldn't also to put a button, for example "ADD NOW", next to it to allows add a new option? Currently is there this possibility for the CRUD (create and update forms)? --~--

[web2py:32234] Re: "Add" button next to "combo box"

2009-10-05 Thread Renato-ES-Brazil
t; > On Sat, Oct 3, 2009 at 02:52, Iceberg wrote: > > > > On Oct3, 8:41am, Renato-ES-Brazil wrote: > > >> Hi guys! > > > >> When the form displays the select with several options from the other > > >> table, using the "is_in_db" configu

[web2py:32261] Re: "Add" button next to "combo box"

2009-10-05 Thread Renato-ES-Brazil
and "function". So, inside the function, I would use the values to create properly the "add" link (url). I found only a few examples of customization of widget. Thanks. On Oct 5, 8:03 am, Renato-ES-Brazil wrote: > Cool! > > Before I try to do something I really wanted t

[web2py:32263] Re: "Add" button next to "combo box"

2009-10-05 Thread Renato-ES-Brazil
"url":URL (a="myapp",c=field.name,f="create"),"text":"Add"} ) return DIV(select, script_add_button) Notice above, in the line where I create the "add" link, that I call the "URL" method by passing hard coded values

[web2py:32265] Re: "Add" button next to "combo box"

2009-10-05 Thread Renato-ES-Brazil
. > > On Oct 5, 8:22 pm, Renato-ES-Brazil wrote: > > > I've created a simple code. > > > In my db_task.py I have the following lines, among others: > > > from applications.myapp.modules.mywidgets import * > > > db.main.product.requires=IS_I

[web2py:32780] Re: "Add" button next to "combo box"

2009-10-12 Thread Renato-ES-Brazil
I'm working with this idea again. Clicking on the link "add" opens a div popup with a form to create the record. This form is submitted via ajax, but I'm having a problem: the validation with form.accepts is failing, but the values are in request.vars. Seems to be due to SQLFORM put different va

[web2py:32784] Re: "Add" button next to "combo box"

2009-10-12 Thread Renato-ES-Brazil
n Oct 12, 10:51 pm, mdipierro wrote: > I am not sure I understand. the values are always in request.vars. > Those values that pass validation they are copied in form.vars. > > On Oct 12, 7:46 pm, Renato-ES-Brazil wrote: > > > I'm working with this idea again. > > > Click

[web2py:32801] Re: "Add" button next to "combo box"

2009-10-13 Thread Renato-ES-Brazil
Massimo, #1. Any idea? :-) #2. Is there any way of SQLFORM put the same values into the attributes ID and NAME? On 12 out, 23:17, Renato-ES-Brazil wrote: > Massimo, > > Sorry, I'll try to explain better... > > I know that the values are in request.vars, therefore I ma

[web2py:32809] Re: "Add" button next to "combo box"

2009-10-13 Thread Renato-ES-Brazil
Thadeus, But when I create the form manually it works. The only difference is that I put the same value into the attributes ID and NAME. Thanks. On 13 out, 13:29, Thadeus Burgess wrote: > Perhaps its a problem with _formkey? > > -Thadeus > > On Tue, Oct 13, 2009 at 11:17 AM, R

[web2py:32813] Re: "Add" button next to "combo box"

2009-10-13 Thread Renato-ES-Brazil
The form fails in any attempt to add new record. :-( The form.accepts always fails because the method isn't able to find the values from the required fields, even they being filled out and to be in the request.vars properly. I notice that it happens because the "ID" and "NAME" attributes created

[web2py:32815] Re: "Add" button next to "combo box"

2009-10-13 Thread Renato-ES-Brazil
Fixing: The code that I posted had a error because I'd edited manually here. The error was: "_id=form_name" instead of "_id="form_test". See below: >     form = SQLFORM(db.product, _enctype=None, _id=form_name, > _action=None, _method=None) The correct line is: form = SQLFORM(db.product, _e

[web2py:32821] Re: "Add" button next to "combo box"

2009-10-13 Thread Renato-ES-Brazil
t; > def validate_popup(): >     form = SQLFORM(db.product) >     if form.accepts(request.vars): >         return DIV("Product successfully registered!") >     elif form.errors: >         return TABLE(*[TR(k, v) for k, v in form.errors.items()]) >     else: return DIV(&q

[web2py:32823] Re: "Add" button next to "combo box"

2009-10-13 Thread Renato-ES-Brazil
> submission.  More info on page 201 (labeled 185) in the manual.  Glad > it worked! > > In general, it is best to avoid the web2py_ajax.html ajax function for > anything complicated.  It is a simple helper to get people started but > has several limitations. > > On Oct 13, 7

[web2py:32863] Re: "Add" button next to "combo box"

2009-10-14 Thread Renato-ES-Brazil
Hi Markus! I'm still working in some details for this functionality in my 'available times': - I need to reload the "select" object to show the new option registered. - I would like to improve the structure of the code and files where possible in order to be easy to implement. Currently has a m

[web2py:32922] How can I set a view to a controller manually?

2009-10-14 Thread Renato-ES-Brazil
Can I manually choose which view (template file) I will use to render a controller? I don't want to create the specific file to the controller. I want to map to a generic view that I created. --~--~-~--~~~---~--~~ You received this message because you are subscribe

[web2py:32948] Re: How can I set a view to a controller manually?

2009-10-15 Thread Renato-ES-Brazil
Simple and perfect! Thanks. On Oct 14, 9:56 pm, mdipierro wrote: > response.view='default/theview.html' > > On Oct 14, 7:47 pm, Renato-ES-Brazil wrote: > > > Can I manually choose which view (template file) I will use to render > > a controller? > > &g

[web2py:32974] Re: "Add" button next to "combo box"

2009-10-15 Thread Renato-ES-Brazil
Hi guys! Another problem found: - The "form.accepts" fails when I trying submit the form with the links "add". Some lines shown in the log: if form.accepts(request.vars, session): File "/home/renato/Desenvolvimento/web2py/gluon/sqlhtml.py", line 777, in accepts self.trows[fieldname][1]

[web2py:32975] Re: "Add" button next to "combo box"

2009-10-15 Thread Renato-ES-Brazil
I'll to try do it. :-) On 14 out, 12:42, Thadeus Burgess wrote: > Write a web2pyslice when you get it hashed out! > > -Thadeus > > On Wed, Oct 14, 2009 at 6:24 AM, Renato-ES-Brazil > wrote: > > > xample, I wanted to put the link "add" next to the

[web2py:32997] Re: How can I set a view to a controller manually?

2009-10-16 Thread Renato-ES-Brazil
some time but it is worthy! >  http://www.web2py.com/examples/default/examples > > The response.view trick is mentioned inside. > > On Oct15, 7:12pm, Renato-ES-Brazil wrote: > > > Simple and perfect! > > > Thanks. > > > On Oct 14, 9:56 pm, mdipierro wrote: >

[web2py:33024] Re: "Add" button next to "combo box"

2009-10-16 Thread Renato-ES-Brazil
butes, like "errors", from the "add" links? On Oct 15, 9:32 pm, Renato-ES-Brazil wrote: > Hi guys! > > Another problem found: > - The "form.accepts" fails when I trying submit the form with the > links "add". > > Some lines shown in th

[web2py:33025] Re: "Add" button next to "combo box"

2009-10-16 Thread Renato-ES-Brazil
ere is the SELECT? :-/ Thanks. On Oct 16, 3:53 pm, Renato-ES-Brazil wrote: > Any tips? What could I do to "form.accepts" to get just the first > object (SELECT) and not a tuple (SELECT and A)? > > Do I have to remove the A object ("add" link) from the wher

[web2py:33043] Re: "Add" button next to "combo box"

2009-10-16 Thread Renato-ES-Brazil
gt; Is the link inside the form? If so, try moving it outside and see if > it still fails. > > On Oct 16, 1:53 pm, Renato-ES-Brazil wrote: > > > Any tips? What could I do to "form.accepts" to get just the first > > object (SELECT) and not a tuple (SELECT and A)? &

[web2py:33070] Re: "Add" button next to "combo box"

2009-10-17 Thread Renato-ES-Brazil
On Oct 16, 7:27 pm, Renato-ES-Brazil wrote: > mr.freeze, > > Yes, the link is inside the form. Each "add" link is next to your own > "select" (combo box) object. The "add" link is created by a widget set > in my model, hence it is rendered by SQLFORM in

[web2py:33072] Is it possible attach any file in the web2pyslices.com?

2009-10-17 Thread Renato-ES-Brazil
I would like to put my widget there, but I don't found a place where I can send my files ( module and view) needed to the widget. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this g

[web2py:33075] Re: Is it possible attach any file in the web2pyslices.com?

2009-10-17 Thread Renato-ES-Brazil
Ok, Thanks! :-) On Oct 17, 3:55 pm, "mr.freeze" wrote: > I haven't enabled uploading for security reasons.  There are many good > services that you can use to host the file and link it from your > slice. Drop.io is a good one. > > On Oct 17, 1:31 pm, Renato-ES-Bra

[web2py:33076] Re: "Add" button next to "combo box"

2009-10-17 Thread Renato-ES-Brazil
Guys, I added the widget in web2pyslices.com. Following url: http://www.web2pyslices.com/main/slices/take_slice/11 Please let me know the problems and feel free to improve it. On Oct 17, 3:20 pm, Renato-ES-Brazil wrote: > I solved this problem. Now my widget returns the SELECT (combo

[web2py:33077] New widget on the web2pylices.com: OPTIONS_WITH_ADD_LINK

2009-10-17 Thread Renato-ES-Brazil
Guys, I added a widget in web2pyslices.com. Following url: http://www.web2pyslices.com/main/slices/take_slice/11 This widget put a "add" link next to SELECT object created by IS_IN_DB validator. There was a topic about the creation of the widget in the following url: http://groups.google.com/gro

[web2py:33080] Re: Rails vs Web2py at Athens Digital Week

2009-10-17 Thread Renato-ES-Brazil
Cool Jon!!! :) One more comment: In slide 11 you could use Field instead of SQLField. :-) On Oct 17, 4:10 pm, Iceberg wrote: > Nice slides! > > One comment. In slide 9, the web2py part is in fact the code of > controller, but I think a more equivalent comparison should be the > code of view, th

[web2py:33165] Re: Having an issue importing to unique=True db field

2009-10-19 Thread Renato-ES-Brazil
Does the system not allows null values for old users? The property "notnull=False" is standard in the creation of the fields. On 19 out, 20:09, Thadeus Burgess wrote: > Starting from a fresh sqlite database, I am attempting to import 3k+ records > from a custom csv file (not one generated by we

[web2py:33305] Re: New widget on the web2pylices.com: OPTIONS_WITH_ADD_LINK

2009-10-21 Thread Renato-ES-Brazil
; > > regards, > > Alex F > > > El 17/10/2009 21:26, Renato-ES-Brazil escribió: > > > > Guys, > > > > I added a widget in web2pyslices.com. Following url: > > >http://www.web2pyslices.com/main/slices/take_slice/11 > > > > This wi

[web2py:33312] Re: Pop-ups

2009-10-21 Thread Renato-ES-Brazil
I think you want something like: http://groups.google.com/group/web2py/browse_thread/thread/4d68f54f1785b226 On 21 out, 13:17, Sophie wrote: > hi all, i want to have this in my web. I have a product this product > have a category, so i want to insert my product, but the category > doesnt exist.

[web2py:33318] Re: plugin system again

2009-10-21 Thread Renato-ES-Brazil
I think versioning is very important. On 21 out, 14:25, Yarko Tymciurak wrote: > On Wed, Oct 21, 2009 at 11:16 AM, mr.freeze wrote: > > > I like how the plugin system is shaping up but have one question about > > the folder structure. It seems more manageable to structure it like > > this: > >

[web2py:33363] Re: Pop-ups

2009-10-21 Thread Renato-ES-Brazil
is "NameError: name > 'OPTIONS_WITH_ADD_LINK' is not defined" > But in the widgetAddLink.py I add > db.Product.Category.widget=OPTIONS_WITH_ADD_LINK(T=T, r=request, > c="Category") > why cant it recognize the function? > > Sophie > > On Oct 21,

[web2py:33567] Re: more specific IS_INT_IN_RANGE / IS_FLOAT_IN_RANGE error message

2009-10-24 Thread Renato-ES-Brazil
Massimo, What was the idea you've had related to T? Do you implemented it? On 21 out, 17:52, mdipierro wrote: > T() is always lazy by default. yet T is not instantiated until called. > Hey got an idea work on it tonight. > > On Oct 21, 2:48 pm, Jonathan Lundell wrote: > > > On Oct 21,

[web2py:33614] Re: Web2py concerns

2009-10-24 Thread Renato-ES-Brazil
I have the same problem! :-( On 24 out, 16:08, Thadeus Burgess wrote: > My only complaint about the web editor is it is buggy. Every once in a while > (like every 5 minutes) it will bug up, and not display the code correctly, > hard to explain so heres a screenshot > > http://static.thadeusb.com

[web2py:33615] Re: Web2py concerns

2009-10-24 Thread Renato-ES-Brazil
Note: When I disable the "syntax highlight", the editor works properly. On 24 out, 16:22, mdipierro wrote: > The old version of editarea did not have the bug. I do not know > exectaly which upgrade introducedthe bug. If anybody finds out we can > revert to the old one. > > Massimo > > On Oct 24,

[web2py:33630] Re: FORM with self located fields and data from two tables

2009-10-24 Thread Renato-ES-Brazil
Massimo, I tried to use SQLFORM.factory just for tests: def edit(): task_id = request.args(0) task=db(db.task.id==task_id).select()[0] form=SQLFORM.factory(db.task.title, db.task.description, record=task) if form.accepts(request.vars, session): response.flash = 'form acce

[web2py:33633] Re: FORM with self located fields and data from two tables

2009-10-24 Thread Renato-ES-Brazil
> > In your case your form involves a single table so you should just use > crud.create or crud.update > use db.table.field.writable and db.table.field.readable and > db.table.field.default to change the behavior of the form. > > On Oct 24, 3:02 pm, Renato-ES-Brazil wrote

[web2py:33642] Re: Web2py concerns

2009-10-25 Thread Renato-ES-Brazil
Just clicking on the "toggle syntax highlight on/off" button. Second button after combo box, in the toolbar above the code. On 24 out, 16:35, Renato-ES-Brazil wrote: > Note: When I disable the "syntax highlight", the editor works > properly. > > On 24 out, 16:22,

[web2py:33708] Re: new on web2pyslices.com: comment subscriptions

2009-10-26 Thread Renato-ES-Brazil
Cool! Thanks! On 26 out, 03:27, "mr.freeze" wrote: > You can now subscribe to comments on a slice.  You will receive an > email if anyone posts a new comment. > > Enjoy! > -Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[web2py:33723] backward compatibility

2009-10-26 Thread Renato-ES-Brazil
Massimo, About the question of "backward compatibility", maybe there will come a time that one of the principles Python and web2py are broken, specifically this: "There should be only one way of doing things". Or not? :-) Example (extracted from manual): "For backward compatibility SQLDB=DAL a

[web2py:33811] Re: backward compatibility

2009-10-27 Thread Renato-ES-Brazil
t; > because that would make even more logs. > > I agree. > > > > > Pros/Cons? > > > On Oct 26, 10:37 am, Renato-ES-Brazil > > wrote: > >> Massimo, > > >> About the question of "backward compatibility", maybe there will come >

[web2py:33846] Re: Web2py concerns

2009-10-27 Thread Renato-ES-Brazil
Massimo, Do you found the error on editor? :-) On 27 out, 12:26, carlo wrote: > seldom I use the web editor myself, but I admit it is a facility when > you are at customers and you have to make a change on the fly. > > As other said, there is a lot of magic in web2py but fortunately you > can

[web2py:34009] Re: 1.69.1 is OUT

2009-10-28 Thread Renato-ES-Brazil
Cool! :-) Could you put warnings related to those deprecated methods (item 3)? On 28 out, 19:08, mdipierro wrote: > Please check it form mistakes. > > There many many new features in trunk. too many that I do not have the > time to describe them all. > Here is a partial list: > > 1) > Lots of

[web2py:34053] Re: DAL Rows as dictionary?

2009-10-29 Thread Renato-ES-Brazil
I agree. On 29 out, 12:19, "mr.freeze" wrote: > I think it is worth adding an as_dict function to Rows personally. > > On Oct 29, 9:01 am, mdipierro wrote: > > > My bad again > > > item_dict=dict([(r['id'],r) for r in db(db.items.id > 0).select > > ().as_list()]) > > > On Oct 29, 8:58 am, Fran

[web2py] File containing all imports needed for autocomplete functionality

2010-03-24 Thread Renato-ES-Brazil
Hi guys, How about create a file containing all imports needed for autocomplete (intellisense) to work in the editors like Eclipse and Netbeans? :-) It would be nice to keep it in a separate file and updated in repository for anyone to use and import when you want to use an editor with this func

[web2py] Re: A doubt with SQLFORM

2010-03-24 Thread Renato-ES-Brazil
Massimo, Are the obsolete codes generating warnings in any log? Where can I see them? Thanks... On 24 mar, 13:28, Abhishek Mishra wrote: > Alright I'll try looking for it, Thanks > > On Mar 24, 9:21 pm, mdipierro wrote: > > > > > I wote a plugin for this last month and I posted on this list bu

[web2py] Re: A doubt with SQLFORM

2010-03-24 Thread Renato-ES-Brazil
Ok. Right, but and the others functionalities deprecated? Are they registered as warning in log? On 24 mar, 15:01, mdipierro wrote: > no since they still work and will continue to support them. > > On Mar 24, 12:53 pm, Renato-ES-Brazil wrote: > > > > > Massimo, >

[web2py] Re: A doubt with SQLFORM

2010-03-24 Thread Renato-ES-Brazil
hem. There is no > reason for any warning. > > On Mar 24, 1:30 pm, Renato-ES-Brazil wrote: > > > > > Ok. Right, but and the others functionalities deprecated? Are they > > registered as warning in log? > > > On 24 mar, 15:01, mdipierro wrote: > > &

[web2py] Re: wrong decisions and backward compatibility

2010-02-06 Thread Renato-ES-Brazil
Web3py is an alternative, check this: > When GAE moves to 3.0 and the database drivers for all supported > backends become available we will release something like web3py (TM). > Since we are going to break language backward compatibility that will > also be a good time to include other non-backwa

[web2py] Re: about docs

2010-02-12 Thread Renato-ES-Brazil
Sorry, where is this online version of the book? On 12 fev, 04:03, mdipierro wrote: > now that the book is almost online, after we merge it with alterego I > am considering removing all documentation (but epydoc) from examples > and just link the book.  This will make web2py lighter. > > Any obje