Is it possible to run a web2py application in Cheyenne web server?
db.define_table('actividades_riesgos',Field('actividades',db.actividades),Field('riesgos',db.riesgos))
actividad=db(db.actividades.nombre==request.args(0)).select(db.actividades.
id)
riesgo=db(db.riesgos.nombre==request.args(1)).select(db.riesgos.id)
record = db((db.actividades_riesgos.actividade
Thank you, I've fixed it with:
actividad_id=actividad[0].id
riesgo_id=riesgo[0].id
On 15 ene, 12:45, Massimo Di Pierro
wrote:
> perhaps
>
> (db.actividades_riesgos.riesgos==riesgo)
>
> should be
>
> (db.actividades_riesgos.riesgos==riesgo.first().id)
>
> On
When I write two separate words in a form field, and extract the value
of this field, every space appears the symbol '_', it causes me not
match the field's value with the value of the database.
How I can fix this?
Thanks.
When I extract the value of a form field, if I've written for example
"take helmet", I get the value of field `take_helmet, why?
The code is as follows:
form = FORM ('name risk',
INPUT (_name = 'name1', required = [IS_NOT_EMPTY (),
IS_UPPER ()]),
'preventive
Thanks, I fixed it with the next code:
redirect(URL('modificar_obra',vars=dict(a=form.vars.nombre)))
On 19 ene, 11:19, Kenneth Lundström
wrote:
> If you look at form.vars.name1 before passing them via redirect you ll
> see that no replacing has been done, try with
>
> if form.accepts (request.var
I would like to change the calendar.js date format, I want the format
d / m / y instead ofy / m / d
¿It´s possible?
I can display single table in jqgrid, but, how I can display joined
tables in jqgrid?
I talk about the plugin jqgrid
On 31 ene, 12:12, luifran wrote:
> I can display single table in jqgrid, but, how I can display joined
> tables in jqgrid?
I used the following code to open a O.S window, to open a file, form =
FORM (INPUT (_type = 'file', _name = 'data'), INPUT (_type =
'submit')),
but now I want the same to save a file, how I can do?
I have the following table, for example:
db.define_table ('t', Field ('a '), Field ('b'))
I want to impose the following restriction, to avoid insertion of
duplicate records
not allow insertion of a pair of identical values (a y b).
How I can do this?, I know how to restrict a single field, but n
Thanks, I'll try that way
On Mar 28, 8:59 am, Massimo Di Pierro
wrote:
> db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!=
> %s'% repr(request.vars.a)))
>
> On Mar 28, 10:37 am, luifran wrote:
>
>
>
>
&
mar, 20:40, luifran wrote:
> Thanks, I'll try that way
>
> On Mar 28, 8:59 am, Massimo Di Pierro
> wrote:
>
>
>
>
>
>
>
> > db.define_table ('t', Field ('a'), Field ('b',requires=IS_EXPR('value!=
> > %s'% repr
as I can do that?
to insert into the table I use crud.create
On Mar 29, 10:21 am, pbreit wrote:
> I suspect you will need to use "onvalidation" in your controller and then
> query the db for both fields matching.
Thanks you, but I don´t know how to apply this to my model, is there
any example?
On 30 mar, 13:12, Anthony wrote:
> On Tuesday, March 29, 2011 1:33:40 PM UTC-4, luifran wrote:
>
> > as I can do that?
> > to insert into the table I use crud.create
>
> You can specify
I entered in web2py_ajax.html the following code to submit the form by
pressing the Enter key:
$ (function () {
$ ("form"). bind ("keypress", function (event) {
if (event.keyCode == 13) {
$ ('form'). submit ()
}
});
The pr
I was wrong to copy the code, is this:
$ (function () {
$ ("form"). bind ("keypress", function (event) {
if (event.keyCode == 13) {
$ ('form'). submit ()
}
});
});
But the problem is not there.
On 10 abr, 03:05, pbreit
I also work for me, but I stop working flash messages, calendars,
tooltips, etc.
I want to run everything.
On 10 abr, 19:15, pbreit wrote:
> But I think Web2py's standard buttons work like this without needing that
> extra code.
I want it to affect all the forms, I use crud forms, how I can put a
id for the crud forms?
On 11 abr, 00:38, pbreit wrote:
> Possibly because you are binding to 'form'. You might want to make the bind
> more specific like this:
>
>
>
>
>
>
How could submit the forms by pressing the enter key?
With forms created with html helpers works, but crud forms not works,
when you press the enter key nothing happens.
On Apr 13, 12:25 pm, pbreit wrote:
> The regular Web2py forms should already work like that. Are they not for
> you? What happens when you press 'enter'?
;FieldName', 'DateType'))
db.define_table ('c', Field ('a ', db.a), Field ('b ', db.b))
crud.create (db.c) / / In this form the enter key does not work
On 13 abr, 22:25, luifran wrote:
> With forms created with html helpers works, but crud forms not
My default browser is Firefox 4
On 13 abr, 23:05, Massimo Di Pierro
wrote:
> which browser?
>
> On Apr 13, 3:52 pm, luifran wrote:
>
>
>
>
>
>
>
> > I have observed that in simple crud forms it works the enter key,
> > but crud forms with references to
I will try to run on Windows XP and other browsers and I tell you.
On 14 abr, 09:47, Stifan Kristi wrote:
> work fine for me on ubuntu 10.10 with chrome and firefox.
>
> On Thu, Apr 14, 2011 at 2:42 PM, luifran wrote:
> > My operating system is ubuntu 10.04
>
> > On 13 a
ed by other tables.
The truth is that I have no idea what happens.
On Apr 14, 3:39 am, luifran wrote:
> I will try to run on Windows XP and other browsers and I tell you.
>
> On 14 abr, 09:47, Stifan Kristi wrote:
>
>
>
>
>
>
>
> > work fine for me on ubuntu 10
I have not seen the behavior work on other web sites
On Apr 14, 11:42 am, pbreit wrote:
> Oh, yeah, if there is a drop-down, then I think the focus on it takes
> precedence. I'm not sure if there's a work-around. Have you seen the
> behavior work on other web sites?
yes, my crud form has only two drop down list.
On 15 abr, 00:29, Stifan Kristi wrote:
> is your focus is on the text area, check box or drop down list?
>
> best regards,
>
> steve van christie
I'm using WebGrid, but sometimes I just want to use it to
show records, not to edit, delete,view,add ...
With this line: grid.action_links = [ ],I remove
edit, delete, and view but not add records.
Can I remove the option to add records?
How I can make backups of my database to restore in the future?
I tried it with db.export_to_csv_file and db.import_from_csv_file, but
does not work because as you read and introducing bellonging ignores
the id fields
and enter according to the sequence, then the relationships I have
and that are n
The problem is this, I have for example the following tables and
records:
db.define_table ('a ', Field ('name', 'string'))
db.define_table ('b', Field ('name', 'string '), Field ('a ', db.a))
Table record's a:
id-> 1, name-> 'name1'
no id-> 2 because such has been removed.
id-> 3, name-> 'name3'
Ta
Is true, I have a other problem, I have a sqlite file.csv, and I want
to import this file
to mysql database and appears the following error:
Cannot add or update a child row: a foreign key constraint fails
(`sinrisk`.`auth_event`, CONSTRAINT `auth_event_ibfk_1` FOREIGN KEY
(`user_id`) REFERENCES `a
What mechanisms?
On 2 mayo, 23:20, howesc wrote:
> i'm a little old-skool and just use the database's backup mechanisms since
> they are slightly different from db to db, but in general faster to run than
> CSV dump and import.
>
> cfh
If I use import_from_csv_file and this fail, rollback is automatic?
On 3 mayo, 14:59, luifran wrote:
> What mechanisms?
>
> On 2 mayo, 23:20, howesc wrote:
>
>
>
>
>
>
>
> > i'm a little old-skool and just use thedatabase'sbackupmechanisms since
I did, deleting 'add_links' to grid.enabled_rows
On 29 abr, 11:11, luifran wrote:
> I'm usingWebGrid, but sometimes I just want to use it to
> show records, not to edit, delete,view,add ...
> With this line: grid.action_links = [ ],I remove
> edit, delete, and view b
This work fine:
def combo():
usuarios=db(db.auth_user.registration_key=='pending').select()
form = (SELECT([OPTION(usuarios[0].username,
_value=usuarios[0].id) for texto in
usuarios],_name='combo'))
return dict(form=form)
This not work fine, does not appear the form:
def combo():
I have the following query:
usuarios_in=db(db.auth_membership.user_id==db.auth_user.id).select(db.auth_user.username)
#This show users in membership
I have show users out of membership with the following query:
usuarios_out=db(db.auth_membership.user_id!
=db.auth_user.id).select(db.auth_user.userna
I tried the following with the test server and it works
In crontab:
55 07 * * * root * default / limpiar_eventos
In the default controller
def limpiar_eventos ():
totalFilas = db (db.auth_event.id> 0). count ()
totalFilas if> 30:
for row in db (db.auth_event.id> 0). select (limitb
http://127.0.0.1:8000/myapp/default/limpiar_eventos work fine in
cherokee web server,
and crontab work fine in web2py´s server but not in cherokee web
server.
On 13 mayo, 10:08, pbreit wrote:
> Do you have those spaces in there? The cron line should be:
>
> 55 07 * * * root *default/limpiar_event
No , only in web2py, not in cherokee.
Where I write this code?
0-59/1 * * * * cd /var/web2py && python web2py.py -C -D 1 > /dev/null
2>&1
On 13 mayo, 15:02, pbreit wrote:
> I doubt it's a Cherokee problem. Do you have a crontab set up on your
> server?
>
> For example, this is what I have in my
I can use visual report generator with web2py?
which?
In the view must be for example {{=add}}
On 21 mayo, 12:00, 黄祥 wrote:
> hi,
>
> is there any class example on book or appliances, so that i can learn
> from it?
> i've already tried the simple things what written on book, but got an
> error. do you have any hints or solutions?
> thank you so much
I put the following code and it works fine:
=== controller ===
class MyClass(object):
z = 2
def __init__(self, a, b):
self.x = a
self.y = b
def add(self):
return self.x + self.y + self.z
def index():
myinstance = MyClass(3, 4)
add = myinstance.add()
depends on the requirements of your system, but in principle the
web2py development server is sufficient
On 30 mayo, 21:58, ra3don wrote:
> I apologize if this has already been answered somewhere.
>
> Are there any disadvantages to deploying using the default server that
> comes with web2py?
Hi,
I need build tables in pdf, but the length of content cell change and
I need
that autoresize this cell for the content fit to the cell.
I tried pyfpdf with cell and appreport plugin but when the cell
content is too long
this content is out of the cell or the letter size is smaller.
there is a w
How?
can you explain to me?
On 8 jun, 13:58, Ovidio Marinho wrote:
> use css to render its tables or render tags html.
>
> Ovidio Marinho Falcao Neto
> ovidio...@gmail.com
> 88269088
> Paraiba-Brasil
>
> 2011/6/8 luifr
In sql, you can apply first order by and then limitby for example in
Oracle:
select * from
(select * from table
order by field)
where rownum<11//row 1 to 10 after order
On 9 jun, 09:52, pbreit wrote:
> I have a query that includes both orderby and limitby. What seems to happen
> is that the db
In DAL, I don´t know If this can be done.
On 9 jun, 10:40, luifran wrote:
> In sql, you can apply first order by and then limitby for example in
> Oracle:
>
> select * from
> (select * from table
> order by field)
> where rownum<11//row 1 to 10 after order
>
>
47 matches
Mail list logo