[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: 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 kenneth.t.lundst...@gmail.com 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] Re: Help with Database

2010-12-10 Thread CesarBustios
Thanks! :) On Dec 10, 4:36 am, Kenneth Lundström kenneth.t.lundst...@gmail.com 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,

[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!

[web2py] Re: IS_IN_SET inside INPUT

2010-11-29 Thread CesarBustios
: The IS_IN_SET looks good, but 'Campana' is not an HTML element. On Nov 29, 3:50 pm, CesarBustios cesarbust...@gmail.com wrote: 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

[web2py] Re: Catch IntegrityError

2010-11-20 Thread CesarBustios
? On Nov 19, 5:52 pm, CesarBustios cesarbust...@gmail.com wrote: Hi! Please, how can i catch IntegrityError im trying with from pyodbc import IntegrityError but is not working. 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:

[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] 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: 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 imatvee...@gmail.com 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

[web2py] Re: Create TRs dinamically in a FORM

2010-11-15 Thread CesarBustios
=SQLFORM.factory(*[Field(name) for name in fields]))     if form.accepts(request):         response.flash=str([form.vars[name] for name in fields])     return dict(form=form) On Nov 15, 11:46 am, CesarBustios cesarbust...@gmail.com wrote: Wow thanks guys, iĺl try and let you know :) On 15 nov

[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 cesarbust...@gmail.com wrote: Ok, i did this (Kennnet way): form enctype=multipart/form-data action=activar method=post           table style=text-align: center; width: 100%; border=0 cellpadding

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

2010-11-12 Thread CesarBustios
(source,dist) On Nov 11, 4:38 pm, CesarBustios cesarbust...@gmail.com wrote: 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

[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 cesarbust...@gmail.com wrote: 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

[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 mdipie...@cs.depaul.edu wrote: what are path and destination? On Nov 11, 9:20 am, CesarBustios cesarbust...@gmail.com wrote: I'm using the whole path, i'm

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

2010-11-11 Thread CesarBustios
. On Nov 11, 4:12 pm, CesarBustios cesarbust...@gmail.com 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 mdipie...@cs.depaul.edu wrote: what are path and destination? On Nov 11, 9:20 am

[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 cesarbust...@gmail.com

[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/

[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: 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 denes1...@yahoo.ca wrote: Hi Cesar, that is the default behaviourhttp://web2py.com/book/default/chapter/10#Confirmation-on-Delete On Nov 9, 8:41 pm, CesarBustios cesarbust

[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 bg.bra...@gmail.com wrote: On Sat, Nov 6, 2010 at 7:32 AM, CesarBustios cesarbust...@gmail.com 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

[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

[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 nat...@freezable.com 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 cesarbust...@gmail.com wrote: Hi! I wrote

[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 cesarbust...@gmail.com wrote: Thank you mr.freeze i'll try that! On Nov 7, 6:54 pm, mr.freeze nat...@freezable.com wrote: There is a validator called CRYPT that will do it for you.http://web2py.com/book/default/docstring/CRYPT

[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!

[web2py] Re: Help with picture default

2010-11-06 Thread CesarBustios
')) On Nov 6, 1:32 am, CesarBustios cesarbust...@gmail.com 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 the form load, how can i do that??? I really hope you can help me out, Thank you!- Ocultar texto

[web2py] Re: Help with picture default

2010-11-06 Thread CesarBustios
Oh no it's not working! =( On 6 nov, 08:39, CesarBustios cesarbust...@gmail.com wrote: Thanks a lot Mr. Massimo you save my life :) I love web2py by the way! On 6 nov, 02:41, mdipierro mdipie...@cs.depaul.edu wrote: This should do it. db.define_table('mytable', Field('picture