Re: [web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-18 Thread Curiouslearn
Thank you, Villas and Cliff. Cliff, I will definitely look up on the topic of MySQL injection attacks. Does using DAL better protect me against such attacks? Thank you. On Fri, Aug 17, 2012 at 5:17 PM, Cliff Kachinske cjk...@gmail.com wrote: curiouslearn I agree it's a good idea to learn as

Re: [web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-18 Thread Anthony
Cliff, I will definitely look up on the topic of MySQL injection attacks. Does using DAL better protect me against such attacks? The DAL automatically protects against SQL injection. You can do it on your own as well. Note, the DAL is needed for SQLFORMs, Auth, and SQLFORM.grid. The DAL

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-17 Thread pbreit
I suppose you could use URL(a=??) in order to share those files across apps although I think that's fairly uncommon. I find that I learn SQL even as I use DAL. But if you still do want to use raw SQL you can use the DAL's db.executesql() function. But you lose a ton of DAL functionality. --

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-17 Thread weheh
CSS belongs under static. Packages and common routines belong under modules and are imported. You could have a common static and modules and symbolically link. I have never done that, but it makes sense. I suppose you could also put the CSS just about anywhere on the file system. And modules

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-17 Thread curiouslearn
Thanks pbreit and weheh. I looked at the link give by pbreit. It says the following: applications requiring site-packages are not portable unless these modules are installed separately. What exactly does it mean they are not portable? For example, as of now my application which lives in a

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-17 Thread villas
I guess it is referring to the packing/installation of *.w2p files via the admin interface. Only files under the app's dir would be packed, therefore site-packages would have to be installed outside that mechanism. By using Dropbox you are not relying on the admin interface for the

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-17 Thread Cliff Kachinske
curiouslearn I agree it's a good idea to learn as much as you can about the underlying database. That said, you need to learn about sql injection and perhaps other MySQL attack vectors before making your application public. See, for example xkcd.com/327/ On Friday, August 17, 2012 12:17:48

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-16 Thread pbreit
I guess site-packages: http://web2py.com/books/default/chapter/29/4?search=site-packages But why oh why aren't you using DAL? --

[web2py] Re: Where should I put functions that are useful/common to muliple applications?

2012-08-16 Thread curiouslearn
Hello pbreit, Thanks, I will look into that. After posting I realized, I have the same question for css style files and js files. Where can I store those? Can I just store them in one application, and call them using URL() function? Is that the best way, or is there something better? I am new