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)?
--~--
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
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
"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
.
>
> 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
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
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
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
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
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
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
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
> 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
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
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
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
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]
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
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:
>
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
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
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)?
&
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
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
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
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
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
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
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
;
> > 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
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.
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:
>
>
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,
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,
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
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,
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
>
> 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
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,
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
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
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
>
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
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
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
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
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
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,
>
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:
>
> &
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
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
51 matches
Mail list logo