[web2py] sender's name in mail

2010-06-01 Thread Rohan
I want to add sender's name in emails. Currently I am able to send mails from ad...@example.com but sender's name is displayed as admin which is not conveying the proper information. Can I add senders' name to mail settings so that sender's name is displayed as Example Admin or XYZ instead of admin

[web2py] placeholder instead of image preview

2010-06-01 Thread annet
I have the following function: db.define_table('image', Field('company_id',db.company), Field('filename',writable=False,readable=False), Field('file',type='upload',default='',notnull=True,autodelete=True), migrate=False) The problem is that crud.update shows a placeholder for the i

[web2py] Re: dependent drop down list

2010-06-01 Thread Neveen Adel
Hello tracey, you will define your action in default.py as : def fun(): return #whatever then in index.html: $('#country_state').change(function(){ $.ajax( 'fun', ['country_state'],'id_of the second drop down' ) } Iceberg send the following link : http://web2py.com/book/default/

[web2py] Re: Invalid reset password

2010-06-01 Thread weheh
Massimo, now we're getting somewhere. Thanks. However, I ran into this error: Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 178, in restricted exec ccode in environment File "C:/web2py/applications/myapp/controllers/user.py", line 144, in File "C:\web2py\

[web2py] Re: Invalid reset password

2010-06-01 Thread weheh
I see in gluon/tools.py that reset_password has been deprecated and that retrieve_password will normally point to request_reset_password. Should I consider retrieve_password to be deprecated?

[web2py] Re: new download page

2010-06-01 Thread weheh
Nice shiny new download page. Also, I just tried the new install script from within the web2py admin app and it works great! Thanks for that -- makes upgrading installations much, much easier. That along will surely save your user base a lot of time, cumulatively.

[web2py] Re: Invalid reset password

2010-06-01 Thread mdipierro
use request_reset_password On Jun 1, 11:36 pm, weheh wrote: > I'm trying to get the retrieve_password functionality working. I've > done all the mail setup, but when I select the retrieve_password link, > I get a flash "Invalid reset password". I expected to get a form to > let me specify the tar

[web2py] Invalid reset password

2010-06-01 Thread weheh
I'm trying to get the retrieve_password functionality working. I've done all the mail setup, but when I select the retrieve_password link, I get a flash "Invalid reset password". I expected to get a form to let me specify the target email account. Any ideas what's going on?

Re: [web2py] Re: new stuff in trunk...

2010-06-01 Thread Miguel Goncalves
Paypal has multiple workflows and products. The simplest one is "*Website Payments Standard*" where you direct the user to the paypal website for payment. Not great for the user experience but workable and above all there is no monthly fee associated with it. Another version is "*Website Payment

[web2py] Re: VoltDB

2010-06-01 Thread mdipierro
Is there a python driver for it? On Jun 1, 1:02 pm, Oscar wrote: > Hi there, > > There is a new DBMS in the block, a new kind of DBMS. Plese > readhttp://cl.ly/1EO3for more information. > > Massimo, can you add support for it. it's worth. > > Best Regards, > > Oscar.

[web2py] Re: new stuff in trunk...

2010-06-01 Thread mdipierro
Both paypal and google require redirection to their sites. The workflow is more complex that needs to be. There is this: http://www.scribd.com/doc/30661771/Web2py-Paypal-Integration Massimo On Jun 1, 8:54 pm, Richard wrote: > would be great if web2py had a robust Paypal solution, which by > ex

[web2py] Re: VoltDB

2010-06-01 Thread Richard
stores data in memory? - my server couldn't handle the amount of data I store. On Jun 2, 4:20 am, Iceberg wrote: > Wow, "outperformed traditional OLTP database systems by a factor of > 45". That is awesome! > > Oscar wrote: > > Hi there, > > > There is a new DBMS in the block, a new kind of DBMS

[web2py] Re: new stuff in trunk...

2010-06-01 Thread Richard
would be great if web2py had a robust Paypal solution, which by extension would support credit cards too. Though maybe this is more difficult than it sounds - I know Django has not yet achieved this. Recently I signed up for a conference that used a Django registration system and the Paypal suppor

[web2py] Re: flawed architecture creating race condition for database writes

2010-06-01 Thread Richard
I am not sure how to do it through web2py, but if working directly with the GAE API you can set the entities "key_name" to avoid duplicates. On Jun 2, 1:21 am, Carl wrote: > tricky. > I'm deploying on GAE which may run my code across multiple servers so > locking isn't going to be an option. > >

[web2py] better object oriented Jquery modules

2010-06-01 Thread dspiteself
A great way to save time in defining Jquery modules in an extensible way. http://alexsexton.com/?p=51 An example using John Resigs simple Inhieritance. http://pastie.org/517177 A great way to get a better design for larger javascript projects.

Re: [web2py] Re: how to generate barcode label ?

2010-06-01 Thread Thadeus Burgess
jquery one froze my firefox too =( -- Thadeus On Tue, Jun 1, 2010 at 12:34 PM, Richard Shebora wrote: > This works fine for me offline... > > http://zbar.sourceforge.net/ > > Thanks, > Richard Shebora > > On Tue, Jun 1, 2010 at 1:18 PM, ceriox wrote: >> i generate barcode with this workarou

[web2py] Re: Possible bug in Rows.find and Rows.exclude

2010-06-01 Thread mr.freeze
Doh! Time for some espresso. I sent the patch over. On Jun 1, 4:28 pm, mdipierro wrote: > No because they never returns a Rows object. They return a record or > None if not found. I think they are coorect as they are. > > On Jun 1, 4:27 pm, "mr.freeze" wrote: > > > > > Will do. Do you think it s

[web2py] Re: Possible bug in Rows.find and Rows.exclude

2010-06-01 Thread mdipierro
No because they never returns a Rows object. They return a record or None if not found. I think they are coorect as they are. On Jun 1, 4:27 pm, "mr.freeze" wrote: > Will do. Do you think it should be the same for Rows.first and > Rows.last? They currently return None if the record set is empty.

[web2py] Re: Possible bug in Rows.find and Rows.exclude

2010-06-01 Thread mr.freeze
Will do. Do you think it should be the same for Rows.first and Rows.last? They currently return None if the record set is empty. On Jun 1, 4:25 pm, mdipierro wrote: > I agree. If you can send me a patch today, I will add it to 1.79.1 > > On Jun 1, 4:05 pm, "mr.freeze" wrote: > > > > > I think th

[web2py] Re: Possible bug in Rows.find and Rows.exclude

2010-06-01 Thread mdipierro
I agree. If you can send me a patch today, I will add it to 1.79.1 On Jun 1, 4:05 pm, "mr.freeze" wrote: > I think these functions should always return a Rows object, even if it > is empty.  Currently they return an empty list if the record set is > empty.  Thoughts?

[web2py] Possible bug in Rows.find and Rows.exclude

2010-06-01 Thread mr.freeze
I think these functions should always return a Rows object, even if it is empty. Currently they return an empty list if the record set is empty. Thoughts?

[web2py] Re: Image upload

2010-06-01 Thread mdipierro
or this: http://web2py.com/book/default/section/3/6 On Jun 1, 3:48 pm, NetAdmin wrote: > Here's another link > > http://web2py.com/book/default/section/7/2?search=upload > > On Jun 1, 1:51 pm, Aaron Crowe wrote: > > > I'm just getting started with web2py and I'm looking for a way for the > >

[web2py] Re: Decimal vs Float and Documentation

2010-06-01 Thread mdipierro
Before the model in the model file will do. On Jun 1, 3:39 pm, NetAdmin wrote: > In which file do I declare the class? > > Thanks to everyone for their answers. > > On Jun 1, 3:10 pm, mdipierro wrote: > > > There is no need to use SQLCustomType in this case. Decimal is > > supported by web2py ty

[web2py] Re: Image upload

2010-06-01 Thread NetAdmin
Here's another link http://web2py.com/book/default/section/7/2?search=upload On Jun 1, 1:51 pm, Aaron Crowe wrote: > I'm just getting started with web2py and I'm looking for a way for the > user to upload an image and have it stored in the database. Any > suggestions or links to relevant code

[web2py] Re: Image upload

2010-06-01 Thread NetAdmin
Here's some code form = SQLFORM(db.tbbooks, 4, upload=URL(r=request,f='download') ) Note... you can store images as BLOBS inside the database OR on the filesystem. On Jun 1, 1:51 pm, Aaron Crowe wrote: > I'm just getting started with web2py and I'm looking for a way for the > user to uplo

[web2py] Re: Decimal vs Float and Documentation

2010-06-01 Thread NetAdmin
In which file do I declare the class? Thanks to everyone for their answers. On Jun 1, 3:10 pm, mdipierro wrote: > There is no need to use SQLCustomType in this case. Decimal is > supported by web2py type='decimal(n,m)' if the underliying database > supports it. The problem is representation

[web2py] Re: Decimal vs Float and Documentation

2010-06-01 Thread mdipierro
There is no need to use SQLCustomType in this case. Decimal is supported by web2py type='decimal(n,m)' if the underliying database supports it. The problem is representation of the number. Try this: class IS_MYDECIMAL(IS_DECIMAL_IN_RANGE): def formatter(self,value): return '%.2f' % value an

Re: [web2py] Decimal vs Float and Documentation

2010-06-01 Thread Michal Jursa
Hi, decimal is not directly supported as it is not supported in some db engines, but you can use SQLCustomType. Example here: http://www.web2py.com/examples/static/epydoc/web2py.gluon.sql.SQLCustomType-class.html Michal NetAdmin wrote: 1. What is the best field choice for currency calculatio

Re: [web2py] Re: combine field validator IS_IN_DB

2010-06-01 Thread Jean Guy
Thank you, that works just fine! I would like to thank you also for Web2py Regards. Jonhy 2010/6/1 mdipierro > Two ways: > > > db.define_table('person', >SQLField('fname'), >SQLField('lname')) > db.define_table('dog', >SQLField('name')) > > db.define_table('ownership', >SQLFie

[web2py] Image upload

2010-06-01 Thread Aaron Crowe
I'm just getting started with web2py and I'm looking for a way for the user to upload an image and have it stored in the database. Any suggestions or links to relevant code would be appreciated.

Re: [web2py] Re: how to generate barcode label ?

2010-06-01 Thread Richard Shebora
This works fine for me offline... http://zbar.sourceforge.net/ Thanks, Richard Shebora On Tue, Jun 1, 2010 at 1:18 PM, ceriox wrote: > i generate barcode with this workaround > > 1) i install the barcode font > 2) i generate the code and with the view i show the code with barcode > font > > > >

[web2py] Re: combine field validator IS_IN_DB

2010-06-01 Thread mdipierro
Two ways: db.define_table('person', SQLField('fname'), SQLField('lname')) db.define_table('dog', SQLField('name')) db.define_table('ownership', SQLField('person', db.person), SQLField('dog', db.dog)) db.ownership.person.requires = IS_IN_DB(db,'person.id','%(fname)s % (lname)

[web2py] Re: calling a fuction from javascript (jquery)

2010-06-01 Thread pk
super thanks a lot ;) On 1 Jun., 20:48, Candid wrote: > For your example it's easier to use $.post: > > $.post("your_url", {naotext: naotext}) > > In NaoSpeak function on the server you can access naotext as > request.vars.naotext > > On Jun 1, 12:17 pm, pk wrote: > > > > > thanks, > > have you

[web2py] combine field validator IS_IN_DB

2010-06-01 Thread Jean Guy
Hello, I would like to know if there is a way to do that : db.define_table('person', SQLField('fname'), SQLField('lname')) db.define_table('dog', SQLField('name')) db.define_table('ownership', SQLField('person', db.person), SQLField('dog', db.dog)) db.ownership.person.requi

Re: [web2py] Problem with document uploading (not with common processing)

2010-06-01 Thread Thadeus Burgess
Add a third table named something like doc_links. So you have activity -- id name docpool --- id name data doc_links - id activity_id docpool_id Now in your form, you insert both (you will need a custom SQLFORM.factory for this). Submit each record, then create a do

[web2py] Re: calling a fuction from javascript (jquery)

2010-06-01 Thread Candid
For your example it's easier to use $.post: $.post("your_url", {naotext: naotext}) In NaoSpeak function on the server you can access naotext as request.vars.naotext On Jun 1, 12:17 pm, pk wrote: > thanks, > have you an example? > > On 1 Jun., 18:11, Thadeus Burgess wrote: > > > > > Add the var

[web2py] Decimal vs Float and Documentation

2010-06-01 Thread NetAdmin
1. What is the best field choice for currency calculations? I can't find any documentation on the DECIMAL field-type even though I saw Field('totalsale', 'decimal(10,2)'), while browsing google/groups. 2. Where should I look for the very latest documentation? I defined a field as DOUBLE, but du

[web2py] Re: how test if a table have record in a if statement ?

2010-06-01 Thread Iceberg
How come the syntax? I do not know that. I would use: if db(db.mytable.id>0).count(): On Jun2, 2:17am, ceriox wrote: > i need to test if a table are empty in if statement ... i try with: > > if db.Prestiti.id.count==0: >         vuoto='if ' >     else: >         vuoto='else '

[web2py] Re: VoltDB

2010-06-01 Thread Iceberg
Wow, "outperformed traditional OLTP database systems by a factor of 45". That is awesome! Oscar wrote: > Hi there, > > There is a new DBMS in the block, a new kind of DBMS. Plese read > http://cl.ly/1EO3 for more information. > > Massimo, can you add support for it. it's worth. > > Best Regards, >

[web2py] how test if a table have record in a if statement ?

2010-06-01 Thread ceriox
i need to test if a table are empty in if statement ... i try with: if db.Prestiti.id.count==0: vuoto='if ' else: vuoto='else ' it go under else in both cases (table Prestiti with no record or with record)

[web2py] VoltDB

2010-06-01 Thread Oscar
Hi there, There is a new DBMS in the block, a new kind of DBMS. Plese read http://cl.ly/1EO3 for more information. Massimo, can you add support for it. it's worth. Best Regards, Oscar.

Re: [web2py] Re: how to generate barcode label ?

2010-06-01 Thread Jason Brower
If your doing it locally and you want to use those older style barcodes, that could do just fine. Have fun! On Tue, 2010-06-01 at 10:18 -0700, ceriox wrote: > i generate barcode with this workaround > > 1) i install the barcode font > 2) i generate the code and with the view i show the code with

[web2py] Re: cancel button in update and create work differently [closed]

2010-06-01 Thread annet
Yes, you're right, I hadn't thought of that. Thanks for providing me with a better solution. Kind regards, Annet.

[web2py] Re: how to generate barcode label ?

2010-06-01 Thread ceriox
i generate barcode with this workaround 1) i install the barcode font 2) i generate the code and with the view i show the code with barcode font On 1 Giu, 19:04, ceriox wrote: > thanks for the help but i need to generate a barcode not a qr code and > without internet connection :( > > On 1 Giu

[web2py] Re: How to present status of other system by web2py?

2010-06-01 Thread Iceberg
In python? Yes. Python's built-in socket has udp support. But anyway you still need to feed the data into web2py if you want to use web2py as a front-end. Unfortunately your "other system" doesn't support HTTP output. BTW, you are from taiwan? I'm from China mainland. Nice to meet you here. On

[web2py] Re: how to generate barcode label ?

2010-06-01 Thread ceriox
thanks for the help but i need to generate a barcode not a qr code and without internet connection :( On 1 Giu, 15:32, Jason Brower wrote: > That's the one. :D But it doesn't work without an internet connection. > I needed it without internet. (Or a big brother.:P) > > On Tue, 2010-06-01 at 03:2

[web2py] Re: cancel button in update and create work differently [closed]

2010-06-01 Thread Iceberg
history.go(-1) will not work if the current page is the first page of current browser session. Will this help you? On Jun1, 8:00pm, annet wrote: > Setting the cancel button to: > > form[0][-1] > [1].append(INPUT(_type="button",_value="Cancel",_onclick='javascript:histor > y.go(-1);')) > > at

[web2py] Re: calling a fuction from javascript (jquery)

2010-06-01 Thread pk
thanks, have you an example? On 1 Jun., 18:11, Thadeus Burgess wrote: > Add the variable to the data declaration of the jquery.ajax method. > This will be passed along as a POST or GET and then your function just > looks at request.vars.naotext. > > -- > Thadeus > > > > On Tue, Jun 1, 2010 at 10

Re: [web2py] calling a fuction from javascript (jquery)

2010-06-01 Thread Thadeus Burgess
Add the variable to the data declaration of the jquery.ajax method. This will be passed along as a POST or GET and then your function just looks at request.vars.naotext. -- Thadeus On Tue, Jun 1, 2010 at 10:30 AM, pk wrote: > hi i need help, > > how can i call a function from jquery with par

[web2py] calling a fuction from javascript (jquery)

2010-06-01 Thread pk
hi i need help, how can i call a function from jquery with parameters for example: $('nao_speak').click(function(event){ event.preventDefault(); var naotext = $('naospeak').val(); $.ajax({ url: "{{=URL(r=request,c='speak',f='NaoSpeak')}}", naotext});   console.log

[web2py] Re: flawed architecture creating race condition for database writes

2010-06-01 Thread Carl
tricky. I'm deploying on GAE which may run my code across multiple servers so locking isn't going to be an option. I need to employ a completely different approach. I just need to find it :) On May 27, 7:00 pm, Iceberg wrote: > The bullet-proof solution should be setting twin-field primary key

Re: [web2py] Re: how to generate barcode label ?

2010-06-01 Thread Jason Brower
That's the one. :D But it doesn't work without an internet connection. I needed it without internet. (Or a big brother.:P) On Tue, 2010-06-01 at 03:24 -0700, kuba wrote: > http://www.web2py.com/appliances/default/show/51 >

[web2py] Problem with document uploading (not with common processing)

2010-06-01 Thread Sverre
The problem is I have 5 tables and each can have many documents per entity. I solved this with a table "docpool". For every new entity in one of the 5 tables I generate a docpool entity (only the ID) and put the docpool.id into the entity. Each document is linked by the docpool.id But now I have

Re: [web2py] Re: how to generate barcode label ?

2010-06-01 Thread Jason Brower
No, if your wanting to read that's another deal. If you make them and you have access to the net you could use googles API's. I however work with offline solutions and need other products. DMTX in linux reads and writes if I am no mistaken. I used Gstreamer with my web2py app to take a picture wit

[web2py] Re: new stuff in trunk...

2010-06-01 Thread mdipierro
good point. I was not aware of that. On Jun 1, 2:04 am, Richard wrote: > was looking around the Authorize docs and found: > "The merchant must have a U.S. based merchant bank > account"http://developer.authorize.net/guides/AIM/Introduction_to_AIM/AIM_Min...http://developer.authorize.net/guides/S

[web2py] Re: How to present status of other system by web2py?

2010-06-01 Thread dlin
Is it possible to have multi-thread in python to listen udp socket and just collect the status in ram instead of DB? On 5月31日, 上午11時46分, Iceberg wrote: > You can use web2py's cron feature to trigger a data collector, which > use "3. command line utility" you mentioned to gather data, insert > int

[web2py] Re: cancel button in update and create work differently [closed]

2010-06-01 Thread annet
Setting the cancel button to: form[0][-1] [1].append(INPUT(_type="button",_value="Cancel",_onclick='javascript:history.go(-1);')) at least gives the user a way to cancel the function, not the way I wanted it, but it's better than getting an error. Annet

[web2py] Re: crud problem [closed]

2010-06-01 Thread annet
> You can try replace > > if not response.init_flash: response.init_flash='Insert tagline' > > with > > response.init_flash='Insert tagline' That solved the problem, thanks. Annet.

[web2py] Re: crud question on multiple form layout [closed]

2010-06-01 Thread annet
After a lot of trial and error I figured out how to implement this, so subject closed. On May 24, 6:45 pm, annet wrote: > I have the following layout: > > > >   .header. >     >     >       >         .1. >       >       >         .2. >       >       >         .3. >       >     >   .foo

[web2py] Re: uploads problem

2010-06-01 Thread annet
In the cms application uploads folder I made this directory: company_443 In the function that contains the upload field I set: db.outerimage.image.uploadfolder=os.path.join(request.folder,"uploads/ company_%i" %auth.user.bedrijf_id) When I expose the function and upload an image it ends up in t

[web2py] Re: how to generate barcode label ?

2010-06-01 Thread kuba
http://www.web2py.com/appliances/default/show/51

[web2py] Re: Ticket when trying to upload an image

2010-06-01 Thread weheh
FWIW, the upload field is embedded in a jQuery accordion div. I was researching some other threads about image upload problems and noticed there was a jdiv problem. Could this be the same thing?

[web2py] Re: new stuff in trunk...

2010-06-01 Thread Richard
was looking around the Authorize docs and found: "The merchant must have a U.S. based merchant bank account" http://developer.authorize.net/guides/AIM/Introduction_to_AIM/AIM_Minimum_Requirements.htm http://developer.authorize.net/guides/SIM/Introduction_to_SIM/SIM_Minimum_Requirements.htm darn...