I'm trying to find out nice solution for situation where the user makes some
basic selection on form and then I have to load some aditional data from
server. For example when user makes selection of manager name using combo
box on form then I need to send data to server to load some aditional
I have several tables where there should only be one possible combination of
two uuid-fields per table (mostly many to many links).
I have created 'unique' constraints for those fields in Postgresql so the
database would not accept any inserts or edits which violates that
constraint.
I use that
Hi,
is there a way to trigger some functions on database eventes, for
example on new record?
thanks a lot
Manuele
Using windows, and web2py version 1.99.2, if I setup a simple
applicatioin, add slides.py and the test as per your instructions:
Things only half work. The link does not work, it says
you can use
http://www.google.com]]
you can use images [[image align=center /
If one tries emboldening
In my opinion I'll discard option number 1 if you are not running on GAE.
Because is not a true SQL, is quite awfull indeed, bring it by nosql gae.
But it's all depends on the amount of records.
2011/10/10 Bruno Rocha rochacbr...@gmail.com
I like this, and it is really smarter than list:string
I have changed the model of a populated table (removing two fields with
uuid-type references to other tables).
Now when I restart web2py the process never becomes ready. In the
Postgresql-log I see:
2011-10-11 12:24:13 SAST LOG: could not receive data from client:
Connection reset by peer
Dear All ,
i want to build a form in html and when the form is accepted send its
content in a Email , i know how to email it but i want to know how
can i catch it in the controler and see if its accepted , how can i
do that ??
How does choosing option 1 -- option 3 affect building a UI ?
It seems to me that option 1 can be used as-is in an SQLFORM.grid
containing other fields,
whereas option 3 might require a separate SQLFORM.grid to manage the
correspondence tags-items?
If this is just me not understanding all
Same as usual -- you have to create a FORM (or SQLFORM) object in the
controller and use form.accepts (or the newer form.process). You can create
the form manually in HTML and just make sure you include the _formname
hidden field
(see http://web2py.com/book/default/chapter/07#SQLFORM-in-HTML),
On Tuesday, October 11, 2011 4:04:41 AM UTC-4, spyker wrote:
I have several tables where there should only be one possible combination
of two uuid-fields per table (mostly many to many links).
I have created 'unique' constraints for those fields in Postgresql so the
database would not
when using sqlform-in-html ,do i have to use a table in the db ,,
and how can i create a radio button from there ?
Again, if just focused on form validation, I suppose another option would be
to use an onvalidation function (processed after form validation but before
db insert).
Anthony
On Tuesday, October 11, 2011 7:23:33 AM UTC-4, Anthony wrote:
On Tuesday, October 11, 2011 4:04:41 AM UTC-4, spyker
On 11 October 2011 13:25, Anthony abasta...@gmail.com wrote:
Again, if just focused on form validation, I suppose another option would
be to use an onvalidation function (processed after form validation but
before db insert).
Anthony
On Tuesday, October 11, 2011 7:23:33 AM UTC-4, Anthony
On Tue, Oct 11, 2011 at 8:43 AM, Johann Spies johann.sp...@gmail.comwrote:
Thanks Anthony. I will probably make use of what you suggested. I did not
know how to involve the two fields in the form-evaluation. This will not
replace the database constraint: tackling this from both the backend
On 11 October 2011 13:48, Bruno Rocha rochacbr...@gmail.com wrote:
Note that you can use db.table.validate_and_insert and
db.table.validate_and_update to fire validators in pure DAL without forms.
Thanks! I did not know about that.
Regards
Johann
--
May grace and peace be yours in
On 11 October 2011 12:31, Johann Spies johann.sp...@gmail.com wrote:
I have changed the model of a populated table (removing two fields with
uuid-type references to other tables).
Now when I restart web2py the process never becomes ready. In the
Postgresql-log I see:
2011-10-11 12:24:13
You can use SQLFORM.factory if you don't have a db table. For a radio
button, I suppose you could specify the radio widget for a given field
(see http://web2py.com/book/default/chapter/07#Widgets), or you could build
the HTML manually (review the details
at
Maybe useful for readers in the future:
Using multiple grids in one view is not supported, and the problems
won't be fixed.
(workaround: e.g. use iframes, or design a better UI that doesn't need
two grids in one view ;) )
Let me explain and clarify.
A grid can display multiple actions (select/edit/view/update etc...)
it discriminates this from the URL. Different grid actions have
different URLs. This is a feature. This allows you to reference a
particular page in a grid using the URL and send for example a link to
I do not understand the bug. Can you provide an example?
On Oct 11, 5:28 am, peter peterchutchin...@gmail.com wrote:
Using windows, and web2py version 1.99.2, if I setup a simple
applicatioin, add slides.py and the test as per your instructions:
Things only half work. The link does not work,
The new grid/smartgrid have a much better search feature. A new button
query shows a popup panel that allows you to build the query string.
Can you please check on your existing tables and see if you encounter
any problems?
You will need trunk but also the latest applications/welcome/js/
On Tuesday, October 11, 2011 9:49:51 AM UTC-4, stefaan wrote:
(workaround: e.g. use iframes, or design a better UI that doesn't need
two grids in one view ;)
Using ajax components might be better/easier than iframes.
am trying to use SQLFORM.factory with a widget but its not working :
def booking():
content=db(db.page.title=='booking').select(db.page.ALL)
form = SQLFORM.factory(
Field('your_name', requires=IS_NOT_EMPTY()),
Field('your_email'),
Maybe you need a boolean to use this widget?!
Richard
On Tue, Oct 11, 2011 at 10:45 AM, Web2Py Freak
halna...@gardeniatelco.comwrote:
am trying to use SQLFORM.factory with a widget but its not working :
def booking():
content=db(db.page.title=='booking').select(db.page.ALL)
form =
Have just started using populate which is a really useful tool.
However I have a couple of questions:
1) It seems to ignore the length specified for string fields. For
example it fills my postcode field with 100 characters of text despite
it having length of 8. Is there a way of restricting the
oh thnx richard its working , and its a radio now but tell me how
can i get its valu when accepted ??
I have created some database tables externally to web2py. Does web2py
require an id field for tables? The reason why I'm asking is, when I
use the DAL to do an insert, web2py tries to retrieve the currval of
the insert. Seeing how I don't have an id, this throws an exception.
How should I
On Tuesday, October 11, 2011 10:49:59 AM UTC-4, apple wrote:
Have just started using populate which is a really useful tool.
However I have a couple of questions:
1) It seems to ignore the length specified for string fields. For
example it fills my postcode field with 100 characters of
See http://web2py.com/book/default/chapter/06#Legacy-Databases-and-Keyed-Tables.
Greetings,
I am trying to serve binary image data from one of my controllers.
The data comes in via xmlrpc, and as such I have access to an xmlrpc
Binary object of the image data. I've written a controller that tries
to emulate what response.download does, but it doesn't seem to work.
Can
Nice implementation Paolo!
On Mon, Oct 10, 2011 at 9:56 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Done. Thank you!
On Oct 10, 6:11 pm, Paolo Caruccio paolo.carucci...@gmail.com wrote:
The result is splendid with your changes.
I want only suggest to replace the row # 1344
Whoops, I just needed to refer to the direct binary data, it was
passing an object in.
On Tue, Oct 11, 2011 at 12:11 PM, Matt Broadstone mbroa...@gmail.com wrote:
Greetings,
I am trying to serve binary image data from one of my controllers.
The data comes in via xmlrpc, and as such I have
I'm trying to do something fairly simple. I have a dropdown list of
product names from a product database. When the user clicks on the
dropdown list and chooses a different product name, I want a function
to execute onclick that goes to the product database, retrieves the
rest of the record, and
Hi Richard:
I think you need fire the onchange event, in the select tag ( whit
_onchange=yourJSFunction(); if using SELECT helper)
May be you can see this slice (
http://www.web2pyslices.com/slices/take_slice/144) and the working sample
app:
Richard, thank you.
Try to define default values for your fields:
name = Field(name, boolean, default=False)
Is there a repo where I can check out the current web2py book source?
I'd like to be able to make corrections as I read through the book and
submit a patch file, instead of opening a bunch of bug reports.
Surely there must be a solution to this? It does not seem logical to
have a component that is arbitrarily restricted to one per page?
iframe is not a good solution. And I don't think LOAD with ajax works
with multiple grids and pagination - certainly it does not work in my
application even after
also slightly frustrating is that the add/view/edit pass the table
name so you can generate output based on that. However the paginate
buttons do not pass the table name. So if you have a controller that
dynamically creates grid parameters depending on the table then this
does not work with
I was really disappointed about Datatables not managing correctly more then
one instance of table in the same page... Problem with Datatables, is that
it not supports the export button to work on more then once instance of
datatables init per page if you choose to put your tables into tabs
with
Thanks for the module, Massimo!
Unfortunately, it is not working in a test app:
## snip ##
$ python web2py.py -P -M -S slides
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.3 (2011-09-26 10:32:57) dev
Database drivers available: SQLite3, pymysql
Python 2.7.2
Not yet at the db level but at the form level:
form=SQLFORM(...).process(onsuccess=lambda form:...)
On Oct 11, 3:11 am, Manuele manuele.pese...@gmail.com wrote:
Hi,
is there a way to trigger some functions on database eventes, for
example on new record?
thanks a lot
Manuele
No. the only book is a wiki but it is temporary locked because I am
doing some work on it.
On Oct 11, 12:57 pm, jheath justin.he...@gmail.com wrote:
Is there a repo where I can check out the current web2py book source?
I'd like to be able to make corrections as I read through the book and
If an ajax grid does work please open an issue on google code so I can
check it and we can fix it. I cannot reproduce your problem otherwise.
On Oct 11, 1:12 pm, apple simo...@gmail.com wrote:
Surely there must be a solution to this? It does not seem logical to
have a component that is
i am under the belief that while undocumented it should work and most likely
can be fixed.
are you getting an error, or just nothing in the result?
Would be nice to have some global events in web2py workflow. I can imagine
some useful hooks:
workflow global events:
onrequest # before the execution of action/model
prerender # after the execution of action/model but before the view
rendering
onrender # after the view render but before the
you are putting it in modules while it has to be in models.
if you want it in modules you will need to explicitely import all web2py
helpers and context.
from gluon import *
http://zerp.ly/rochacbruno
Em 11/10/2011 16:28, jotbe jan.beili...@gmail.com escreveu:
Thanks for the module, Massimo!
the files in the uploads folder should be save since they are all
renamed. But what happens if the user passes e.g. '../models/db.py' as
parameter? (the slashes would have to be encoded though, is this
possible?) Then he would get access to the data model which would not
be good at all. I'm now
I like the idea!
+1
It is common in many frameworks. IMHO seems more common on compiled
languages frameworks for some reason.
mic
2011/10/11 Bruno Rocha rochacbr...@gmail.com:
Would be nice to have some global events in web2py workflow. I can imagine
some useful hooks:
workflow global
Massimo Di Pierro wrote:
The new grid/smartgrid have a much better search feature. A new button
query shows a popup panel that allows you to build the query string.
Can you please check on your existing tables and see if you encounter
any problems?
The capabilities columns seems to be missing
I think this has to do with the web2py migration code. Maybe it only
happens if the db is PostgreSQL. Now that I know that a default value
should hopefully solve this its not an issue for me anymore. But I
think it should not be necessary in first place, or if it is, it would
be good if it would
Okay, thanks.
On Oct 11, 2011 4:24 PM, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
No. the only book is a wiki but it is temporary locked because I am
doing some work on it.
On Oct 11, 12:57 pm, jheath justin.he...@gmail.com wrote:
Is there a repo where I can check out the current
the problem with this is not the names. ;-)
Consider the case of preupdate and onupdate.
db(db.person.age18).update(can_drink=True)
What information should be passed to preupdate and update? tablename?
query? {'can_drink':True}? Number of affected records? Should there be
one onselect per
may be a dictionary of tablename_event:function
I see that in DAL level this is very complicated.
but what about the resquest-response workflow events. I had cases where I
needed some global function to trigger before/after the template rendering
and final response.
http://zerp.ly/rochacbruno
I am developing an online booking application where
I am storing the date using the date type of
web2py which stores the date in -mm-dd format.
I need to store the data in dd-mm- format in
the datastore.
For this I tried to use this :
date.requires = IS_DATE(format=T('%d-%m-%Y')
in db
Field('start_time','datetime',requires=IS_DATETIME(str(T('%Y-%m-%d
%H:%M:%S',
Field('stop_time','datetime',requires=IS_DATETIME(str(T('%Y-%m-%d
%H:%M:%S',
db.task.start_time.represent = lambda v: v.strftime('%d/%m/%Y')
db.task.stop_time.represent = lambda v:
Hi,
I have been able to access legacy databases that don't have an id
field. In the following example 'pointnumber' is the primary key, and
is unique. I was able to read values from this table with DAL. I used
the following model:
db2.define_table('statuspoint',
I suggested it 2 years ago. I'll be happy if it come true someday, in web2py.
I see it as database triggers: before_event after_event. I.e:
before_insert, after_insert. Event can be: insert, update, delete,
query.
before_insert receives values that will be inserted on database. It
is the last
Clarifying,
date fields are stored in internal format and they are optimized for that.
You can customize representation format, not stored format. It was
what Ovidio showed you.
--
Vinicius Assef.
On Tue, Oct 11, 2011 at 10:16 PM, Ovidio Marinho ovidio...@gmail.com wrote:
in db
As I said, the problem is not the names or when they should be called.
The problem is. What should be input and the output of each of these
functions?
On Oct 11, 9:03 pm, Vinicius Assef vinicius...@gmail.com wrote:
I suggested it 2 years ago. I'll be happy if it come true someday, in web2py.
I
http://code.google.com/appengine/docs/python/python27/newin27.html
Don't forget on table creation and alteration.
On Oct 11, 11:57 pm, Bruno Rocha rochacbr...@gmail.com wrote:
Would be nice to have some global events in web2py workflow. I can imagine
some useful hooks:
workflow global events:
onrequest # before the execution of action/model
prerender #
I'm getting nothing (None). If the intention was to having it work this way
(by passing key as id) I'll have a look at the DAL code more closely. Maybe
something affects the key outside of the select_raw function. Have this ever
worked for you?
On Oct 12, 4:18 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
As I said, the problem is not the names or when they should be called.
The problem is. What should be input and the output of each of these
functions?
Whenever I'm in a problem with a full stack web framework, I think to
64 matches
Mail list logo