[web2py] Re: Help with Database

2010-12-10 Thread CesarBustios
Thanks! :) On Dec 10, 4:36 am, Kenneth Lundström wrote: > http://web2py.com/book/default/chapter/06?search=csv#Exporting-and-Im... > > Kenneth > > > > > > > > > Thaks Kenneth, do you know where can i find some examples or > > documentation about this? > > > On Dec 10, 4:16 am, Kenneth Lundstr m >

[web2py] Re: Help with Database

2010-12-10 Thread CesarBustios
Thaks Kenneth, do you know where can i find some examples or documentation about this? On Dec 10, 4:16 am, Kenneth Lundström wrote: > One way of doing this is to export all data while connected to Postgres > and then import to MySQL. And doing the import and export via web2py. > > Kenneth > > > >

[web2py] Help with Database

2010-12-10 Thread CesarBustios
Hi, i wanto to know if there is a way to change from Postgres to MySQL and keep all the information in the db. How can i do that? Thanks a lot! Cesar B.

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread CesarBustios
:) On 29 nov, 16:16, DenesL wrote: > The IS_IN_SET looks good, but 'Campana' is not an HTML element. > > On Nov 29, 3:50 pm, CesarBustios wrote: > > > > > > > > > Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: > > >

[web2py] IS_IN_SET inside INPUT

2010-11-29 Thread CesarBustios
Hi, im trying to use the IS_IN_SET requirement in a form, i'm using: form = FORM('Campaña ', INPUT(_type='text', _name='name', requires=IS_IN_SET(['A', 'B', 'C'])), INPUT(_type='submit')) I'm not sure this is the right code, can you help me out please? Thanks!

Re: [web2py] Re: Questions about sets

2010-11-20 Thread CesarBustios
Did you try converting the Field to string? str(db4.data_table.ReqTime).split(".")[0] Lorin Rivers ha escrito: > What about using a function? I need run db.table.field through split (the > time part has too many decimal places) and then convert from string to time > > Here's what I tried: > db4(

[web2py] Re: Catch IntegrityError

2010-11-20 Thread CesarBustios
the traceback? > > On Nov 19, 5:52 pm, CesarBustios wrote: > > Hi! Please, how can i catch IntegrityError im trying with "from pyodbc > > import IntegrityError" but is not working. > > > > Thanks!

[web2py] Catch IntegrityError

2010-11-19 Thread CesarBustios
Hi! Please, how can i catch IntegrityError im trying with "from pyodbc import IntegrityError" but is not working. Thanks!

[web2py] Re: Create TRs dinamically in a FORM

2010-11-15 Thread CesarBustios
Nevermind, list comprehensions worked for me!!! Thank you all :) On 15 nov, 13:23, CesarBustios wrote: > Ok, i did this (Kennnet way): > > >           cellpadding="0" cellspacing="0"> >             {{for imagen in imagenes:}} >                

[web2py] Re: Create TRs dinamically in a FORM

2010-11-15 Thread CesarBustios
m.accepts(request): >         response.flash=str([form.vars[name] for name in fields]) >     return dict(form=form) > > On Nov 15, 11:46 am, CesarBustios wrote: > > > > > > > > > Wow thanks guys, iĺl try and let you know :) > > > On 15 nov, 12:39, I

[web2py] Re: Create TRs dinamically in a FORM

2010-11-15 Thread CesarBustios
Wow thanks guys, iĺl try and let you know :) On 15 nov, 12:39, Ivan Matveev wrote: > Maybe WebGrid(http://web2pyslices.com/main/slices/take_slice/39) can > help you? I didn't use it but it says that it lets you build a table > that supports paging, sorting, editing and totals easily. > > Or you c

[web2py] Create TRs dinamically in a FORM

2010-11-15 Thread CesarBustios
Hi! I want to create a FORM using TABLE but i need to create TR's depending of the number of Rows in a query, for example if the query returned 3 rows i need something like: FORM(TABLE( TR(..) TR(..) TR(..) )) I want to do this dinamically... Any thoughts? Thanks!

[web2py] Re: Help with "No such file or directory" error

2010-11-12 Thread CesarBustios
shutil.copy(source,dist) > > On Nov 11, 4:38 pm, CesarBustios wrote: > > > > > > > > > shutil.copy("uploads/Image.image.a278723.jpg", "uploads/ > > advertisement.jpg") > > > I need the correct path, is it the whole path /hom

[web2py] Re: Help with "No such file or directory" error

2010-11-11 Thread CesarBustios
shutil.copy("uploads/Image.image.a278723.jpg", "uploads/ advertisement.jpg") I need the correct path, is it the whole path /home/cesar/web2py/ applications/bluetooth/uploads/image1.jpg i tried different ways but im still getting that error. On 11 nov, 17:36, CesarBustios

[web2py] Re: Help with "No such file or directory" error

2010-11-11 Thread CesarBustios
tion must be different filenames. > > On Nov 11, 4:12 pm, CesarBustios wrote: > > > > > path and destination are in fact the same directory (uploads) i'm just > > trying to make a copy. > > > Thanks > > > On 11 nov, 11:12, mdipierro wrote: >

[web2py] Re: Help with "No such file or directory" error

2010-11-11 Thread CesarBustios
path and destination are in fact the same directory (uploads) i'm just trying to make a copy. Thanks On 11 nov, 11:12, mdipierro wrote: > what are path and destination? > > On Nov 11, 9:20 am, CesarBustios wrote: > > > > > I'm using the whole path, i'm

[web2py] Re: Help with "No such file or directory" error

2010-11-11 Thread CesarBustios
I'm using the whole path, i'm trying everything but i can't copy the file. Any thoughts? On 10 nov, 20:18, CesarBustios wrote: > Hi, i'm trying to make a copy of an image inside my "uploads" folder. I > ´m using the shutil module: > > import shutil >

[web2py] Help with "No such file or directory" error

2010-11-10 Thread CesarBustios
Hi, i'm trying to make a copy of an image inside my "uploads" folder. I ´m using the shutil module: import shutil shutil.copy(path, destination) But i get "No such file or directory" error. Can anyone tell me the correct path if my project is inside: /home/user/web2py/applications/ myproject/uplo

[web2py] Re: Confirmation message in SQLFORM

2010-11-09 Thread CesarBustios
Oh! I think i have to read the whole book before asking questions xD Thanks man! On Nov 9, 9:47 pm, DenesL wrote: > Hi Cesar, > > that is the default > behaviourhttp://web2py.com/book/default/chapter/10#Confirmation-on-Delete > > On Nov 9, 8:41 pm, CesarBustios wrote: &g

[web2py] Confirmation message in SQLFORM

2010-11-09 Thread CesarBustios
Hi, after clicking the submit button (when deleting), is there a way to send a confirmation message like saying "Are you sure man, really really sure???" or something like that? Thanks!

[web2py] Re: Password Field it's not encrypting :(

2010-11-07 Thread CesarBustios
It works just fine! :D On Nov 7, 8:03 pm, CesarBustios wrote: > Thank you mr.freeze i'll try that! > > On Nov 7, 6:54 pm, "mr.freeze" wrote: > > > > > > > > > There is a validator called CRYPT that will do it for > > you.http://web2py

[web2py] Re: Password Field it's not encrypting :(

2010-11-07 Thread CesarBustios
Thank you mr.freeze i'll try that! On Nov 7, 6:54 pm, "mr.freeze" wrote: > There is a validator called CRYPT that will do it for > you.http://web2py.com/book/default/docstring/CRYPT > > On Nov 7, 4:32 pm, CesarBustios wrote: > > > > > > > >

[web2py] Password Field it's not encrypting :(

2010-11-07 Thread CesarBustios
Hi! I wrote the following: db.define_table('User', Field(...), Field(...), Field('pass', 'password', requires=IS_NOT_EMPTY(error_message='Campo obligatorio'), label='Contraseña')) But when i look at the inserted row the passw

[web2py] Re: Help with picture default

2010-11-07 Thread CesarBustios
Thanks a lot! I'll try both :) On Nov 6, 3:25 pm, Branko Vukelic wrote: > On Sat, Nov 6, 2010 at 7:32 AM, CesarBustios wrote: > > Hi, please in my database i have an 'upload' type Field and i want to > > make some picture ('pic.jpg') the default picture w

[web2py] Re: Help with picture default

2010-11-06 Thread CesarBustios
Oh no it's not working! =( On 6 nov, 08:39, CesarBustios wrote: > Thanks a lot Mr. Massimo you save my life :) I love web2py by the > way! > > On 6 nov, 02:41, mdipierro wrote: > > > > > This should do it. > > > db.define

[web2py] Re: Help with picture default

2010-11-06 Thread CesarBustios
re(open('path/ > pic.jpg','rb')) > > On Nov 6, 1:32 am, CesarBustios wrote: > > > > > Hi, please in my database i have an 'upload' type Field and i want to > > make some picture ('pic.jpg') the default picture when th

[web2py] Help with picture default

2010-11-06 Thread CesarBustios
Hi, please in my database i have an 'upload' type Field and i want to make some picture ('pic.jpg') the default picture when the form load, how can i do that??? I really hope you can help me out, Thank you!