[web2py] Problem with routing

2012-12-25 Thread elyase
I have two controllers 'default.py' and 'error.py'. In my website 
www.cubadena.com, if I try to access www.cubadena.com/default it correctly 
redirects to the index() function inside the default controller, but if I 
do the same with www.cubadena.com/error/ I get a: 

Not FoundThe requested URL /error/ was not found on this server.

Looking at the server logs I see a Attempt to serve directory: 
/var/www/error/ error. How is this possible? I have both controller files 
inside the web2py controller folder, and corresponding index.html files 
inside a 'default' and 'error' folders in the application views folder. 
Another curious thing is that if I add the application name to the URL it 
works as expected for example: www.cubadena.com/cubadena/error (works!!)

This is how my web2py routes.py looks like:

routers = dict(
BASE=dict(default_application='cubadena'),
cubadena=dict(languages=['en', 'es'], default_language='es'),
)

routes_onerror = [(r'*/*', r'/cubadena/error/index')]

What can I do to correct this behaviour?

-- 





[web2py] Re: Web2Py on OpenShift

2012-12-03 Thread elyase
thanks a lot Andrew

On Saturday, December 1, 2012 1:58:28 AM UTC+1, Andrew wrote:

 FYI - I've finally gotten some time to update the repo to 2.2.1

 For those interested, give it a test and report any issues in the github 
 project issue currently opened for 2.2.1 

 As I get time I'm going to try and integrate upgrades via Jenkins so 
 people don't have to wait on me all the time.

 On Friday, June 8, 2012 10:07:39 AM UTC-5, Andrew wrote:

 Just FYI to anyone interested, I've put together a web2py template for 
 OpenShift https://openshift.redhat.com/app/ (Red Hat's Opensource 
 PaaS). 

 You can find it here: - 
 https://github.com/prelegalwonder/openshift_web2py

 I've also put together a basic openshift deployer from the admin page, 
 and you can grab the changes from my fork of web2py - 
 https://github.com/prelegalwonder/web2py
 It's just 3 files in the admin app:
  controllers/openshift.py
  views/openshift/deploy.html
 and a modification to views/default/site.html

 It's only requirement to work beyond having a local working openshift 
 project is GitPython installed and accessible from the runtime that web2py 
 is running in.

 So you can either run the admin app in the cloud and access it directly 
 or run a local web2py instance and execute the deployer when you want to 
 test out your changes. 

 I'm working on a detailed blog that I intent to submit to the OpenShift 
 team so they can put it on their site for getting started. 

 Enjoy



-- 





[web2py] Re: web2py static folder

2012-12-03 Thread elyase
Well if I am uploading my whole my static folder to cloudfront I wouldn't 
like to have to manually change all my url links for every image, css, js 
file in there, I know in Django you just change the static_url location in 
the settings, isn't there something similar in Web2py?

On Thursday, November 29, 2012 10:44:38 AM UTC+1, Niphlod wrote:

 instead of using URL('static', 'css/mycss.css') you use 
 http://cnd.cloudfront.com/whatever/mycss.css 

 On Wednesday, November 28, 2012 10:33:39 PM UTC+1, elyase wrote:

 What is the way to go if one wants to distribute the static content via 
 Cloudfront CDN? I use Openshift and mod_proxy is there deactivated becasue 
 of performance issues so I guess I cant rewrite URLs at the server level. 
 How can I then change in Web2py the location of the static folder to a 
 Cloudfront distribution?



-- 





[web2py] web2py static folder

2012-11-28 Thread elyase
What is the way to go if one wants to distribute the static content via 
Cloudfront CDN? I use Openshift and mod_proxy is there deactivated becasue 
of performance issues so I guess I cant rewrite URLs at the server level. 
How can I then change in Web2py the location of the static folder to a 
Cloudfront distribution?

-- 





[web2py] web2py appliance not working

2012-11-09 Thread elyase
Can some one tell if the eStore example appliance is working for you? 

https://github.com/mdipierro/web2py-appliances/tree/master/EStoreExample

In web2py 2.1.1 the products don't get listed, I get an invalid SQL error.

-- 





[web2py] Re: web2py 2.1.1 is OUT!

2012-10-22 Thread elyase
Sorry i have this same problem(on mac) and i am pretty sure I have 
distutils installed, how can I troubleshoot?

On Wednesday, October 17, 2012 11:30:33 PM UTC+2, Massimo Di Pierro wrote:

 The line is:

 from distutils import dir_util

 I think you need to install distutils separately.


 On Tuesday, 16 October 2012 09:14:47 UTC-5, apps in tables wrote:

 when i click on deploy to openshift , I get the error :

   cannot import name dir_util

 On Tuesday, October 16, 2012 2:17:43 PM UTC+3, Massimo Di Pierro wrote:

 As far as I know it works but I will say experimental until more 
 people have tried it.

 On Tuesday, 16 October 2012 04:07:37 UTC-5, apps in tables wrote:

 Thanks...

 is deploy to openshift experimental?

 On Tuesday, October 16, 2012 4:04:36 AM UTC+3, Massimo Di Pierro wrote:

 The book is now kind of in between versions it is correct but some 
 of the new features are not described and some example use old API while 
 there is a better way. I plan to finish update it and release the 5th 
 editions within one month. Hopefully sooner.

 On Monday, 15 October 2012 20:01:33 UTC-5, apps in tables wrote:


 Fantastic.as usual.

 tiny hint: 
 can the book title be more descriptive of the related version of 
 web2py ?


 On Monday, October 15, 2012 8:30:42 PM UTC+3, martzi wrote:

 Many thanks Massimo web2py is here to stay !

 On Monday, October 15, 2012 1:55:39 PM UTC+2, Massimo Di Pierro 
 wrote:

 Changelog:

 - overall faster web2py
 - when apps are deleted, a w2p copy left in deposit folder
 - change in cron (it is now disabled by default). removed -N option 
 and introdu\
 ced -Y.
 - faster web2py_uuid() and request initialization logic, thanks 
 Michele
 - static asset management, thanks Niphlod
 - improved mobile admin
 - request.requires_https and Auth(secure=True), thanks Yarin and 
 Niphlod
 - better custom_import (works per app and is faster), thanks Michele
 - redis_sesssion.py, thanks Niphlod
 - allow entropy computation in IS_STRONG and web2py.js, thanks 
 Jonathan and Nip\
 hlod
 - fixed many aith.wiki problems
 - support for auth.wiki(render='html')
 - better welcome layout, thanks Paolo
 - db.define_table(...,redefine=True)
 - DAL, Row, and Rows object can now be pickled/unpickled, thanks to 
 zombie DAL.
 - admin uses codemirror
 - allow syntax auth = Auth(db).define_tables()
 - better auth.wiki with preview, thanks Alan
 - better auth.impersonate, thanks Alan
 - upgraded jQuery 1.8
 - upgraded Bootstrap 2.1
 - fixed problems with dropbox_account.py
 - many fixes to cache.ram, cache.disk, memcache and gae_memcache
 - cache.with_prefix(cache.ram,'prefix')
 - db.table.field.epoch() counts seconds from epoch
 - DAL support for SQL CASE, example: 
 db().select(...query.case('true','false))
 - DAL(...,do_connect=False) allows faking connections
 - DAL(...,auto_import=True) now retieves some fiel attributes
 - mail can specify a sender: mail.send(...,sender='Mr X 
 %(sender)s')
 - renamed gluon/contrib/comet_messaging.py - 
 gluon/contrib/websocket_messaging.py

 Please check it and report any problem.
 As usual, thanks to the many people who have contributed, in 
 particular Michele and Niphlod.

 Massimo



-- 





[web2py] Re: web2py 2.1.1 is OUT!

2012-10-22 Thread elyase
I get the same problem and I am pretty sure I have distutils installed(on 
mac). How can I troubleshoot?

On Wednesday, October 17, 2012 11:30:33 PM UTC+2, Massimo Di Pierro wrote:

 The line is:

 from distutils import dir_util

 I think you need to install distutils separately.


 On Tuesday, 16 October 2012 09:14:47 UTC-5, apps in tables wrote:

 when i click on deploy to openshift , I get the error :

   cannot import name dir_util

 On Tuesday, October 16, 2012 2:17:43 PM UTC+3, Massimo Di Pierro wrote:

 As far as I know it works but I will say experimental until more 
 people have tried it.

 On Tuesday, 16 October 2012 04:07:37 UTC-5, apps in tables wrote:

 Thanks...

 is deploy to openshift experimental?

 On Tuesday, October 16, 2012 4:04:36 AM UTC+3, Massimo Di Pierro wrote:

 The book is now kind of in between versions it is correct but some 
 of the new features are not described and some example use old API while 
 there is a better way. I plan to finish update it and release the 5th 
 editions within one month. Hopefully sooner.

 On Monday, 15 October 2012 20:01:33 UTC-5, apps in tables wrote:


 Fantastic.as usual.

 tiny hint: 
 can the book title be more descriptive of the related version of 
 web2py ?


 On Monday, October 15, 2012 8:30:42 PM UTC+3, martzi wrote:

 Many thanks Massimo web2py is here to stay !

 On Monday, October 15, 2012 1:55:39 PM UTC+2, Massimo Di Pierro 
 wrote:

 Changelog:

 - overall faster web2py
 - when apps are deleted, a w2p copy left in deposit folder
 - change in cron (it is now disabled by default). removed -N option 
 and introdu\
 ced -Y.
 - faster web2py_uuid() and request initialization logic, thanks 
 Michele
 - static asset management, thanks Niphlod
 - improved mobile admin
 - request.requires_https and Auth(secure=True), thanks Yarin and 
 Niphlod
 - better custom_import (works per app and is faster), thanks Michele
 - redis_sesssion.py, thanks Niphlod
 - allow entropy computation in IS_STRONG and web2py.js, thanks 
 Jonathan and Nip\
 hlod
 - fixed many aith.wiki problems
 - support for auth.wiki(render='html')
 - better welcome layout, thanks Paolo
 - db.define_table(...,redefine=True)
 - DAL, Row, and Rows object can now be pickled/unpickled, thanks to 
 zombie DAL.
 - admin uses codemirror
 - allow syntax auth = Auth(db).define_tables()
 - better auth.wiki with preview, thanks Alan
 - better auth.impersonate, thanks Alan
 - upgraded jQuery 1.8
 - upgraded Bootstrap 2.1
 - fixed problems with dropbox_account.py
 - many fixes to cache.ram, cache.disk, memcache and gae_memcache
 - cache.with_prefix(cache.ram,'prefix')
 - db.table.field.epoch() counts seconds from epoch
 - DAL support for SQL CASE, example: 
 db().select(...query.case('true','false))
 - DAL(...,do_connect=False) allows faking connections
 - DAL(...,auto_import=True) now retieves some fiel attributes
 - mail can specify a sender: mail.send(...,sender='Mr X 
 %(sender)s')
 - renamed gluon/contrib/comet_messaging.py - 
 gluon/contrib/websocket_messaging.py

 Please check it and report any problem.
 As usual, thanks to the many people who have contributed, in 
 particular Michele and Niphlod.

 Massimo



--