[web2py] Re: Need help with datatable

2010-05-19 Thread annet
Hi Sverre, I have a cms application in which I use dataTables. In the view I have something like: td {{=A('update/delete',_onmouseover=this.style.cursor='pointer';, _href=URL(r=request,f='update_nfa',args=[record.nfa.id]))}} /td ... and in the corresponding function:

[web2py] Re: Need help with datatable

2010-05-19 Thread Sverre
Many thanks for this!

[web2py] Re: expire_sessions.py and cron

2010-05-19 Thread mdipierro
You can but you can also modify expire_sessions.py EXPIRATION_MINUTES=60 import os, time, stat for app in ['admin','init','examples','welcome']: # add yours path=os.path.join(request.folder,'..',app,'sessions') if not os.path.exists(path): os.mkdir(path) now=time.time() for

[web2py] Re: Using regular DAL API to delete users in auth_user table. Bad idea?

2010-05-19 Thread mdipierro
Sorry. Not blocked but disabled On May 18, 4:59 pm, mdipierro mdipie...@cs.depaul.edu wrote: We will add API to delete users and groups but it is safe to do it manually. You can also block users by putting blocked in the user registration_key On May 18, 4:35 pm, Magnitus

[web2py] inline SVG images with response.download(request,db)

2010-05-19 Thread selecta
I want to display an image like is is described in the image blog example from the book, however it does not work since the SVG image is returned as a download not an inline image. I know that this default option is good for some browsers but in my application I want the SVG to appear as an image

[web2py] Re: inline SVG images with response.download(request,db)

2010-05-19 Thread selecta
ok I asked to fast IMG(_width = 200px, _src = URL(request.application, 'default/ download_show', model.graph)) def download_show(): return response.download(request,db, attachment=False) solved it On May 19, 12:45 pm, selecta gr...@delarue-berlin.de wrote: I want to display an image like

[web2py] How to send an URL() from a view to a controller?

2010-05-19 Thread Sverre
I want to implement a function to back to previous page. For example from documents back to device or from documents back to workorder. So I have to send an url from the device view or the workorder view to the controller of the documents, to implement this functionality. I tried to put the

[web2py] Re: Display reference fields in read-only form

2010-05-19 Thread mdipierro
For me this works db.define_table('person', Field('name'), format = %(name)s, ) db.define_table('contributers', Field('person', db.person), # requires not necessary ) def edit_contributer(): db.contributers.person.writable = False record =

[web2py] Re: How to send an URL() from a view to a controller?

2010-05-19 Thread Sverre
I use now session for this.

Re: [web2py] MySQL failure to connect

2010-05-19 Thread Alexandre Andrade
the correct driver is not python-mysql, but mysqldb. 2010/5/18 Avik Basu avikb...@gmail.com Hello, I am having some trouble connecting to a MySQL server running on my local machine (Macbook Pro running Snow Leopard with My SQL 5.1.46). I use the following connection string: db =

[web2py] Re: Sending html emails [bug?]

2010-05-19 Thread PanosJee
Hmmm no solution works for me We use the latese web2py version I tries the solution of Alexander but wihout any success (i also tried the solution of Thadeus but GAE just died without any log!) On 19 Μάϊος, 01:02, mdipierro mdipie...@cs.depaul.edu wrote: This message=[None,messagehtml]

[web2py] Re: Sending html emails [bug?]

2010-05-19 Thread mdipierro
In gluon tools.py locate this code result = mail.send_mail(sender=self.settings.sender, to=to, subject=subject, body=text) and replace it with result = mail.send_mail(sender=self.settings.sender, to=to,

[web2py] Re: Sending html emails [bug?]

2010-05-19 Thread PanosJee
i was about to post that! it s a gae problem i ll try to do the same as off gae (sending the payload) On 19 Μάϊος, 15:43, mdipierro mdipie...@cs.depaul.edu wrote: In gluon tools.py locate this code                 result = mail.send_mail(sender=self.settings.sender, to=to,                    

[web2py] Re: Sending html emails [bug?]

2010-05-19 Thread PanosJee
Just fixed it tools.py 437 result = mail.send_mail(sender=self.settings.sender, to=to, subject=subject, body=text, html=html) On 19 Μάϊος, 15:43, mdipierro mdipie...@cs.depaul.edu wrote: In gluon tools.py locate this code                 result =

[web2py] Re: Sending html emails [bug?]

2010-05-19 Thread mdipierro
moving to trunk! Thanks. ;-) On May 19, 7:53 am, PanosJee panos...@gmail.com wrote: Just fixed it tools.py 437 result = mail.send_mail(sender=self.settings.sender, to=to,                                         subject=subject, body=text, html=html) On 19 Μάϊος, 15:43, mdipierro

[web2py] CRUD read or OneToOne

2010-05-19 Thread greenpoise
Hi there. I am a bit stuck here. ANy help greatly appreciated. I have this: @auth.requires_login() def crear_project_location(): project_id=request.args(0) project=db.project[project_id] if project: db.project_location.project.default=project_id

[web2py] Re: CRUD read or OneToOne

2010-05-19 Thread mdipierro
I think you want to replace form=crud.create(db.project_location) with location = db(db.project_location.project==project_id).select().first() form=crud.update(db.project_location,location) if location is None, crud.update defaults to crud.create On May 19, 8:57 am,

[web2py] Re: CRUD read or OneToOne

2010-05-19 Thread annet
I want the user to click on the link and if there is already a project _location for a project then just display it (crud.read), if the project has no location associated, then it will give me crud.write. I know it must be simple but I cant figure it out. I am not sure I do understand your

[web2py] Re: CRUD read or OneToOne

2010-05-19 Thread greenpoise
that did it. That was simpler than what I thought. Thanks d On May 19, 10:32 am, mdipierro mdipie...@cs.depaul.edu wrote: I think you want to replace         form=crud.create(db.project_location) with         location = db(db.project_location.project==project_id).select().first()      

[web2py] Re: CRUD read or OneToOne

2010-05-19 Thread greenpoise
I did it the mdpierro way because just saw your post. Your way would have worked too. Exactly what I wanted. Thanks On May 19, 10:36 am, annet annet.verm...@gmail.com wrote: I want the user to click on the link and if there is already a project _location for a project then just display it

[web2py] Re: How to send an URL() from a view to a controller?

2010-05-19 Thread annet
I want to implement a function to back to previous page. Simply back to the previous page would be something like: td {{=A('back',_onmouseover=this.style.cursor='pointer';,_onclick=javascript:history.go(-1);)}} /td I am not sure but doesn't this: from documents back to device and from

[web2py] Re: MySQL failure to connect [SOLVED]

2010-05-19 Thread Avik Basu
Turns out I was not running from source. Thanks for your help! Avik On May 19, 7:53 am, Alexandre Andrade alexandrema...@gmail.com wrote: the correct driver is not python-mysql, but mysqldb. 2010/5/18 Avik Basu avikb...@gmail.com Hello, I am having some trouble connecting to a MySQL

[web2py] Is web2pyslices.com down?

2010-05-19 Thread MikeEllis
Haven't been able to reach it all morning. ping web2pyslices.com PING web2pyslices.com (76.73.68.69): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 Request timeout for icmp_seq 4 Request timeout for

Re: [web2py] Is web2pyslices.com down?

2010-05-19 Thread Timothy Farrell
http://downforeveryoneorjustme.com/web2pyslices.com On 5/19/2010 10:14 AM, MikeEllis wrote: Haven't been able to reach it all morning. ping web2pyslices.com PING web2pyslices.com (76.73.68.69): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for

[web2py] Re: Is web2pyslices.com down?

2010-05-19 Thread mr.freeze
Yep, my vps has been flaky the last two days. Should be back up soon. On May 19, 10:16 am, Timothy Farrell tfarr...@swgen.com wrote: http://downforeveryoneorjustme.com/web2pyslices.com On 5/19/2010 10:14 AM, MikeEllis wrote: Haven't been able to reach it all morning. ping

[web2py] Re: Sending html emails [bug?]

2010-05-19 Thread mdipierro
I made a change that should allow attachments to work on GAE. Can you check it does not break the regular mail on GAE? On May 19, 8:00 am, mdipierro mdipie...@cs.depaul.edu wrote: moving to trunk! Thanks. ;-) On May 19, 7:53 am, PanosJee panos...@gmail.com wrote: Just fixed it tools.py

[web2py] Re: Is web2pyslices.com down?

2010-05-19 Thread mr.freeze
Back up now. On May 19, 10:20 am, mr.freeze nat...@freezable.com wrote: Yep, my vps has been flaky the last two days. Should be back up soon. On May 19, 10:16 am, Timothy Farrell tfarr...@swgen.com wrote: http://downforeveryoneorjustme.com/web2pyslices.com On 5/19/2010 10:14 AM, MikeEllis

[web2py] Re: How to set multiple primary key?

2010-05-19 Thread drayco
Thank's a lot Nico de Groot. It worked for me too even with mysql. On 18 mayo, 07:24, Nico de Groot ndegr...@chello.nl wrote: Hi Denes, I got the same syntax error (SyntaxError: invalid table account attribute: sequence_name ) when using a legacy database (by specifying the primarykey in

[web2py] Re: How to set multiple primary key?

2010-05-19 Thread drayco
Thank's a lot Nico de Groot. It worked for me too even with mysql. On 18 mayo, 07:24, Nico de Groot ndegr...@chello.nl wrote: Hi Denes, I got the same syntax error (SyntaxError: invalid table account attribute: sequence_name ) when using a legacy database (by specifying the primarykey in

[web2py] Re: How to set multiple primary key?

2010-05-19 Thread drayco
Thank's a lot Nico de Groot. It worked for me too even with mysql. On 18 mayo, 07:24, Nico de Groot ndegr...@chello.nl wrote: Hi Denes, I got the same syntax error (SyntaxError: invalid table account attribute: sequence_name ) when using a legacy database (by specifying the primarykey in

[web2py] Re: expire_sessions.py and cron

2010-05-19 Thread annet
Massimo, Thank you very much for providing me with this code, problem solved. Kind regards, Annet.

[web2py] Auth.profile() allow change email used as username

2010-05-19 Thread kachna
Hi, I have problem with Atuh.profile(). It allows user to change his/her email. My app uses email as username. So user is able to chage username and I lose verified contact to them. So, I thing that here is needed posibility to disable changing email in profile or confirm profile changes via email

[web2py] Re: Auth.profile() allow change email used as username

2010-05-19 Thread mdipierro
On May 19, 12:09 pm, kachna petr.marti...@gmail.com wrote: Hi, I have problem with Atuh.profile(). It allows user to change his/her email. My app uses email as username. So user is able to chage username and I lose verified contact to them. good point. Try db.auth_user.email.writable=False

[web2py] Re: web2py 1.78.2

2010-05-19 Thread ptressel
On May 18, 6:31 am, mdipierro mdipie...@cs.depaul.edu wrote: Please use 1.78.3 For those of us who have it checked out from launchpad, that's rev 1900, no? Thanks! -- Pat

[web2py] DIV.elements(...) question

2010-05-19 Thread Ian Reinhart Geiser
Greetings, is there a technical reason why DIV.elements makes a copy of the elements that it returns? The reason I am asking is because I am making a minor change to it to allow it to call children's elements() method. This way I can overload the elements() method in those children. The reason

[web2py] Re: web2py 1.78.2

2010-05-19 Thread Yarko Tymciurak
On May 19, 7:59 am, ptressel ptres...@myuw.net wrote: On May 18, 6:31 am, mdipierro mdipie...@cs.depaul.edu wrote: Please use 1.78.3 For those of us who have it checked out from launchpad, that's rev 1900, no? Good point: looking at http://code.google.com/p/web2py/source/browse/.hgtags,

[web2py] Re: Problem mit db Feld. DataError: String or BLOB exceeded size limit

2010-05-19 Thread DenesL
default length for text is 512 but you can override it with Field('xyz','text',length=1000) for example. On May 18, 6:15 am, Berti p...@berci.net wrote: I try the Body of an email message in a SQLite3 database Box insert. However, there is the message Data Error: String or BLOB exceeded

[web2py] Re: DIV.elements(...) question

2010-05-19 Thread mdipierro
It makes a copy of the list of components (shallowcopy), not a deepcopy. that means that it returns a new list but the objects in there should still be references to the original helpers and you can modify them. Does this cause unexpected behaviour? If so can you post an example? Perhaps we can

[web2py] Re: web2py 1.78.2

2010-05-19 Thread mdipierro
yes On May 19, 7:59 am, ptressel ptres...@myuw.net wrote: On May 18, 6:31 am, mdipierro mdipie...@cs.depaul.edu wrote: Please use 1.78.3 For those of us who have it checked out from launchpad, that's rev 1900, no? Thanks! -- Pat

[web2py] creating background process with multiprocessing spawns new instance of web2py

2010-05-19 Thread amoygard
Hi, I'm pretty new to web2py and web application frameworks. I'm trying to create a new background process in controller to handle incoming ajax data from a user. I'm using the module multiprocessing for this. However, when I start the new process, a new instance of web2py server is started? I'm

[web2py] Re: web2py 1.78.2

2010-05-19 Thread mdipierro
Sorry, I am pushing the new tags now. On May 19, 1:54 pm, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On May 19, 7:59 am, ptressel ptres...@myuw.net wrote: On May 18, 6:31 am, mdipierro mdipie...@cs.depaul.edu wrote: Please use 1.78.3 For those of us who have it checked out from

[web2py] Re: creating background process with multiprocessing spawns new instance of web2py

2010-05-19 Thread Yarko Tymciurak
On May 19, 2:14 pm, amoygard amoyg...@gmail.com wrote: Hi, I'm pretty new to web2py and web application frameworks. I'm trying to create a new background process in controller to handle incoming ajax data from a user. You are trying to do too much: remember: the web is stateless --- when

Re: [web2py] Re: DIV.elements(...) question

2010-05-19 Thread Ian Reinhart Geiser
Oh no, it works exactly as i expect. I was just wondering because I was changing the implementation and did not want to change the behavior. Well no changes other than to call the specialized version of .elements(...) Here is the change I have added so far: def elements(self, *args,

[web2py] Re: DIV.elements(...) question

2010-05-19 Thread mdipierro
Please email it to me as an attachment with a one paragraph explanation in the code itself about what you changed. On May 19, 3:05 pm, Ian Reinhart Geiser ian.gei...@gmail.com wrote: Oh no, it works exactly as i expect.  I was just wondering because I was changing the implementation and did not

[web2py] no comment

2010-05-19 Thread mdipierro
http://yro.slashdot.org/story/10/05/19/0028251/Microsoft-Sues-Salesforcecom-Over-Patents Two of the patents in question are a 'system and method for providing and displaying a Web page having an embedded menu' and a 'method and system for stacking toolbars in a computer display.

[web2py] Re: Using regular DAL API to delete users in auth_user table. Bad idea?

2010-05-19 Thread Magnitus
Yeah, thats a solution and the best one for a temporary ban (if a user uses strong language for example). However, I prefer deleting it if, for example, a user abandons his account as the unsused accounts will just cram the database and make queries to the auth_user table slower than they need to

[web2py] Re: no comment

2010-05-19 Thread Ian Reinhart Geiser
I wonder if they will sue every user of YUI and other JS toolkits? On May 19, 4:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://yro.slashdot.org/story/10/05/19/0028251/Microsoft-Sues-Salesfo... Two of the patents in question are a 'system and method for providing and displaying a Web

[web2py] unique id (=postgresql serial) is uuid need?

2010-05-19 Thread Jean Guy
Hi, Not sure, I understand uuid the correct way... Do I have to use uuid to ensure that my id will be unique : postgresql serial Thanks Jonhy

[web2py] SQL support for Google App Engine

2010-05-19 Thread blackthorne
Seems that a feature request will see its light: http://goo.gl/pO15

[web2py] DIV._fixup question

2010-05-19 Thread Ian Reinhart Geiser
Hi, it seems DIV._fixup(...) is only run in the constructor. For sanity wouldn't it make sense to have this functionality happen every time you append an element? The only reason I ask is from a consistent api point of view.

[web2py] Re: SSL is OFF error message when starting the server

2010-05-19 Thread OMAR
Tim, thanks for the speedy reply. Sorry to say I'm still stuck. I downloaded the ssl1.5 package and unpacked it. I figured the next step would be, python setup.py install Here was the output: looking for /usr/include/openssl/ssl.h looking for /usr/local/ssl/include/openssl/ssl.h looking for

[web2py] Re: creating background process with multiprocessing spawns new instance of web2py

2010-05-19 Thread amoygard
Thanks for the answer - I was aware that I don't have to do this to handle ajax requests in general. The application I'm building needs to send and receive a sequence of messages from the client in a specific order, so I thought it would be easier to handle it in one thread/ process. It is however

[web2py] Re: creating background process with multiprocessing spawns new instance of web2py

2010-05-19 Thread Yarko Tymciurak
On May 19, 5:41 pm, amoygard amoyg...@gmail.com wrote: Thanks for the answer - I was aware that I don't have to do this to handle ajax requests in general. The application I'm building needs to send and receive a sequence of messages from the client in a specific order, so I thought it would

[web2py] Re: SQL support for Google App Engine

2010-05-19 Thread mdipierro
good. They got it. On May 19, 4:13 pm, blackthorne francisco@gmail.com wrote: Seems that a feature request will see its light:http://goo.gl/pO15

[web2py] Re: DIV._fixup question

2010-05-19 Thread mdipierro
I need to look into this... On May 19, 4:26 pm, Ian Reinhart Geiser ian.gei...@gmail.com wrote: Hi, it seems DIV._fixup(...) is only run in the constructor.  For sanity wouldn't it make sense to have this functionality happen every time you append an element?  The only reason I ask is from a

[web2py] Re: Auth.profile() allow change email used as username

2010-05-19 Thread kachna
I have try it. In update it works fine but it is impossible to fill in email in registration.There is read only field too. On 19 kvě, 20:15, mdipierro mdipie...@cs.depaul.edu wrote: On May 19, 12:09 pm, kachna petr.marti...@gmail.com wrote: Hi, I have problem with Atuh.profile(). It allows

[web2py] Re: SSL is OFF error message when starting the server

2010-05-19 Thread mdipierro
As Tim said you need this module http://pypi.python.org/pypi/ssl/ not openssl On May 19, 5:30 pm, OMAR uncle...@gmail.com wrote: Tim, thanks for the speedy reply. Sorry to say I'm still stuck. I downloaded the ssl1.5 package and unpacked it. I figured the next step would be, python

[web2py] Re: new in Django

2010-05-19 Thread Pepe
Thadeus, What is your problem with designers, men? I'm designer and use web2py because i don't like django... I've learnt to programming in my school and my partners (today doctors, lawyers, biochemicals) know to programming too (the logic, obviously, I'm sure they forget all the rest, haha!),