Re: [web2py] Re: googling web2py

2010-03-28 Thread Alex Fanjul

107K from Spain.
alex

El 28/03/2010 5:04, mr.freeze escribió:

I was getting 108k in Texas but it jumped to 607k after clearing the
browser cache.

On Mar 27, 9:55 pm, mdipierro  wrote:
   

this is odd. When I do

http://www.google.co.jp/search?q=web2py

1 - 10 su circa 606.000 per web2p

I guess this test is not significant. It does not just depend on the
destination country, but also on the originating country and perhaps
on who is doing the search. So far the number ranges from 100,000 to
710,000 (the highest number I have seen, reported by Wes).

On 27 Mar, 21:11, Jason Lotz  wrote:

 

 From Japan I get ~107,000.
   
 

-- Jay
   
 

On Mar 28, 10:23 am, mdipierro  wrote:
   
 

When you google "web2py" how may hits do you get? from which country?
 
 

When I do it from the US I get ~106,000. The number has been steady
for one year. Before that is was much higher ~600,000.
 
 

When I did it from India the number was about ~550,000.
 
 

Not that the number means anything but I am interested in building
some statistics from different countries.
 
 

Massimo
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread Alex Fanjul

Of course you dont avoid the "selfcertificate" warning

El 24/03/2010 1:46, Alex Fanjul escribió:
Massimo, If Im not wrong you should put your real hostname 
(myvps.example.com) in the "Common Name" field of the selfsign 
certificate to avoid certificate errors refering to incorrect domain 
certificate association


alex

El 23/03/2010 16:49, mdipierro escribió:

The video:

 http://vimeo.com/10377947

Please use this link below to sign up for vps.net.

http://www.vps.net/?bid=190&aid=CD3792&opt=

If you want to use vps.net, by using the link to register you will be
making a zero cost donation.





--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py production deployment on vps.net (VIDEO)

2010-03-23 Thread Alex Fanjul
Massimo, If Im not wrong you should put your real hostname 
(myvps.example.com) in the "Common Name" field of the selfsign 
certificate to avoid certificate errors refering to incorrect domain 
certificate association


alex

El 23/03/2010 16:49, mdipierro escribió:

The video:

 http://vimeo.com/10377947

Please use this link below to sign up for vps.net.

http://www.vps.net/?bid=190&aid=CD3792&opt=

If you want to use vps.net, by using the link to register you will be
making a zero cost donation.

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Survey: Functionality of the Drop Boxes widget

2010-03-23 Thread Alex Fanjul

Sorry, maybe I come late, but the best default option for me is:

"Please choose an option" at the first place, with null or empty value 
associate.

Even better if we can customize the text like:
"Please choose your country", "Please choose your gender", etc.

Of course we should be able to validate it... with a required (or not) 
option.


I think this is the standard on Internet.

Alex

El 22/03/2010 4:06, Thadeus Burgess escribió:

There is current on-going discussion of the default functionality of
the drop boxes widget. This is an attempt to gather information from
the community on this discussion. The results of this survey will
determine what this default functionality will be.

Here is the comparison of the two options currently being considered.

zero=""

This is when a drop box is rendered, there is an empty OPTION tag
rendered in the first that is selected.

zero=None

This is when only the options in the list are rendered. The first
option in the list is selected.

https://spreadsheets.google.com/viewform?formkey=dE9jS1VHSWdyd08xX2x6NU0yaEs1cnc6MA

Thank You,

-Thadeus

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: problema con la BD

2010-03-20 Thread Alex Fanjul

Gracias Mariano, no conocía la existencia del grupo en español...
alex

El 20/03/2010 19:19, Mariano Reingart escribió:

kike:

Antes que nada, hay un grupo de usuarios en español:
http://groups.google.com/group/web2py-usuarios
(web2py-users es para consultas en inglés)

Respecto a tu problema, ¿donde estas definiendo la tabla object_vendors?

En el grupo en español se trato algo similar sobre como usar varias
bases distintas:
http://groups.google.com/group/web2py-usuarios/browse_thread/thread/6cb57d99806b5ba0

Sds

Mariano Reingart
http://reingart.blogspot.com



On Sat, Mar 20, 2010 at 3:01 PM, kike  wrote:
   

disculpenme en donde dice:
  auth_table.preference.requires=IS_NOT_EMPTY()
  auth_table.second_preference=IS_NOT_EMPTY()

realmente dice:

auth_table.preference.requires=IS_IN_DB(vul,'object_vendors.id','object_vendors.name')
auth_table.second_preference=IS_IN_DB(vul,'object_products.id','object_products.name')

On 20 mar, 12:55, kike  wrote:
 

tengo dos bases de datos distintas, la primera es la que se basa mi
aplicacion, y la segunda es la que crea auth, el problema es que
cuando le digo a auth que coja la informacion de un campo de la
primera base de datos, me dice que no conoce el nombre, aqui les pongo
el codigo y el error:

vul=DAL('mysql://root:r...@localhost/sbdv',pool_size=20)
db = DAL('mysql://root:r...@localhost/usbdv',pool_size=20)

from gluon.tools import *
auth=Auth(globals(),db)
auth.settings.hmac_key='sha512:582aedbf-4d01-4f41-81ad-ffb7eed2ada4'
auth_table=db.define_table(
 auth.settings.table_user_name,
 Field('first_name', length=128, label='Nombre(s)'),
 Field('last_name', length=128, label='Apellidos'),
 Field('email', length=128, unique=True, label='Correo'),
 Field('password', 'password', length=256, readable=False,
label='Contraseña'),
 Field('registration_key', length=128, writable=False,
readable=False),
 Field('preference', vul.object_vendors.name, label='Preferencia
Principal'),
 Field('second_preference', vul.object_products.name,
label='Preferencia Secundaria'))

auth_table.first_name.requires=IS_NOT_EMPTY()
auth_table.last_name.requires=IS_NOT_EMPTY()
auth_table.password.requires=[CRYPT()]
auth_table.email.requires=[IS_EMAIL(), IS_NOT_IN_DB(db,
auth_table.email)]
auth_table.preference.requires=IS_NOT_EMPTY()
auth_table.second_preference=IS_NOT_EMPTY()
auth.settings.table_user=auth_table
auth.define_tables()

Traceback (most recent call last):
   File "/home/kike/sbdv/web2py/gluon/restricted.py", line 173, in
restricted
   File "/home/kike/Desktop/web2py/applications/SBDV/models/db.py",
line 40, in
 Field('preference', vul.object_vendors.name, label='Preferencia
Principal'),
   File "/home/kike/tesis/sbdv/web2py/gluon/sql.py", line 1295, in
__getattr__
KeyError: 'object_vendors'
   

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py on Kodingen?

2010-03-20 Thread Alex Fanjul
Massimo, for what I could figure out it's an IDE on the Cloud, where you 
can also Install open source web applications/solutions with the 
easiness of one click... I tend to be very skeptic with this things, but 
anyway it's impressive!!

alex


El 20/03/2010 18:39, mdipierro escribió:

I am trying to figure out what it is? Is it a hosting provider with a
web based IDE? Is it a web based IDE can download and use?

On Mar 20, 12:01 pm, Alex Fanjul  wrote:
   

Incredible!! i didnt know kodingen...

El 20/03/2010 7:19, mr.freeze escribi :

 

It appears that Kodingen can run Django and Ruby apps. Someone with
strong Apache-fu should try to get web2py working :)
   
 

http://kodingen.com/?2010/01/27/get-ruby-working/
http://kodingen.com/?groups/django-on-kodingen
   

--
Alejandro Fanjul Fdez.
alex.fan...@gmail.comwww.mhproject.org
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py on Kodingen?

2010-03-20 Thread Alex Fanjul

Incredible!! i didnt know kodingen...

El 20/03/2010 7:19, mr.freeze escribió:

It appears that Kodingen can run Django and Ruby apps. Someone with
strong Apache-fu should try to get web2py working :)

http://kodingen.com/?2010/01/27/get-ruby-working/
http://kodingen.com/?groups/django-on-kodingen

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: best web frameworks

2010-03-19 Thread Alex Fanjul

actually it doesnt help too much...was curiosity... :-)

El 19/03/2010 18:46, selecta escribió:

hmmm, what do I learn from that? What should I use they are all the
same (oh yes different licenses and dependencies on different py
versions) or is this comparision pointless? Confusion o_O

On Mar 19, 12:53 pm, Alex Fanjul  wrote:
   

FYI:http://www.bestwebframeworks.com/python/
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.comwww.mhproject.org
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: benchmarking: rocket vs pound with four rockets

2010-03-19 Thread Alex Fanjul
Massimo, there is no possibility to keep both of two and select one? 
anyway it's only a file isn't it?

Or maybe keep it as plugins to download?
alex

El 19/03/2010 14:24, mdipierro escribió:

Clearly we have conflicting benchmarks. I like Rocket because it is
cleaner but we need to go with the fastest. Let's wait for Tim
response and we there is a disagreement I propose that a few more
people try reproduce the benchmarks (to make sure there is not
something weird in the setup) and then we decide what to do.

Massimo

On Mar 19, 5:36 am, Kuba Kucharski  wrote:
   

Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?
   

1. Tim?
2. I have a lot of free memory while testing

I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piëlhttp://nichol.as/benchmark-of-python-web-servers

In short he says:

 

make sure you do not use ab
   

yes, in my tests I use httperf

 

make sure you are running from other machine with limits also tweaked
   

this is done like that by me

 

use recompiled httperf
   

done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."

--
Kuba
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] About backward compatibility

2010-03-19 Thread Alex Fanjul
I've just got to read that the yii framework folks share the same 
oppinion as me about backward compatibility and the payoff to mantain it 
for ever.


Reading this article 
 
you can read that they have realased a big mayor version of the 
framework, now you have to choose what to do with your work:
-you can choose to manually upgrade your work using the official guide 


-or you can choose to stay at 1.0.x version

They also give you some tips:

-
SHOULD I USE YII 1.1?
If you are already using Yii 1.0 to develop your project which is about 
half-way done, we suggest you do not upgrade to 1.1 because there are 
quite some changes that break backward compatibility.
You just started a new project, we recommend you upgrade to 1.1 because 
it will receive most of our maintenance effort from now on. While we 
will continue to maintain 1.0, we expect it will only receive bug fixes 
in future.


If you are new to Yii, you should start with 1.1.
--

Of course it's a personal opinion,
alex

--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] tableless and customizable css forms

2010-03-19 Thread Alex Fanjul

Hi all,
Some of you can remember the recurrent discussion about "tableless and 
customizable css forms"...
There is a new feature in Yii framework about forms builder and there is 
-at least- a very interesting article about it here:

http://www.yiiframework.com/doc/guide/form.builder

It's so much curious that the aproach it's very similar to one which 
somebody told here (I dont remember well who was...)
Using a kind of separate classes to keep the render and the array of 
elements -buttons and input elements- including sub-forms...


maybe its a clue to improve the web2py system in this sense, regards
alex

El 19/03/2010 14:24, mdipierro escribió:

Clearly we have conflicting benchmarks. I like Rocket because it is
cleaner but we need to go with the fastest. Let's wait for Tim
response and we there is a disagreement I propose that a few more
people try reproduce the benchmarks (to make sure there is not
something weird in the setup) and then we decide what to do.

Massimo

On Mar 19, 5:36 am, Kuba Kucharski  wrote:
   

Are these numbers consistent with Tim numbers? Could this be dues to a
different memory usage?
   

1. Tim?
2. I have a lot of free memory while testing

I wrote email to an author of the blog entry about wsgi webserver
benchmarks - Nicholas Piëlhttp://nichol.as/benchmark-of-python-web-servers

In short he says:

 

make sure you do not use ab
   

yes, in my tests I use httperf

 

make sure you are running from other machine with limits also tweaked
   

this is done like that by me

 

use recompiled httperf
   

done already

this also comes from him:

"I did a quick benchmark after being pointed to Rocket and I could not
see the same performance advantage for Rocket over CherryPy, more the
opposite."

--
Kuba
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] best web frameworks

2010-03-19 Thread Alex Fanjul

FYI:
http://www.bestwebframeworks.com/python/
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py beautification

2010-03-18 Thread Alex Fanjul
In deed I dont like grid css systems too much, because tends to slower 
my computer due to the use of zoom plugin in firefox (a must for my f*** 
1920x1200px resolution in my 15" notebook)... in other words, the html 
rendering of miles of nested divs size-recalculated are a hungry cpu hole...

alex

El 08/03/2010 23:31, mdipierro escribió:

Why do we need a grid system again? Why does this belong to web2py? I
am not convinced.
I only suggested 1) a better admin. 2) ability to choose among
different web2py scaffolding apps.
Perhaps one of the options can be 960, another couse can be
BlueprintCss.

Massimo

On Mar 8, 4:08 pm, villas  wrote:
   

I had another look around. Here are my notes ...

YAML:  Creative commons licence with backlink.  Unacceptable, right.

Golden Grid:  MIT licence seems good and the size is tiny.  Would be
great to include, but the project doesn't seem active enough,  so I'm
not so sure.

Blueprintcss: MIT and well supported. Seems very comprehensive but
maybe not quite simple enough... may be better as some kind of plugin
as suggested previously.

http://960.gs/: MIT and looks active. Size 8Kb so that seems light
enough and straightforward to use too.

YUI:  Has everything incl kitchen sink. Only as plugin I guess.

Conclusion:  960 grid might be a decent choice to replace existing
layout table.  Blueprint / YUI as plugins as Massimo suggested
earlier.

On Mar 8, 5:35 pm, mdipierro  wrote:

 

I vaguely remember somebody buiding a web2py app for this some time
ago but I cannot find it.
   
 

Massimo
   
 

On Mar 8, 8:02 am, aure  wrote:
   
 

Looking for more info about OOCSS, I just stumbled upon 
that:http://www.yaml.de/en/
 
 

(It seems to also make use of jQuery in some ways.)
 
 

I am no expert, but it looks interesting to me, so I thought I would
mention it.
 
 

Aurelien
 
 

On Mar 7, 6:21 pm, villas  wrote:
 
 

On Mar 7, 11:37 am, Mengu  wrote:
   
 

if anyone is going to do the design work, i recommend oocss atwww.oocss.org
 
 

Hi Mengu, I've never heard of this, but like the fact that it's based
on YUI but still seems simple and flexible to use.  It's appealing to
start off with their solid foundation which you can safely build upon.
   
 

I think using a CSS framework is getting to be inevitable these days.
Most designers will have pieced together their own, but IMO that's not
a good idea for programmers -- it's so easy to lose a couple of hours
fiddling with CSS,  especially regular gotchas like a div slipping
down the page in IE but which behaves perfectly well in FF -- we just
don't need it!  I can see why Massimo must have given it some thought
and then gone back to a good old table!
   
 

In my mind,  the main question is:  is there any kind of standard
which gives immediate access to lots of templates.  If not,  then the
second question is:  what is light, simple,  and well supported enough
to include?
   
 

I think Blueprint or the full YUI is probably overkill.  However,  I
would just mention code.google.com/p/the-golden-grid/ with which I was
also very impressed for basic page layout.  The author has a great
philosophy and it's so light and simple (is 1K small enough?!) that it
could easily be included with Web2py for the basic page divs.  And,
if anyone doesn't like it,  it's just as easy to tear up and
replace :-)
   
 

-David
   
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] benchmarking: rocket vs pound with four rockets

2010-03-17 Thread Alex Fanjul

maybe Im a bit ignorant, but what is pound?
alex

El 18/03/2010 2:20, Kuba Kucharski escribió:

This is probably obvious but I decided to try this myself:

Should one run web2py with Pound on multi-core server?

probably yes if you deal with concurrent connections..


This is my config:

2.6.31-19-generic-pae
Intel(R) Xeon(R) CPU E5410  @ 2.33GHz
Ubuntu 64bit
one processor with 4 cores

disk is serial ata, with performance around this:

#/sbin/hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads:  268 MB in  3.01 seconds =  88.96 MB/sec

This is slow. This is one SATA disk.

I used mysql-5.1 for "writing" tests. I run it on the same machine. Also POUND.

"ab" command runs on my 32bit ubuntu laptop with 2.5 Ghz Core2Duo.
Server and laptop are connected via Gigabit ethernet directly.


I did 12 concurrent connections with 2000 calls, and then 1 connection
with 2000 calls test for every case. Application was compiled. I set
migrate=False.


READING:



ROCKET :

r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12
http://192.168.0.1:8000/vae/default/benchmark2

Concurrency Level:  12
Time taken for tests:   15.441 seconds
Complete requests:  2000
Failed requests:0
Write errors:   0
Total transferred:  852000 bytes
HTML transferred:   236000 bytes
Requests per second:129.52 [#/sec] (mean)
Time per request:   92.647 [ms] (mean)
Time per request:   7.721 [ms] (mean, across all concurrent requests)
Transfer rate:  53.88 [Kbytes/sec] received


#for concurrency level: 1

#Requests per second:157.27 [#/sec] (mean)
#Time per request:   6.359 [ms] (mean)
#Time per request:   6.359 [ms] (mean, across all concurrent requests)
#Transfer rate:  65.43 [Kbytes/sec] received



POUND + 4 x ROCKET :




r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12
http://192.168.0.1:8080/vae/default/benchmark2

Concurrency Level:  12
Time taken for tests:   6.828 seconds
Complete requests:  2000
Failed requests:0
Write errors:   0
Total transferred:  852000 bytes
HTML transferred:   236000 bytes
Requests per second:292.91 [#/sec] (mean)
Time per request:   40.968 [ms] (mean)
Time per request:   3.414 [ms] (mean, across all concurrent requests)
Transfer rate:  121.86 [Kbytes/sec] received

This is faster!! More than twice!

#for concurrency level: 1

#Requests per second:129.28 [#/sec] (mean)
#Time per request:   7.735 [ms] (mean)
#Time per request:   7.735 [ms] (mean, across all concurrent requests)
#Transfer rate:  53.78 [Kbytes/sec] received



WRITING(mysql innodb)->  to see writing bottleneck
=


ROCKET :


r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12
http://192.168.0.1:8000/vae/default/benchmark


Concurrency Level:  12
Time taken for tests:   23.466 seconds
Complete requests:  2000
Failed requests:0
Write errors:   0
Total transferred:  858429 bytes
HTML transferred:   242121 bytes
Requests per second:85.23 [#/sec] (mean)
Time per request:   140.798 [ms] (mean)
Time per request:   11.733 [ms] (mean, across all concurrent requests)
Transfer rate:  35.72 [Kbytes/sec] received

#for concurrency level: 1

#Requests per second:15.69 [#/sec] (mean)
#Time per request:   63.735 [ms] (mean)
#Time per request:   63.735 [ms] (mean, across all concurrent requests)
#Transfer rate:  6.57 [Kbytes/sec] received



POUND + 4 x ROCKET :


r...@kubatron:/home/kuba/httperf-0.9.0/src# ab -n 2000 -c 12
http://192.168.0.1:8080/vae/default/benchmark

Concurrency Level:  12
Time taken for tests:   17.797 seconds
Complete requests:  2000
Failed requests:0
Write errors:   0
Total transferred:  858308 bytes
HTML transferred:   242000 bytes
Requests per second:112.38 [#/sec] (mean)
Time per request:   106.783 [ms] (mean)
Time per request:   8.899 [ms] (mean, across all concurrent requests)
Transfer rate:  47.10 [Kbytes/sec] received

This is faster too.

#for concurrency level: 1

#Requests per second:15.27 [#/sec] (mean)
#Time per request:   65.468 [ms] (mean)
#Time per request:   65.468 [ms] (mean, across all concurrent requests)
#Transfer rate:  6.40 [Kbytes/sec] received


model is:
-

#yes I need Service in my other controllers(xml-rpc)
from gluon.tools import Service


db = DAL('mysql://root:passw...@localhost/vae2')
session.forget()
service=Service(globals())



db.define_table('call_attempt',Field('requestedexten'),Field('requestingexten'),Field('calltime'),Field('uniqueid'),Field('transfer_capability'),Field('context'),Field('host'),Field('tmstmp','datetime',default=request.now),Field('owner',default=1),Field('ended',default="no"),migrate=False)


controllers are(few more not in this listing):


#wr

[web2py] Blogitizor Issues

2010-03-17 Thread Alex Fanjul

Hi thadeus,

I'm trying to understand the blogitizor code, but I'm wasn't be able to 
install it yet at all.

I'm using last version of web2py 1.76.1, and windows 7 with python 2.5.

1) I could install pygments with "easy_install" but couldn't install 
guppy beacuse it requires python 2.6 and I have 2.5. As you say it's 
optional, Do I have to do anything to avoid using it in the meanwhile?

2) When I try to use MySQL connection (through apache), it complains with:

File "E:/web2py/applications/blogitizor/models/B_settings.py" 
, 
line 45, in 
configure = utils.Configure(db)ProgrammingError: (1064, "You have an 
error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near 
'VARCHAR(512),\nname VARCHAR(512),\nvalue LONGTEXT,\n
description LONGTEX' at line 3")


I'm using MySQL 5.1.36, is it wrong for this?

3) Finally I got running with sqlite and cherrpy, but when I go to index 
it show this line:

/home/thadeusb/Workspace/Web/Blogitizor/src/views/efflorescenceorange.html

After looking for the error I noticed that views/default.html actually 
only has this line inside.


Alex

--
Alejandro Fanjul
afan...@siokia.com
www.siokia.com

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: jqGrid slice

2010-03-17 Thread Alex Fanjul
hahaha, I knew that you couldn't resist...thanks again for your excelent 
work.

alex

El 17/03/2010 10:45, mr.freeze escribió:

There is now :)

On Mar 17, 4:40 am, Alex Fanjul  wrote:
   

there is no screenshot of working examplestrange from you mr.
freeze!! :-P
thanks for your slices
alex

El 17/03/2010 5:01, mr.freeze escribi :

 

Here's a simple example of getting jqGrid working with web2py. I'll be
improving it as I go along so feedback is welcome:
http://www.web2pyslices.com/main/slices/take_slice/75
   

--
Alejandro Fanjul Fdez.
alex.fan...@gmail.comwww.mhproject.org
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] jqGrid slice

2010-03-17 Thread Alex Fanjul
there is no screenshot of working examplestrange from you mr. 
freeze!! :-P

thanks for your slices
alex

El 17/03/2010 5:01, mr.freeze escribió:

Here's a simple example of getting jqGrid working with web2py. I'll be
improving it as I go along so feedback is welcome:
http://www.web2pyslices.com/main/slices/take_slice/75

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] jqGrid slice

2010-03-17 Thread Alex Fanjul

there is no screenshot of working examplestrange from you mr. freeze!!
thanks for your slices
alex

El 17/03/2010 5:01, mr.freeze escribió:

Here's a simple example of getting jqGrid working with web2py. I'll be
improving it as I go along so feedback is welcome:
http://www.web2pyslices.com/main/slices/take_slice/75

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] ModWSGI vs CherryPy vs others.

2010-03-16 Thread Alex Fanjul

uWSGI is the clear winner by far...

I think the winner mix is uWSGI + NGINX

http://blog.zacharyvoase.com/2010-03-05-deployment-with-uwsgi-and-nginx



El 17/03/2010 2:58, waTR escribió:

http://nichol.as/benchmark-of-python-web-servers

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Do you know Redis?

2010-03-16 Thread Alex Fanjul

http://code.google.com/p/redis/
It sounds interesting, and his founder has been contracted by Vmware.
alex
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Web2py Plugin IRC Chat Comments

2010-03-15 Thread Alex Fanjul

Ok Thadeus, Massimo,
Maybe I'm wrong with my understanding of the plugins system.
This time, I wasn't talking about folder locations or hooks, but the 
relation between plugins and apps portability (as a feature).
I will try to get deeper in the plugin system, really I'm not an expert 
programmer and the lack of documentation in this theme it's an issue for 
me, I think the thadeus examples (in the two modes: as class and module, 
it's a right place to start).
Anyway I'm not opposing the proposal, only try to think in future issues 
before it happens, and as somebody told: try to think what is what the 
consumer wants.

regards,
alex

El 15/03/2010 15:37, mdipierro escribió:

Alex,

once more let me clarify. I am not opposing your proposal. I am just
saying that the proposal is vague because (as far as I understand you)
what you ask can already be done. I just have never posted an example
because I do not like it. The fact I do not like it does not mean I
want to prevent you from doing it.

The only difference between what can be done and what you prose is in
the location of the files. I say "web2py/applications/plugins" and you
say "web2py/plugins". The location is a false issue that can be
addressed after the issue described below is clarified.

I encourage you to try develop web2py level plugins in the way I
suggest and if you hit any stumbling block, please post your questions
here and I will be happy to help.

You will certainly hit ablock. The problem of how the apps should
communicate to the web2py level plugin globals variables. This is a
problem that would exist even if the web2py level plugins were located
where you suggest. I can solve this problem using a convention (it
would not need change web2py) but that may not be what you want.

I need to see you build an example of such plugin and I need to see
which conventions/APIs you propose solving this problem. I need to see
what is that you cannot do that would require me to change web2py.

Massimo

On Mar 15, 6:47 am, Alex Fanjul  wrote:
   

El 15/03/2010 10:40, mdipierro escribi :>  I understand the argument. Each of 
the system have pros and cons.

 

If a plugin resides outside the app you have these problems:
1) app would not be portable because plugins would not be packages
with it
   

I heard this argument many times from you Massimo, but I don't agree
with that at all, let me explain. If we are talking about plugins (real
plugins) you should be able to plug and unplug them at anytime without
too much modifications (apart from maybe som general configurations of
the plugin).
Tipically web applications (and even desktop ones) doesn't come with the
plugins packed in it, ie. think of Eclipse IDE, Firefox, Magento,
Wordpress, etc. All of them have the ability to share the base and
install as many plugins as they require by some kind of "plugin panel"
or so... In deed, that is the meaning of "plug-ins", isn't it?

Then, you should be able to download my core/basic application from my
website, and install the latest compatible version of the plugins I used
to make the app. There could be even required plugins -why not-.
But you must to share the plugins to be portable (as you say) maybe we
are not talking about plugins at all...(but components).>  2) there would be 
problems if different apps require different
 

versions of the same plugins
   

Typically the plugins folders comes in the form of "plugin_name-1.2.x",
maybe this way they wouldn't interference each other. Each app is an
independet one, so it's responsability of the developer use the version
he can/wants for each app and update them if he can/wants.



 

Anyway. You can do this already:
   
 

Create an app called plugins
   
 

  web2py/applications/plugins
   
 

Any other app can use the views and the static files of the plugins
installed under app plugins. Any other app can call services
implemented by actions of the plugins in app plugins. Any other app
can import modules defined by plugins in app plugins.
   
 

Some care must be taken in designing plugins designed to be shared
since there must be a mechanism for passing a request/response/session/
cache/T and databases to the plugin.
   
 

We do not have specifications for this. This is not a technical issues
(no more than is there were in fact a web2py/plugins folder instead of
a web2py/applications/plugins) but an issue about conventions. Feel
free to make a proposal in this respect.
   
 

Massimo
   
 

On Mar 15, 4:15 am, selectawrote:
   
 

On Mar 13, 4:25 pm, mdipierrowrote:
 
 

If I understand you are asking for a web2py level plugin system vs an
app level plugin system. This has nothing to do with relocation of
plugins under an app subfolder. Am I correct?
   
 

Wel

Re: [web2py] Re: Web2py Plugin IRC Chat Comments

2010-03-15 Thread Alex Fanjul



El 15/03/2010 10:40, mdipierro escribió:

I understand the argument. Each of the system have pros and cons.

If a plugin resides outside the app you have these problems:
1) app would not be portable because plugins would not be packages
with it
   
I heard this argument many times from you Massimo, but I don't agree 
with that at all, let me explain. If we are talking about plugins (real 
plugins) you should be able to plug and unplug them at anytime without 
too much modifications (apart from maybe som general configurations of 
the plugin).
Tipically web applications (and even desktop ones) doesn't come with the 
plugins packed in it, ie. think of Eclipse IDE, Firefox, Magento, 
Wordpress, etc. All of them have the ability to share the base and 
install as many plugins as they require by some kind of "plugin panel" 
or so... In deed, that is the meaning of "plug-ins", isn't it?


Then, you should be able to download my core/basic application from my 
website, and install the latest compatible version of the plugins I used 
to make the app. There could be even required plugins -why not-.
But you must to share the plugins to be portable (as you say) maybe we 
are not talking about plugins at all...(but components).

2) there would be problems if different apps require different
versions of the same plugins
   
Typically the plugins folders comes in the form of "plugin_name-1.2.x", 
maybe this way they wouldn't interference each other. Each app is an 
independet one, so it's responsability of the developer use the version 
he can/wants for each app and update them if he can/wants.

Anyway. You can do this already:

Create an app called plugins

 web2py/applications/plugins

Any other app can use the views and the static files of the plugins
installed under app plugins. Any other app can call services
implemented by actions of the plugins in app plugins. Any other app
can import modules defined by plugins in app plugins.

Some care must be taken in designing plugins designed to be shared
since there must be a mechanism for passing a request/response/session/
cache/T and databases to the plugin.

We do not have specifications for this. This is not a technical issues
(no more than is there were in fact a web2py/plugins folder instead of
a web2py/applications/plugins) but an issue about conventions. Feel
free to make a proposal in this respect.

Massimo

On Mar 15, 4:15 am, selecta  wrote:
   

On Mar 13, 4:25 pm, mdipierro  wrote:

 

If I understand you are asking for a web2py level plugin system vs an
app level plugin system. This has nothing to do with relocation of
plugins under an app subfolder. Am I correct?
   

Well maybe but consider the following

pseudo ls
/app1/.cvs
/app1/controller/.cvs
/app1/controller/plugin_useradmin.py

/app2/.cvs
/app2/controller/.cvs
/app2/controller/plugin_useradmin.py

now the plug-in useradmin is under version control of app1 and app2
this means that the plug-in is under two different version control
systems but if it would be like that

/app1/.cvs
/app1/plugins/useradmin/controller/.cvs
/app1/plugins/useradmin/controller/plugin_useradmin.py

/app2/.cvs
/app2/plugins/useradmin/controller/.cvs
/app2/plugins/useradmin/controller/plugin_useradmin.py

app1 and app2 could have seperate version control from the plug-in

I guess the problem could also be solved with at web2py level plugin
system but this solution would be easier to handle since I do not have
to mingle with setting things in the app so the plugin can use the
same db as the app etc.
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Web2py Plugin IRC Chat Comments

2010-03-13 Thread Alex Fanjul

Hi Massimo,

For me, the framework level plugins aren't plugins for apps directly... 
(as their name say) in the sense that are low level plugins to install 
by a developer and only one time in your system (not one time for each 
application). The example I wrote it's a valid example, ie. and 
extension for the code editor, a new web analytics plugin for admin, or 
a new coachDB connector, a memcached cache plugin, a plugin for events 
model tasks, an extension to CRUD, etc. They are for all your web2py, 
and don´t have to be packed with applications, but downloaded alongside 
with your web2py, as you do now to use ssl, pygmets, or any egg you use 
(like thadeus does with his blogetizor), and are meant to be helpers to 
make the developer life easier and applications more powerful.


Applicacions plugins can be packed (or not) with your application, and 
of course has as many copys as applications you have, and of course (I 
think somebady complaint) you have to upgrade them (or not if you don't 
need it) one by one if you are working in several projects at a time 
(cause each one has his proper version and it's logical).


It's clear to me, that it has to be a good system process to 1) firstly: 
check the dependencies and connections between plugins, and 2) secondly: 
after that, check the order to execute them properly,


so if I have something like this:
plugin_most_active_users.requires=['comments-1.x.x', 'auth-2.x.x']
plugins['tag_cloud'].requires =['tags-1.2.x']
plugins['tags'].requires = ['full_text_search-0.x.x']

The system will complain If I try to install "tag_cloud" without the 
last "tags-1.2.4" plugin, and after that it will try to load 
full_text_search firstly, later tags-1.2.x, auth-2.x.x, and 
comments-1.x.x and finally most_active_users and ta_cloud... (its a 
simple example)


alex

El 12/03/2010 15:52, mdipierro escribió:

The problem with framework level plugins is that if you pack the app
and unpack somewhere else then it will not work without the "framework
level" plugin installed separately. I do not think that is something
to encourage. Moreover different apps may reply on different versions
of the plugin and/or need different configuration.

Anyway there are two things that can be done at framework level: 1)
put models in web2py/site-packages 2) framework level models can be
defined in modules and put there also; 3) framework level views and
static file can be stored in a new app designed at hoc for this
purpose and other app can use them too.

Massimo


On Mar 12, 8:36 am, Alex Fanjul  wrote:
   

Just to clarify it:

Do we able to conservate my app (rewrited/extended) auth module/model,
working alongside "superAuth" thadeus plugin, discarding your framework
plugin and system Auth default one?
Alex

El 12/03/2010 15:31, Alex Fanjul escribi :



 

Ok Massimo,
I agree with you in it makes no sense to rewrite a lot of web2py code.
   
 

Apart from that argument in favor, there is another I don't know if it
would be satisfied right now with plugin_name.py convention:
   
 

-Imagine you write a *framework level plugin* to subsitute auths (or
whatever system feature) views/controllers/models.
-Imagine thadeusb write another *application level plugin* to do the
same called "superAuth"
-Imagine I write an application with an *only modules* extended auth
service with some more fields and stuffs.
   
 

Do we able to conservate my app rewrited/extended auth module/model
over "superAuth" thadeus plugin, discarting system default one?
   
 

Just thoughts,
Alex
   
 

El 12/03/2010 14:01, mdipierro escribi :
   

The location of plugins is not a backward compatibility issue. From
that point of view, we could relocate plugin files.
The reason I do not want to do is that it is an implementation issue
that requires rewriting a lot of web2py code (particularly for the
bytecode-compile functionality), that will make web2py slower, not
faster, and does not seem to add any new feature (except the
relocation itself).
The only argument I have heard in favor of relocation is in fact that
code will look cleaner with a new plugins location. I do not disagree
but to users of admin things will look exactly the same (because of
the logical location according to admin is already the one you
suggest), to users of the shell models would be scattered and it would
be more difficult to identify order of execution, and you will get a
little bit of cleanness is user code at the expense of lots of dirt in
web2py code (lots of if statements to find out what is where).
 
 

I will not do it. If somebody wants to write a fully working proof of
concept implementation to demonstrate that 1) it is not slower; 2) it
can be done without too much extra complexity in web2py source, I may
take the patch.
   

Re: [web2py] Re: Web2py Plugin IRC Chat Comments

2010-03-12 Thread Alex Fanjul

Ok Massimo,
I agree with you in it makes no sense to rewrite a lot of web2py code.

Apart from that argument in favor, there is another I don't know if it 
would be satisfied right now with plugin_name.py convention:


-Imagine you write a *framework level plugin* to subsitute auths (or 
whatever system feature) views/controllers/models.
-Imagine thadeusb write another *application level plugin* to do the 
same called "superAuth"
-Imagine I write an application with an *only modules* extended auth 
service with some more fields and stuffs.


Do we able to conservate my app rewrited/extended auth module/model over 
"superAuth" thadeus plugin, discarting system default one?


Just thoughts,
Alex

El 12/03/2010 14:01, mdipierro escribió:

The location of plugins is not a backward compatibility issue. From
that point of view, we could relocate plugin files.
The reason I do not want to do is that it is an implementation issue
that requires rewriting a lot of web2py code (particularly for the
bytecode-compile functionality), that will make web2py slower, not
faster, and does not seem to add any new feature (except the
relocation itself).
The only argument I have heard in favor of relocation is in fact that
code will look cleaner with a new plugins location. I do not disagree
but to users of admin things will look exactly the same (because of
the logical location according to admin is already the one you
suggest), to users of the shell models would be scattered and it would
be more difficult to identify order of execution, and you will get a
little bit of cleanness is user code at the expense of lots of dirt in
web2py code (lots of if statements to find out what is where).

I will not do it. If somebody wants to write a fully working proof of
concept implementation to demonstrate that 1) it is not slower; 2) it
can be done without too much extra complexity in web2py source, I may
take the patch.

Massimo

On Mar 12, 4:39 am, Alex Fanjul  wrote:
   

Hi Massimo,

I haven't said that plugins should have to depend on others, but they
should be able to access/play with others to make a trully plugins
central network, the dependencies are resoluble at highly level with an
exposed convention API like:

plugin_most_active_users.requires=['comments-1.x.x', 'auth-2.x.x']
plugins['tag_cloud'].requires =['tags-1.2.x']

Its only an idea.

The backward compatibility breaks with the heritance folder structure
(as I though you said), isn't it?

*App Level: (example: plugin for commets)*
web2py/applications/my_app/plugins/my_plugin/modules/module*.py
web2py/applications/my_app/plugins/my_plugin/views/views*.py
web2py/applications/my_app/plugins/my_plugin/controllers/controllers*.py
web2py/applications/my_app/plugins/my_plugin/static/statics*.jpg

*Framework Level (example: plugin for ckeditor Editor, or last Wes James
coda helper)*
web2py/plugins/my_plugin/controllers/controllers*.py
web2py/plugins/my_plugin/views/views*.py

The way to ordering load is down-to-up I think, like kohana 
does:http://docs.kohanaphp.com/general/modules,http://v3.kohanaphp.com/guide/about.filesystem.

Also it's very important the hooks
<http://docs.kohanaphp.com/general/events>  &  events
<http://docs.kohanaphp.com/general/events>  system, as both of you
(thadeus, Massimo) talked at the end of the chat:

There is no calling for new Cache system at all...just was an example...

regards,
Alex

El 12/03/2010 5:26, mdipierro escribi�:



 

I agree with most of what you say.
   
 

99.99% of apps use a single database and so will plugins. This is
because they needs auth to do anything meaningful.
   
 

I do not think it is a good idea to have plugins that depend on each
other. dependencies are a mess to manage. In any language and any OS I
ever used. plugins with dependencies are cause for trouble.
   
 

But I agree that we may build groups of plugins that cooperate for
some specific tasks (like share access to certain tables and or
certain web services). This will happen for plugins geared toward
specific types of apps so we should not over-engineer it now.
   
 

I do not think we need a 2.0 for those things that you asked. We will
get there in small steps and, at this point, I do not see why any of
those improvements should be inconsistent with backward compatibility.
   
 

What's your wish list for cache? I never heard anybody calling for a
new cache system.
   
 

Massimo
   
 

On Mar 11, 9:02 pm, Alex Fanjulwrote:
   
 

Very interesting and constructive IRC meeting, congrats to all. After
reading all text I have some comments:
 
 

- Most of the meeting (50% at least) was concerning about *how many and
what databases should plugins have access to*...it seems the most
headache for all, BUT, I'm pretty sure that 99% of today real WEB
applications (

Re: [web2py] Re: Web2py Plugin IRC Chat Comments

2010-03-12 Thread Alex Fanjul

Just to clarify it:

Do we able to conservate my app (rewrited/extended) auth module/model, 
working alongside "superAuth" thadeus plugin, discarding your framework 
plugin and system Auth default one?

Alex

El 12/03/2010 15:31, Alex Fanjul escribió:

Ok Massimo,
I agree with you in it makes no sense to rewrite a lot of web2py code.

Apart from that argument in favor, there is another I don't know if it 
would be satisfied right now with plugin_name.py convention:


-Imagine you write a *framework level plugin* to subsitute auths (or 
whatever system feature) views/controllers/models.
-Imagine thadeusb write another *application level plugin* to do the 
same called "superAuth"
-Imagine I write an application with an *only modules* extended auth 
service with some more fields and stuffs.


Do we able to conservate my app rewrited/extended auth module/model 
over "superAuth" thadeus plugin, discarting system default one?


Just thoughts,
Alex

El 12/03/2010 14:01, mdipierro escribió:

The location of plugins is not a backward compatibility issue. From
that point of view, we could relocate plugin files.
The reason I do not want to do is that it is an implementation issue
that requires rewriting a lot of web2py code (particularly for the
bytecode-compile functionality), that will make web2py slower, not
faster, and does not seem to add any new feature (except the
relocation itself).
The only argument I have heard in favor of relocation is in fact that
code will look cleaner with a new plugins location. I do not disagree
but to users of admin things will look exactly the same (because of
the logical location according to admin is already the one you
suggest), to users of the shell models would be scattered and it would
be more difficult to identify order of execution, and you will get a
little bit of cleanness is user code at the expense of lots of dirt in
web2py code (lots of if statements to find out what is where).

I will not do it. If somebody wants to write a fully working proof of
concept implementation to demonstrate that 1) it is not slower; 2) it
can be done without too much extra complexity in web2py source, I may
take the patch.

Massimo

On Mar 12, 4:39 am, Alex Fanjul  wrote:

Hi Massimo,

I haven't said that plugins should have to depend on others, but they
should be able to access/play with others to make a trully plugins
central network, the dependencies are resoluble at highly level with an
exposed convention API like:

plugin_most_active_users.requires=['comments-1.x.x', 'auth-2.x.x']
plugins['tag_cloud'].requires =['tags-1.2.x']

Its only an idea.

The backward compatibility breaks with the heritance folder structure
(as I though you said), isn't it?

*App Level: (example: plugin for commets)*
web2py/applications/my_app/plugins/my_plugin/modules/module*.py
web2py/applications/my_app/plugins/my_plugin/views/views*.py
web2py/applications/my_app/plugins/my_plugin/controllers/controllers*.py 


web2py/applications/my_app/plugins/my_plugin/static/statics*.jpg

*Framework Level (example: plugin for ckeditor Editor, or last Wes 
James

coda helper)*
web2py/plugins/my_plugin/controllers/controllers*.py
web2py/plugins/my_plugin/views/views*.py

The way to ordering load is down-to-up I think, like kohana 
does:http://docs.kohanaphp.com/general/modules,http://v3.kohanaphp.com/guide/about.filesystem. 



Also it's very important the hooks
<http://docs.kohanaphp.com/general/events> &  events
<http://docs.kohanaphp.com/general/events>  system, as both of you
(thadeus, Massimo) talked at the end of the chat:

There is no calling for new Cache system at all...just was an 
example...


regards,
Alex

El 12/03/2010 5:26, mdipierro escribiďż˝:




I agree with most of what you say.
99.99% of apps use a single database and so will plugins. This is
because they needs auth to do anything meaningful.
I do not think it is a good idea to have plugins that depend on each
other. dependencies are a mess to manage. In any language and any OS I
ever used. plugins with dependencies are cause for trouble.
But I agree that we may build groups of plugins that cooperate for
some specific tasks (like share access to certain tables and or
certain web services). This will happen for plugins geared toward
specific types of apps so we should not over-engineer it now.
I do not think we need a 2.0 for those things that you asked. We will
get there in small steps and, at this point, I do not see why any of
those improvements should be inconsistent with backward compatibility.
What's your wish list for cache? I never heard anybody calling for a
new cache system.
Massimo
On Mar 11, 9:02 pm, Alex Fanjulwrote:

Very interesting and constructive IRC meeting, congrats to all. After
reading all text I have some comments:
- Most of the meeting (50% at least) was concerning about *how 
many and

what databases shoul

Re: [web2py] Re: Web2py Plugin IRC Chat Comments

2010-03-12 Thread Alex Fanjul

Hi Massimo,

I haven't said that plugins should have to depend on others, but they 
should be able to access/play with others to make a trully plugins 
central network, the dependencies are resoluble at highly level with an 
exposed convention API like:


plugin_most_active_users.requires=['comments-1.x.x', 'auth-2.x.x']
plugins['tag_cloud'].requires =['tags-1.2.x']

Its only an idea.

The backward compatibility breaks with the heritance folder structure 
(as I though you said), isn't it?


*App Level: (example: plugin for commets)*
web2py/applications/my_app/plugins/my_plugin/modules/module*.py
web2py/applications/my_app/plugins/my_plugin/views/views*.py
web2py/applications/my_app/plugins/my_plugin/controllers/controllers*.py
web2py/applications/my_app/plugins/my_plugin/static/statics*.jpg

*Framework Level (example: plugin for ckeditor Editor, or last Wes James 
coda helper)*

web2py/plugins/my_plugin/controllers/controllers*.py
web2py/plugins/my_plugin/views/views*.py

The way to ordering load is down-to-up I think, like kohana does: 
http://docs.kohanaphp.com/general/modules, 
http://v3.kohanaphp.com/guide/about.filesystem.


Also it's very important the hooks 
<http://docs.kohanaphp.com/general/events> & events 
<http://docs.kohanaphp.com/general/events> system, as both of you 
(thadeus, Massimo) talked at the end of the chat:


There is no calling for new Cache system at all...just was an example...

regards,
Alex


El 12/03/2010 5:26, mdipierro escribió:

I agree with most of what you say.

99.99% of apps use a single database and so will plugins. This is
because they needs auth to do anything meaningful.

I do not think it is a good idea to have plugins that depend on each
other. dependencies are a mess to manage. In any language and any OS I
ever used. plugins with dependencies are cause for trouble.

But I agree that we may build groups of plugins that cooperate for
some specific tasks (like share access to certain tables and or
certain web services). This will happen for plugins geared toward
specific types of apps so we should not over-engineer it now.

I do not think we need a 2.0 for those things that you asked. We will
get there in small steps and, at this point, I do not see why any of
those improvements should be inconsistent with backward compatibility.

What's your wish list for cache? I never heard anybody calling for a
new cache system.

Massimo


On Mar 11, 9:02 pm, Alex Fanjul  wrote:
   

Very interesting and constructive IRC meeting, congrats to all. After
reading all text I have some comments:

- Most of the meeting (50% at least) was concerning about *how many and
what databases should plugins have access to*...it seems the most
headache for all, BUT, I'm pretty sure that 99% of today real WEB
applications (and very complex ones) in world uses no more than 1
database: think of Magento's, Elgg's, Zimbra's, Active Collab's,
Twitter's, OpenBravo's, Wordpress's, Drupal's, etc. All of them use only
ONE database (maybe clustered, spreaded, mirrored, etc. but ONE), and
many of them has very complex plugins systems. The "problem" here, is
that with web2py its very simple and easy to create a new database: just
do "db=DAL(...)"... and many times we are even "confusing" (in the right
sense) databases with tables... A game for us: Tell me more than 2 real
web applications using more than one database. A reflection: I would be
very afraid if after installing 20 plugins (as I have in my latest
drupal installation) I bump into 20 (or 15 or 10 or even 5) new
databases in my phpmyadmin/pgadmin. Yea: be generic and assume all
posible cases... but
I think Thadeusb was in the right direccion in some comments...asumming
a worst case of ONE shared db for plugins. moreover this would
simplified things, right?

- "Turicas: should a plugin access other plugins' data?" -->  "thadeusb:
Turicas: I would think no, because a plugin should be self contained."
In this case I disagree, the plugins -for sure- should be able to access
to other plugins data/functions, because as centralplugins grow up, many
of them will be based on others to not reinvent the wheel, so *we will
need a strong convention in exposing API for functions, objects, etc.*
(think of a "plugin_most_active_users" based on thadeus "plugin_commets").

- Finally I believe that a "heritance folder convention" where you can
override/extend parents functionality/skins/models like the great
kohana's plugin system (someone mentioned) is the best way to achive a
"easy" and "comprensible" plugin system. Yes, that would suppose a big
change and probably a backward compatible inflexion point, but as
Massimo said, talk me about functionallity not about implementation.
Concerning this, and to be honest I'm a

[web2py] two plugin approachs

2010-03-11 Thread Alex Fanjul

Hi Thadeus,
For me, its much more "clear" to understand and code this one approach:
http://code.google.com/p/blogitizor/source/browse/src/models/plugin_comments.py
than this one:
http://code.google.com/p/blogitizor/source/browse/src/modules/plugin_comments.py

Maybe it's beacuse Im not a hard python coder...
but, what are the main differences (adventages and disadventages) for 
each one, which do you prefer to code for?


thanks,
alex
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Web2py Plugin IRC Chat Comments

2010-03-11 Thread Alex Fanjul
Very interesting and constructive IRC meeting, congrats to all. After 
reading all text I have some comments:


- Most of the meeting (50% at least) was concerning about *how many and 
what databases should plugins have access to*...it seems the most 
headache for all, BUT, I'm pretty sure that 99% of today real WEB 
applications (and very complex ones) in world uses no more than 1 
database: think of Magento's, Elgg's, Zimbra's, Active Collab's, 
Twitter's, OpenBravo's, Wordpress's, Drupal's, etc. All of them use only 
ONE database (maybe clustered, spreaded, mirrored, etc. but ONE), and 
many of them has very complex plugins systems. The "problem" here, is 
that with web2py its very simple and easy to create a new database: just 
do "db=DAL(...)"... and many times we are even "confusing" (in the right 
sense) databases with tables... A game for us: Tell me more than 2 real 
web applications using more than one database. A reflection: I would be 
very afraid if after installing 20 plugins (as I have in my latest 
drupal installation) I bump into 20 (or 15 or 10 or even 5) new 
databases in my phpmyadmin/pgadmin. Yea: be generic and assume all 
posible cases... but
I think Thadeusb was in the right direccion in some comments...asumming 
a worst case of ONE shared db for plugins. moreover this would 
simplified things, right?


- "Turicas: should a plugin access other plugins' data?" --> "thadeusb: 
Turicas: I would think no, because a plugin should be self contained."
In this case I disagree, the plugins -for sure- should be able to access 
to other plugins data/functions, because as centralplugins grow up, many 
of them will be based on others to not reinvent the wheel, so *we will 
need a strong convention in exposing API for functions, objects, etc.* 
(think of a "plugin_most_active_users" based on thadeus "plugin_commets").


- Finally I believe that a "heritance folder convention" where you can 
override/extend parents functionality/skins/models like the great 
kohana's plugin system (someone mentioned) is the best way to achive a 
"easy" and "comprensible" plugin system. Yes, that would suppose a big 
change and probably a backward compatible inflexion point, but as 
Massimo said, talk me about functionallity not about implementation. 
Concerning this, and to be honest I'm always thinking of a Massimo 
annunce saying: "Web2py 2.0 Released: the new easier, faster and even 
more powerful python web framework with new DAL, new Plugin System, new 
Cache System, new CSS/Form system, etc. (ops but without 1.x backwark 
compatibility sorry)", but it's just a dream :-P


Is there any new IRC appointment planned?

Best regards,
Alex

PD: excuse me for my english (as always)

--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py.com is down !!?! No. but the firewall is blocking some users.

2010-03-11 Thread Alex Fanjul
Massimo might you share your blocking/firewall script with us? I was 
precisely hardening my VPS. Are you using it in VPS?

Thanks
Alex

El 11/03/2010 18:15, mdipierro escribió:

just changing subject title...
... while I look on firewall settings.

On Mar 11, 9:17 am, "mr.freeze"  wrote:
   

I confirmed with our network admin that it is not being blocked
outbound here.

On Mar 9, 9:24 am, mdipierro  wrote:

 

I thought I did fix that and I added you to the whitelist. I will take
a second look.
   
 

Massimo
   
 

On Mar 9, 9:10 am, "mr.freeze"  wrote:
   
 

Massimo, my IP is still blocked too. You should have it in email with
the iptables command to whitelist it :)
 
 

On Mar 9, 9:07 am, mdipierro  wrote:
 
 

It not down but I may be blocking your IP.
I have a script that blocks lot of IP if it thinks there is a denial
of service attack of a directory traversal attack.
What is your ip?
   
 

Massimo
   
 

On Mar 9, 2:18 am, Sky  wrote:
   
 

as I see web2py.com is down since 2 days ago.
is there any body to inform the site administrator ???
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: something happened to web2py.com

2010-02-21 Thread Alex Fanjul
However, the first problem for me (and the reason I chose VPS) is the 
latency to nodes from Europe. VPS has 2 clouds in UK with a very good 
roundtrip time and enough BW. Do Rakespace, slicehost or Linode have 
europe nodes?

thanks
alex

El 21/02/2010 6:02, Thadeus Burgess escribió:

Or slicehost. I run 3 servers currently on slicehost and never have a
problem, A+ support.

I also know a client who is using rackspace cloudservers, it is also
an A+ service. Rackspace owns slicehost, so it really depends on how
much you want to pay.

-Thadeus





On Sat, Feb 20, 2010 at 7:58 PM, Kevin Bowling  wrote:
   

You should move to Linode.com.  It usually recieves the highest praise
on reddit.  I've never had a problem with my instance and the support
is fantastic.


On Feb 20, 6:09 pm, Massimo Di Pierro  wrote:
 

web2py.com is down. The problem is that vps.net management console is
not working either. It is not allowing me to restart it and it does
not show my backups.
Yesterday it showed this to me (image attahced). If may have to move
the all operation back to my previous hosting provider (my pc).
   I am about to leave for China and this is not a good time to have
this kind of problems. I need to pack.

Massimo

  vps.net.crash.jpg
157KViewDownload


   

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] something happened to web2py.com

2010-02-20 Thread Alex Fanjul
You can restart it from "My VPS"..."Graceful restart"... without the 
need to get into console

Alex

El 21/02/2010 2:09, Massimo Di Pierro escribió:
web2py.com is down. The problem is that vps.net management console is 
not working either. It is not allowing me to restart it and it does 
not show my backups.
Yesterday it showed this to me (image attahced). If may have to move 
the all operation back to my previous hosting provider (my pc).
 I am about to leave for China and this is not a good time to have 
this kind of problems. I need to pack.


Massimo




--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: How much memory does web2py need on Unix

2010-02-18 Thread Alex Fanjul
I was reviewing this threadand wow! very nice explanation and 
presentation of playing video streaming via web2py.

Many thanks John, your thoughts looks like very interesting.
Alex

El 14/02/2010 3:12, John Heenan escribió:

Thanks for your comments also.

Yes .flv and other video files will play with Lightttpd using normal
media players, for example, using JW Player in kpax/static/
mediaplayer.swf . It is even possible to use players while the actual
video file is hosted on another server to where the main site and
player is hosted. It is really more of a browser issue unless seek
based streaming is desired.

The video files I host on http://www.zgus.com are on Amazon S3 servers
because the traffic costs are lower this way and because VPS disk
space usage is kept lower. In fact, as mentioned in
http://groups.google.com/group/web2py/msg/e273fa31c779c44c ,  I think
it would be a good idea to allow large uploaded files to automatically
transferred across to other servers. Keeping large files on otherg
severs is the 'enterprise way'. There is mature python infrastructure,
s3cmd, to allow file transfer to Amazon S3 servers, as indicated in
the link.

There is another meaning for streaming which basically means being
able to seek anywhere into the video file without downloading the
entire file into the browser cache. Lighttpd supports this type of
streaming 'out of the box'. Apache does not. YouTube uses Lighttpd and
supports this type of streaming (provided the video file has the
necessary meta data).

Having a web server that supports seek based streaming is not enough.
For this type of streaming a compliant media player is required and
video files need to have meta data installed. There is a coherent
presentation on this type of streaming, on what needs to be done to
video files and a video example at 
http://flowplayer.org/plugins/streaming/pseudostreaming.html

John Heenan

On Feb 14, 1:44 am, mdipierro  wrote:
   

Very well done.

Did you ever try streaming files with lighttpd? For example serving
via download a large video file, larger than ram? (kpax comes with an
example of streaming). Does it work well?

Massimo

On Feb 13, 1:42 am, John Heenan  wrote:

 

As requested I have placed a howto on web2pysplices 
athttp://www.web2pyslices.com/main/slices/take_slice/57
   
 

I have written a considerable preface to clarify issues and to
indicate why we should pay attention to issues concerned with keeping
memory use low.
   
 

John Heenan
   
 

On Feb 13, 2:41 am, mdipierro  wrote:
   
 

I think this is an excellent point.
 
 

My data demonstrated a 40MB memory solution is feasible.
   
 

I am absolutely amazed and disappointed I cannot get such simple
points gracefully acknowledged by a self styled 'expert' and by the
moderator.
   
 

The reason I suggested opening a new thread was to eliminate the
digression.
Would you write a short howto on web2pyslices on how to achieve this
small memory footprint?
Eventually it could become a section in the book.
 
 

Massimo
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] apache prefork

2010-02-18 Thread Alex Fanjul
It comes to my mind, the Graham vs John discussion about: "How much 
memory does web2py need on Unix".
By the way, I saw a Slice 2 days agou about using just 34MB memory for 
web2py in linux.


Alex F

El 18/02/2010 15:39, mdipierro escribió:

I have been having memory issues with apache+mod_wsgi+web2py on the
new hosting (256MB). I followed somebody instructions online and and I
did:

apt-get install apache2-mpm-prefork

Any body has any positive or negative experience with this?

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py 1.75.2 is Out

2010-02-16 Thread Alex Fanjul
Massimo, by the moment vps worked well for my projects, very easy fast 
and reliable, so good luck.


regards
Alex

El 16/02/2010 7:53, mdipierro escribió:

- no more cron with -S option
- ability to override/upgrade and app
- gluon.tools.prettydate
- crud.archive
- better uuid avoids conflicts on replicated servers in the cloud

We moved from EC2 to VPS.net. Much cheaper and easier to manage
(automatic nightly, weekly and monthly backups for example). Let's see
how it goes.

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] DAL patching policy

2010-02-05 Thread Alex Fanjul

Thanks Massimo, I will start to give it a try!!

alex

El 05/02/2010 17:13, Massimo Di Pierro escribió:
I have been stuck on some other projects. The DAL for relational 
databases is done.


It needs a little more abstraction to be able to handle non-relational 
databases, specifically GAE.


If you "cp dal.py sql.py" web2py should work. Give it a try.

Massimo

On Feb 5, 2010, at 10:11 AM, Alex Fanjul wrote:


Hello Massimo, I think nobody asked you for this recently, so...
How its going with the new DAL? when are you expecting to realease?

best regards,
alex

El 05/02/2010 16:08, mdipierro escribió:

is you are planning any patch to DAL please consider this:

If you send me a patch for sql.py, you will force me to move the patch
to the new dal and further delay the release of the latter

If you send me a patch for dal.py you will put pressure on me to
release it earlier and will show me that you have tested it (as far as
I know only Thadeus has tested it at the moment).

Ideally patching both is the best course or action.




--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org





--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] DAL patching policy

2010-02-05 Thread Alex Fanjul

Hello Massimo, I think nobody asked you for this recently, so...
How its going with the new DAL? when are you expecting to realease?

best regards,
alex

El 05/02/2010 16:08, mdipierro escribió:

is you are planning any patch to DAL please consider this:

If you send me a patch for sql.py, you will force me to move the patch
to the new dal and further delay the release of the latter

If you send me a patch for dal.py you will put pressure on me to
release it earlier and will show me that you have tested it (as far as
I know only Thadeus has tested it at the moment).

Ideally patching both is the best course or action.

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Creating a new auth session

2010-01-31 Thread Alex Fanjul
Yea, that is the cool part, integrate it with the "auth part" of web2py 
to get a real single sing on, where you can really connect and login in 
a web2py app with a simple facebook account.

alex

El 31/01/2010 17:24, Jon Romero escribió:

Of course! The fbconnect is already on bitbucket (search on this
group) but I've done a lot of changes so it can play nicely with auth.
And mdipierro has created already a plugin using it.

On Jan 31, 6:03 pm, Alex Fanjul  wrote:
   

Hi Jon, when you finnish the facebook connect with autologin plugin,
could you please share it with us? it's very interesting for all the
projects.
thanks in advance,
alex

El 31/01/2010 16:08, Jon Romero escribi :



 

I have created a new facebook connect plugin where the user can login
to auth using FBConnect.
The thing that I am doing is after the user has logged in (and I have
his fb_uid) I create a new session like this:
   
 

if not auth.is_logged_in():
user_obj = Storage(user_table._filter_fields(Users.find_by_id
(user_id)[0], id=True))
session.auth = Storage(user=user_obj, last_visit=request.now,
expiration=2600)
   
 

where Users.find_by_id(user_id) assume it's db(db.users.id ==
user_id).select()
   
 

Even though it seems to work, I don't think it is correct (because if
it is THAT simple for everyone to
create an auth object then he can hack the system).
   
 

I checked the auth.requires_login but I couldn't figure it out.
   
 

So, how can I create a new session programmatically (like the login
page does)?
   

--
Alejandro Fanjul Fdez.
alex.fan...@gmail.comwww.mhproject.org
 
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Creating a new auth session

2010-01-31 Thread Alex Fanjul
Hi Jon, when you finnish the facebook connect with autologin plugin, 
could you please share it with us? it's very interesting for all the 
projects.

thanks in advance,
alex

El 31/01/2010 16:08, Jon Romero escribió:

I have created a new facebook connect plugin where the user can login
to auth using FBConnect.
The thing that I am doing is after the user has logged in (and I have
his fb_uid) I create a new session like this:

if not auth.is_logged_in():
user_obj = Storage(user_table._filter_fields(Users.find_by_id
(user_id)[0], id=True))
session.auth = Storage(user=user_obj, last_visit=request.now,
expiration=2600)

where Users.find_by_id(user_id) assume it's db(db.users.id ==
user_id).select()

Even though it seems to work, I don't think it is correct (because if
it is THAT simple for everyone to
create an auth object then he can hack the system).

I checked the auth.requires_login but I couldn't figure it out.

So, how can I create a new session programmatically (like the login
page does)?

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] screencast requests

2010-01-28 Thread Alex Fanjul
I think screencast is one of the best way to learn about something so 
thank you for you offering Mengu.
If you accept one of mine, I would like to see something about using 
web2py and smartphones (iphones, android, etc.) maybe with JSON or so.
The only example for JSON crud its in sahana code but its too much 
difficult for me.


Maybe you also could take some posible interesting topics and do a 
survey  to ask for vote one of them.


thanks
alex

El 28/01/2010 23:32, Mengu escribió:

hi everyone,

if you guys have screencast requests on web2py, please let me know.
i'd happily record.

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: SQLFORM generating duplicate ids in HTML

2010-01-27 Thread Alex Fanjul
I agree with prefix IDs, at least as first aproximation, and agree with 
"switches" reflexion: it's more like procedural language than object 
oriented language.
But for the health of desgners I wouldn't forget about css clasess and 
their heritage magic potential


alex

El 27/01/2010 23:42, Jeremy Dillworth escribió:

I just want to clarify, that based on what I have seen, you always get
  even if you don't have any duplicate
fields. So it's not something you can avoid. Once you have multiple
forms you have duplicate IDs.

There are also multiple IDs in the form's HTML. So rather than SQLFORM
(..._id="something") I was thinking more along the lines of SQLFORM
(... _id_prefix="form22_") and then use the prefix on the front of
IDs.

There are probably ways to make this relatively painless.

I personally think web2py should do the right thing by default, for
whatever my opinion is worth (I know everyone else here has much more
invested). So I would suggest if there were a new option to SQLFORM
then something like: SQLFORM(... _use_old_id_scheme=True)... would be
best. Then those that are in Thadeus' situation could simply add the
new option and upgrade their CSS at their leisure.

But then, these kind of switches to preserve old behavior when needed
can accumulate over time. There should probably be a deprecation note
(at least) about it.

Jeremy

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Serious issue with upgrading to latest version

2010-01-25 Thread Alex Fanjul

This issue happend to me several times, I ended reinstalling all again.
alex f

El 25/01/2010 23:13, weheh escribió:

I want to test out my new website under development on my server
production area. Problem is, the server is running web2py 1.64.3 and
won't let me install my new website.

So I downloaded the source version of web2py on the server side and
after backing everything up, of course, installed it and restarted the
web2py app. My old app seemed to work OK, but when I went to the admin
page of web2py, I got a ticket. When I clicked to open the ticket, I
got another ticket, and so on. So there's practically no way for me to
install the packed app.

I undid everything and that's where I am now. Any ideas what could be
causing the admin app to fail like that?

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Firefox 3.6 file upload

2010-01-22 Thread Alex Fanjul

Very cool indeed, what is the necessary server part?
alex f

El 22/01/2010 10:15, Anand Vaidya escribió:

Firefox 3.6 has been released and opens up some new paradigms for file
uploads: Browser supports drag and drop file upload - try it, very
cool. Needs server side support though.

http://hacks.mozilla.org/2009/12/uploading-files-with-xmlhttprequest/

   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: jQuery 1.4 out - google hosted script

2010-01-19 Thread Alex Fanjul
An url to remind: 
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js


El 15/01/2010 18:37, waTR escribió:

I much prefer YUI 3 over Jquery 1.4... YUI 3 is not only smaller (7k +
plugins you choose to use), but it is also a tighter package, and has
a great set of features (CUSTOME EVENTS!!).

Congrats to the jQuery team non-the-less, the world still needs
jQuery.



On Jan 15, 6:16 am, mdipierro  wrote:
   

Let's wait 1.4.1 (which I am sure will follow soon) and we'll upgrade.

On Jan 15, 5:11 am, Anand Vaidya  wrote:

 

I downloaded and overwrote static/jquery.js with the 1.4 version. w2p
seems to work fine, atleast nothing glaring failure...
   
 

Regards
Anand
   
 

On Jan 15, 3:48 pm, Jake  wrote:
   
 

http://jquery14.com/day-01/jquery-14
 
 

cool!
 


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-01-19 Thread Alex Fanjul
urrent
requests)
Transfer rate:  140.87 [Kbytes/sec] received
 
 

Connection Times (ms)
   min  mean[+/-sd] median   max
Connect:00   0.1  0   3
Processing:65  208  11.3208 283
Waiting:   65  208  11.3208 283
Total: 69  209  11.2208 283
 
 

Percentage of the requests served within a certain time (ms)
   50%208
   66%212
   75%214
   80%215
   90%219
   95%223
   98%235
   99%245
  100%283 (longest request)
 
 

===CHERRY PY results===
 
 

Server Software:CherryPy/3.2.0beta
Server Hostname:localhost
Server Port:8000
 
 

Document Path:  /welcome/default/index
Document Length:6531 bytes
 
 

Concurrency Level:  5
Time taken for tests:   41.120 seconds
Complete requests:  1000
Failed requests:0
Write errors:   0
Total transferred:  6892000 bytes
HTML transferred:   6531000 bytes
Requests per second:24.32 [#/sec] (mean)
Time per request:   205.601 [ms] (mean)
Time per request:   41.120 [ms] (mean, across all concurrent
requests)
Transfer rate:  163.68 [Kbytes/sec] received
 
 

Connection Times (ms)
   min  mean[+/-sd] median   max
Connect:00   0.0  0   0
Processing:51  205  66.0197 499
Waiting:   50  201  65.2193 499
Total: 52  205  66.0197 499
 
 

Percentage of the requests served within a certain time (ms)
   50%197
   66%222
   75%240
   80%254
   90%296
   95%328
   98%368
   99%402
  100%499 (longest request)
 
 

Sure, I'll make it a slice.
     
 

On Jan 17, 11:01 pm, Alex Fanjul  wrote:
 
 

Many thanks for your tutorial Ivan,
I'll give it a try... have you noticed any improvements with cherokee?
could you show us your "ab" benchmarks?
   
 

regards,
Alex F
   
 

P.S: try to make an slice in web2pyslices.com
   
 

El 14/01/2010 23:14, Ivan P escribi :
   
 

Inspired by Phyo Arkar's howto on setting up web2py with Cherokee and
FCGI I tried the setup, but was somewhat unsatisfied with the fcgi
method and decided to try uWSGI. I am happy I did so, since it proved
to be real easy and uWSGI is a real powerhouse and deserves attention
of the whole python webdev community. On to the howto.
 
 

I. Compile from source and run the latest uWSGI, 0.9.3 in my case
(available herehttp://projects.unbit.it/uwsgi/wiki).
1. Download the source from and unzip.
 
 

2. To compile you must install packages python-dev and libxml2-dev (at
least thats what they are called on a debian-based system)
 
 

3. When compiling simply run pick a makefile which matches your OS and
python version and run something like "make -f Makefile.Linux.Py26".
This produces only one executable named uwsgi26, where 26 is my python
version. You can put it in /usr/local/bin.
 
 

5. To run it, you have two options:
 
 

5a) Create an xml file and call it, for example, config.xml. Put
something like this in it:

  /var/web2py/
  
  wsgihandler
  

In this file "pythonpath" is where your web2py directory is and
"script" is the file you want to run, in this case its web2py's
"wsgihandler.py". Now run uWSGI like this, but replace "www-data" with
the owner of your web2py directory, if its the same as your current
user omit the sudo command:
sudo -u www-data uwsgi26 -s /tmp/uwsgi.sock -C -x config.xml
Why you need to change user is because web2py writes things (session
data for example) to disc during execution, so the uwsgi process,
which runs the web2py code, has to be the owner of the directories
that contain the framework. Note that uwsgi now opened a socket we
called "/tmp/uwsgi.sock" About other options consult the uwsgi manual
or "uwsgi -h".
 
 

5b) You can omit the xml file and pass all the info via command line,
 

...

read more »
 


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py] Activerecord for web2py - version 0.1

2010-01-17 Thread Alex Fanjul

It sounds very cool for fast prototyping too.
Alex F

El 17/01/2010 14:44, Jon Romero escribió:

I created a small lib which adds an abstraction over DAL and makes it
feel like Rails' Activerecord.
For example:
user = User.find_by_name("Jon")

It creates queries on the fly (you don't have to create a function
'find_by_name' - it creates it dynamically based on your table
fields).

I plan to extend it so it can do:
user = User.find_by_name_and_sex("Jon", "male")
and some other interesting stuff (insert/update etc)

Check it here
http://jon.is.emotionull.com/post/339111307/activerecord-in-python-do-it-like-rails
http://bitbucket.org/jonromero/pyactiverecord

What do you thing?
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py] uWSGI + Cherokee + web2py - a howto.

2010-01-17 Thread Alex Fanjul

Many thanks for your tutorial Ivan,
I'll give it a try... have you noticed any improvements with cherokee? 
could you show us your "ab" benchmarks?


regards,
Alex F

P.S: try to make an slice in web2pyslices.com

El 14/01/2010 23:14, Ivan P escribió:

Inspired by Phyo Arkar's howto on setting up web2py with Cherokee and
FCGI I tried the setup, but was somewhat unsatisfied with the fcgi
method and decided to try uWSGI. I am happy I did so, since it proved
to be real easy and uWSGI is a real powerhouse and deserves attention
of the whole python webdev community. On to the howto.

I. Compile from source and run the latest uWSGI, 0.9.3 in my case
(available here http://projects.unbit.it/uwsgi/wiki).
1. Download the source from and unzip.

2. To compile you must install packages python-dev and libxml2-dev (at
least thats what they are called on a debian-based system)

3. When compiling simply run pick a makefile which matches your OS and
python version and run something like "make -f Makefile.Linux.Py26".
This produces only one executable named uwsgi26, where 26 is my python
version. You can put it in /usr/local/bin.

5. To run it, you have two options:

5a) Create an xml file and call it, for example, config.xml. Put
something like this in it:

 /var/web2py/
 
 wsgihandler
 

In this file "pythonpath" is where your web2py directory is and
"script" is the file you want to run, in this case its web2py's
"wsgihandler.py". Now run uWSGI like this, but replace "www-data" with
the owner of your web2py directory, if its the same as your current
user omit the sudo command:
sudo -u www-data uwsgi26 -s /tmp/uwsgi.sock -C -x config.xml
Why you need to change user is because web2py writes things (session
data for example) to disc during execution, so the uwsgi process,
which runs the web2py code, has to be the owner of the directories
that contain the framework. Note that uwsgi now opened a socket we
called "/tmp/uwsgi.sock" About other options consult the uwsgi manual
or "uwsgi -h".

5b) You can omit the xml file and pass all the info via command line,
doing that is easy, so consult the uwsgi docs :)


II. Setting up cherokee (0.99.37 in my case).
1. Install it, run cherokee-admin, go to localhost:9090

2. Open "Information Sources" and create a new one with these
parameters:
Nick: web2py
Connection: /tmp/uwsgi.sock
Interpreter: uwsgi26 -s /tmp/uwsgi.sock -C -x /path/to/config.xml
The interpreter line is why it is a good idea to have your web2py
source owned by www-data or the Cherokee server's user - when cherokee
runs it, you can be sure that owners of the sources and process match.
And of  course put the correct path in.

3. Go to "Virtual Servers" and edit the default one, or you can create
a new one, but make sure you give it a domain name to avoid conflict
(not really sure what happens when they conflict).

4. Go to the "Behavior" section and edit the "Default" behavior.

5. Set the "Handler" to uWSGI and on the bottom set the information
source to "web2py"

6. Pick "Hard restart" from the dropdown on the left and click "Save".
TO PREVENT HEADACHE READ THIS: I seem to get inconsistent results with
these restarts, so if you're doing production it seems to me that one
should restart the server manualy (via /etc/init.d/cherokee restart,
that is). Or maybe I should RTFM.

6. Go to localhost and BAM! (or at least I hope its a bam). veeery
easy if all goes smooth.

"But wait, what about url rewriting?" was my thought, and this caused
much confusion, so I'll add a section on that.


III. Doing some redirection (I'll give few examples due to poor
knowledge of regex).
Lets redirect "localhost/" to "/myapp/cntrlr/index"
1. Go back to the "Behavior" section of your server.

2. Add a new rule and set it's type to "Regular Expression" and set
the regular expression to "^/$", this simply matches "localhost/" or
"localhost", nothing more, nothing less.

3. Go to the "Handler" section and set the rule to "Redirect" with
these parameters
Type: Internal
Regular Expression: (yes, blank)
Substitution: /myapp/cntrlr/index
The regular expression is blank because for this scenario we did all
the matching while defining a new behavior, you can combine the two in
creative ways.

That's about all. Your imagination should take care of the rest. I,
for example, put my static files separately from the framework by
creating a behavior that points to "/static" and picking "static
files" as the handler.
Thanks to Massimo DiPierro for web2py and Phyo Arkar for his cherokee
howto.
I'm not much of a writer so feel free to ask for clarifications.
   


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/

Re: [web2py] Re: Built-in Webserver

2010-01-08 Thread Alex Fanjul

ajjajaja very nice Massimo...
you are trying to invent some new adjetives for web2py!
Alex

El 08/01/2010 18:30, mdipierro escribió:

I do not know what "fassimoster" means. I meant to type "faster" but
something weird happened to my editor window.

On Jan 8, 11:28 am, mdipierro  wrote:
   

The keepalive weirdness is gone when we upgraged to a more recent
version of wsgiserver. Some time ago. The only known limitation of the
current web server is failure of ssl for large uploads (and perhaps
downloads?). I run it in production.

Anyway, Tim, here is working on a new web server called Rocket that
will soon replace wsgiserver. It is much clearner and fassimoster.

massimo

On Jan 8, 10:13 am, Timbo  wrote:

 

I'm curious...how many of you use the built-in webserver (CherryPy's
wsgiserver) as opposed to Apache, LightTPD or Cherokee in web2py and
what do you use it for?  If you don't know what I'm talking about,
you're probably using it.
   
 

I've used it in the past for both development on my desktop and
production.  I switched to using mod_wsgi+Apache because of some HTTP-
keepalive wierdness (which has been discussed in the past).  But if I
didn't have to rely on Apache, that would be one less thing to have to
worry about in our disaster recovery plan.
   


 


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py] Re: [web2py:38394] Re: SQLFORM without tables

2010-01-08 Thread Alex Fanjul
This is the most recurrent topic I think. It should be called 
"Decoupled, Custom and Tableless Forms". I'd say it would involve lot of 
changes for "default" things that web2py does now very well, and that is 
the problem.

Alex F

El 06/01/2010 0:13, Thadeus Burgess escribió:

I think what he really wants is the same thing I have been discussing
for quite a while :)

For now, sqlform.custom is the way to go

http://web2py.com/AlterEgo/default/show/205

-Thadeus





On Tue, Jan 5, 2010 at 4:25 PM, mdipierro  wrote:
   

I think this should do it:

form=SQLFORM(...)
form.components=[row[1][0] for row in form[0].components]

You can try variations

On Jan 5, 4:18 pm, Alexandre  wrote:
 

Hi,

I would like to get SQLFORM without tables, just one field on top of the
other, is that possible?

It would be nice if instead of a table, we could iterate through the fields
in SQLFORM, so that we could represent it anyway we would like.

Thanks,
Alexandre Rosenfeld

Eng Comp 06 - USP São Carlos
FoG -http://fog.icmc.usp.br
IM Team - AIESEC
   

--
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




 


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py] Re: Facebook Connect for web2py is ready!

2010-01-07 Thread Alex Fanjul

Yeah, it's the same for wordpress... (moreover: for each wordpress)
Alex F

El 07/01/2010 23:01, Jon Romero escribió:

> From http://wiki.developers.facebook.com/index.php/Facebook_Connect_Tutorial1
:
"Each Connect website is treated as a Facebook application, and so it
needs an API key. Go to the Facebook Developer application and click
Create An Application. Fill in these fields: "

You have to create an application and set it up as described in the
tutorial

On Jan 7, 6:03 am, mdipierro  wrote:
   

Why I do not have understand if why do I have to create a facebook
application if all I want is to use facebook for authentication. A
facebook application requires a fb canvas (as done in my original fb
example) so that I can be embedded in a facebook page but I do not
necessarily want that. Am I missing something?

On Jan 6, 8:21 pm, Jon Romero  wrote:

 

The source code also exists here:http://github.com/jonromero/fbconnect-web2py
First of all you have to create a facebook application. The are plenty
of tutorials (even though you just need to change one path). Then you
copy the API and SECRET key.
You must put on facebook app settings ->  "Connect" the full path where
your app is (http://localhost:8000/fbconnect/default/index. I don't
remember any other settings (I am not at my pc right now) but I think
it's only that one.
If you still have problems (yeap, facebook connect has some tricky
details) I can write a more detailed review.
   
 

Integration with Auth would be sweet :D
   
 

On Jan 6, 10:44 pm, Massimo Di Pierro  wrote:
   
 
I turned it into a plugin but I am not sure how to get the API key  
working.
Can you explain to us what steps are necessary on the facebook  
registration site?
 
 

Eventually his should be integrated with Auth.
 
 

Massimo
 
 

  web2py.plugin.fbconnect.w2p
37KViewDownload
 


 


--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:38254] Re: SQLFORM.factory or a better way for custom forms

2010-01-03 Thread Alex Fanjul
Hi Massimo,
In relation to this, there is one previous but important big thread 
talking about tableless forms that I would add to web2py roadmap 
somehow. http://www.mail-archive.com/web2py@googlegroups.com/msg27116.html
I think it's a recurrent subject in this forum, and there was some 
attempts to solved it like the one done by Thadeus. I know there are 
some priorities like the new DAL but anyway...
Once ago I read something like "the best web you will ever has done, 
it's the web done by your users", so maybe you could gauge the "future 
feature requests" using a free tool like this: 
http://www.polleverywhere.com to poll the roadmap,  what do you think?

regards,
Alex F

El 02/01/2010 20:30, mdipierro escribió:
> I cannot think of a better way. Nice site by the way. I would only
> replace
>
>  
>  {{=form.hidden_fields()}}
>  
> 
>
> with
>
> {{=form.custom.end}}
>
>
>
> On Jan 2, 1:15 pm, "K.R.Arun"  wrote:
>
>> hi,
>> I'm new to web2py and my first experience with it is fun.
>> It's true that I can develop fast but for now customization is pain in
>> some places.
>> For example, I like css over tables. And I have to add some fieldsets
>> to my form.
>> Form is generated from a table and using SQLForm(because many tasks
>> are done by it, like automatic insertion, validation etc.,)
>>
>> You can see my site on-line athttp://exodus-fest.appspot.com/
>> (It uses css3, best viewed on a latest chrome/firefox or any other
>> css3 supported browser)
>>
>> at the end of the post I'm posting code for view and controller.
>> Now tell me is there any better way to do the same; like using
>> SQLFORM.factory (I tried, but hopelessly failed.) so that view get
>> shortened.
>>
>> Now, what follows is my code...
>>
>> controller
>> ~~~
>>
>> def register():
>>  msg = ''
>>  fieldLabels={'name':'Full Name:', 'course':'Enrolled Course:',
>> 'college':'College/University:', 'mobile':'Mobile Number:',
>> 'email':'Email Address:'}
>>  form = SQLFORM(db.register, submit_button='Register',
>> labels=fieldLabels)
>>  if form.accepts(request.vars, session):
>>  form = None
>>  a = q = c = d = ''
>>  import smtplib
>>  toaddr = request.vars.email
>>  q = 'Yes' if request.vars.quiz else 'No'
>>  a = 'Yes' if request.vars.animation else 'No'
>>  c = 'Yes' if request.vars.coding else 'No'
>>  d = 'Yes' if request.vars.dance else 'No'
>>  body = ('Dear ' + request.vars.name +',\n\n' +
>>  'It is a pleasure for me to let you know that you had 
>> successfully
>> registered for the Exodus-10 (Cultural and IT fest) ' +
>>  'conducted by Computer Science Dept. of St. Thomas College, 
>> Thrissur
>> \n\n'+
>>  'You are registered to:\n'+
>>  ' Quiz : ' + q + '\n' +
>>  'Animation : ' + a + '\n' +
>>  '   Coding : ' + c + '\n' +
>>  'Dance : ' + d + '\n\n'+
>>  'Please note that program commence on 14th Jan, 2010, 
>> 9:30am'+
>>  '\n\n\nThank You,\nShibu \n(Student Co-ordinator)\nMobile :
>> +919496349988' + '\n Website:http://exodus-fest.appspot.com/')
>>
>>  mail.send(to = toaddr, subject='Exodus: Event registration',
>> message= body)
>>  msg += "You are Successfully registered. Please Check your 
>> email."
>>  elif form.errors:
>>  if form.errors.name: form.errors.name='Your name seems too 
>> short'
>>  if form.errors.college: form.errors.college='It is a too 
>> short name'
>>  if form.errors.mobile: form.errors.mobile='Enter a valied 
>> Mobile
>> Number'
>>  if form.errors.email: form.errors.email='Enter a valied 
>> Email
>> Address'
>>  return dict(form=form, msg=msg)
>>
>> 
>> now view
>> ~~~
>>
>> {{extend 'tmpl.html'}}
>>
>> {{if form:}}
>> {{lbl=form.custom.label}}
>> {{wdgt=form.custom.widget}}
>>
>> 
>>  Exodus: Event Registration Form
>>  
>>  Your Details
>>  
>>  
>>  > id="register_name__label">{{=lbl.name}}
>> 
>>  {{=wdgt.name}}
>>  
>>  
>>  > id="register_course__label">
>> {{=lbl.course}}
>>  {{=wdgt.course}}
>>  
>>  
>>  > id="register_college__label">
>> {{=lbl.college}}
>>  {{=wdgt.college}}
>>  
>>

Re: [web2py:38094] roadmap?!

2009-12-30 Thread Alex Fanjul
Massimo, with your permission, I would add "Breadcumb" plugin to your 
list. I think Alexander is working on this and he has a working slice 
already.
Alex F

El 30/12/2009 18:59, mdipierro escribió:
> Alvaro said this over and over. We need a roadmap.
>
> For me the most important things are:
>
> 1) getting the new DAL done (and include support for more NoDB and
> Sybase)
>
> 2) Create a set of standard and customizable plugins for:
>a) comments (*)
>b) tagging (*)
>c) voting/rating
>d) wiki/versioning
>e) attachements of documents
>f) google checkout (*)
>e) quizzes and surveys (we can take it out from kpax)
>g) autocomplete
>h) embedding media files (photo gallery, video player, etc)
>i) customization of layout (*)
> (*) we have some prototyes but not production quality yet.
>
> I could use help with these and some of you have demonstrated better
> skills than mine on this.
>
> 3) merge T4 and kpax to use plugins.
>
> 4) Create a portable StringListProperty model type that works without
> GAE.
>
> 5) Create a widget to display a StringListProperty field.
>
> Massimo
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:38093] Re: How the 'auth.settings.allow_basic_login = True' works like?

2009-12-30 Thread Alex Fanjul
So I guess that is the problem, traying to access url through standard 
way but with email username because it would remain: 
http://u...@mail.com:passw...@domain:port/uri , and I think this won't 
be valid...
alex f

El 30/12/2009 18:06, Massimo Di Pierro escribió:
> It depends. Unless you have custom auth_user table with a username 
> field, your username is the email and that is what you should use in 
> basic auth.
>
> On Dec 30, 2009, at 10:12 AM, Alex Fanjul wrote:
>
>> Massimo I think the username is not an email, is just the standard way
>> of accessing url with basic auth, isn't it?
>> http://  username : password @ domain : port / uri
>>
>> alex
>>
>> El 30/12/2009 15:25, mdipierro escribió:
>>> That probably will not work since it is not what was designed for.
>>> I am not sure why it did not work thou.
>>> If the username is the email, did you escape it?
>>>
>>> On Dec 30, 1:16 am, David Marko  wrote:
>>>
>>>> I simply tried to call the method with URLcontaining the username/
>>>> password. e.g. tttp://username:p...@localhost:8080/  . Its just
>>>> internal call so its fine that username/pwd is in URL. I simply tried
>>>> this in browser, but login form apeared instead.
>>>>
>>>> David
>>>>
>>>> On Dec 29, 10:25 pm, mdipierro  wrote:
>>>>
>>>>
>>>>> The allow basic login allows you to call functions that
>>>>> @auth.requires_login() by passing the credential using basic auth for
>>>>> example call the url using wget and curl.
>>>>>
>>>>
>>>>> How are you using it?
>>>>>
>>>>
>>>>> On Dec 29, 2:59 pm, David Marko  wrote:
>>>>>
>>>>
>>>>>> How the settings 'auth.settings.allow_basic_login = True' is 
>>>>>> supposed
>>>>>> to work? I tried to login to protected 
>>>>>> method('@auth.requires_login
>>>>>> ()') via basic auth, but was not succesfull. Is there some 
>>>>>> additional
>>>>>> setting for protected methods or '@auth.requires_login()'' is 
>>>>>> simply
>>>>>> used for both auth ? Can someone explain please?
>>>>>>
>>>>
>>>>>> David
>>>>>>
>>>>
>>>>
>>> -- 
>>>
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To post to this group, send email to web...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> web2py+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/web2py?hl=en.
>>>
>>>
>>>
>>>
>>
>> -- 
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.com
>> www.mhproject.org
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:38067] Re: How the 'auth.settings.allow_basic_login = True' works like?

2009-12-30 Thread Alex Fanjul
Massimo I think the username is not an email, is just the standard way 
of accessing url with basic auth, isn't it?
http://  username : password @ domain : port / uri

alex

El 30/12/2009 15:25, mdipierro escribió:
> That probably will not work since it is not what was designed for.
> I am not sure why it did not work thou.
> If the username is the email, did you escape it?
>
> On Dec 30, 1:16 am, David Marko  wrote:
>
>> I simply tried to call the method with URLcontaining the username/
>> password. e.g. tttp://username:p...@localhost:8080/  . Its just
>> internal call so its fine that username/pwd is in URL. I simply tried
>> this in browser, but login form apeared instead.
>>
>> David
>>
>> On Dec 29, 10:25 pm, mdipierro  wrote:
>>
>>  
>>> The allow basic login allows you to call functions that
>>> @auth.requires_login() by passing the credential using basic auth for
>>> example call the url using wget and curl.
>>>
>>  
>>> How are you using it?
>>>
>>  
>>> On Dec 29, 2:59 pm, David Marko  wrote:
>>>
>>  
 How the settings 'auth.settings.allow_basic_login = True' is supposed
 to work? I tried to login to protected method('@auth.requires_login
 ()') via basic auth, but was not succesfull. Is there some additional
 setting for protected methods or '@auth.requires_login()'' is simply
 used for both auth ? Can someone explain please?
  
>>  
 David
  
>>
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:38029] Re: breadcrumb design

2009-12-29 Thread Alex Fanjul
ake links pretty by capitalizing and using 'home' instead of
> > > 'default'
> > >pretty = lambda s: s.replace('default', 'home').replace('_', '
> > > ').capitalize()
> > >menus = [A('Home', _href=URL(r=request, c='default',
> f='index'))]
> > >if request.controller != 'default':
> > ># add link to current controller
> > >menus.append(A(pretty(request.controller), _href=URL
> > > (r=request, c=request.controller, f='index')))
> > >if request.function == 'index':
> > ># are at root of controller
> > >menus[-1] = pretty(request.controller)
> > >else:
> > ># are at function within controller
> > >menus.append(pretty(request.function))
> > >return XML(' > '.join(str(m) for m in menus))
> >
> > > Has anyone else got a system they can share?
> > > Richard
> >
> > > On Aug 5, 10:48 am, Richard  <mailto:richar...@gmail.com>> wrote:
> > > > On Jul 17, 10:52 am, Alex Fanjul  <mailto:alex.fan...@gmail.com>> wrote:
> >
> > > > > I agree with you Richard,
> > > > > In deed, in statusbar there is already a "kind of
> breadcrumb" but
> > > > > wihtout links...
> >
> > > > > A vote for this inbuild functionallity...
> > > > > Otherwise, I bet that someone has a quick and simple idea
> to do this
> > > > > with one function and getting the information from url
> app, controller,
> > > > > function.
> >
> > > > hmm, doing it automatically from the URL might work for me
> if I plan
> > > > it right.
> > > > Does anyone else already have their own breadcrumb system?
> >
> > > > Richard
> > > --~--~-~--~~~---~--~~
> > > You received this message because you are subscribed to the
> Google Groups
> > > "web2py-users" group.
> > > To post to this group, send email to web2py@googlegroups.com
> <mailto:web2py@googlegroups.com>
> > > To unsubscribe from this group, send email to
> > > web2py+unsubscr...@googlegroups.com
> 
> <mailto:web2py%2bunsubscr...@googlegroups.com> <mailto:web2py%252bunsubscr...@googlegroups.com>>
> > > For more options, visit this group at
> > >http://groups.google.com/group/web2py?hl=en
> > > -~--~~~~--~~--~--~---
> >
> > --
> > Atenciosamente
> >
> > --
> > =
> > Alexandre Andrade
> > Hipercenter.com
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "web2py-users" group.
> To post to this group, send email to web2py@googlegroups.com
> <mailto:web2py@googlegroups.com>.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com
> <mailto:web2py%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>
>
> -- 
> Atenciosamente
>
> -- 
> =
> Alexandre Andrade
> Hipercenter.com
>
> --
>
> You received this message because you are subscribed to the Google 
> Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37680] Re: plugin development notes/docs ?

2009-12-29 Thread Alex Fanjul
I think I agree with Thadeus in his exposition, this way we could 
implement a quickly "module setup page" for applications where you can 
choose install uninstall modules inside applications.

Another thing:

What about a plugin designed to overrides views/layout.html or views/
web2py_ajax.html or static/base.css? It would not be possible. You
would not be able to use your proposed structure to create a plugin
that applies a layout to an existing app.

Massimo, maybe we could clear up plugin system if we could distinguish 
between Plugins and Themes? where themes could be installed the same way 
but based on overrides/extend some html/views/layouts?
this way folder structure would remain:

- application
>--cache
>--controllers
>..
>--models
>--modules
>..
>--plugins
>  ---myplugin
>  ---myplugin2
>--views
>   --themes
> ---default
>--web2py_ajax.html
>--...
> ---mytheme
> ---myothertheme

Just some thoughts,
Alex

El 29/12/2009 19:25, Thadeus Burgess escribió:
>> If plugins have models in their own folder, then should all models be
>> executed when a non-plugin controller is called, including plugin
>> models? If so, there would be a lot overhead to new directory
>> structure. Moreover in which order would they be executed? Whatever
>> you choose would not be obvious. If plugin modules where only to be
>> executed when plugin controllers are called then they would be
>> accessible by appadmin and they would have very limited functionality.
>> for example they would not be able to act on non-plugin modules.
>>  
> This is why django has...
>
> installed_applications = [
>  'contrib.auth',
>  'my.blog',
>  'comments',
> ]
>
> Which solves this problem. Its just one more line in db.py (or settings.py), I
> already have to declare admin, why not installed_plugins = [] ?? then
> web2py will go through the plugins in that order, create their models,
> etc etc...
>
> For another example, I view Auth, Crud, Mail etc... as 'plugins' that
> happen to be included with web2py always
>
>> For me a plugin is just a subset of an app that you can
>> extract from an app and you can apply over an existing app.
>>  
> I think we've been trying to get this out of you for quite some time now :)
>
> So what you call a plugin, is not what I call/imagine a plugin.
>
> -Thadeus
>
>
>
>
>
> On Tue, Dec 29, 2009 at 9:40 AM, mdipierro  wrote:
>
>> If plugins have models in their own folder, then should all models be
>> executed when a non-plugin controller is called, including plugin
>> models? If so, there would be a lot overhead to new directory
>> structure. Moreover in which order would they be executed? Whatever
>> you choose would not be obvious. If plugin modules where only to be
>> executed when plugin controllers are called then they would be
>> accessible by appadmin and they would have very limited functionality.
>> for example they would not be able to act on non-plugin modules.
>>
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:38010] CleverCSS

2009-12-29 Thread Alex Fanjul
As a programmer??? But if Blogitizer has the shiny and cleaner interface 
I could see in web2py...
thanks for lower my morale :-P
Alex

El 29/12/2009 9:31, Thadeus Burgess escribió:
> Just letting everyone know about this... This is AWESOME. As a
> programmer, I don't like css... but this makes css that much more
> bearable :)
>
> http://sandbox.pocoo.org/clevercss/
>
>  now only if I could integrate this into web2py 
>
> -Thadeus
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37968] Re: breadcrumb design

2009-12-28 Thread Alex Fanjul
I don't know if I have problems with my email (cause nobody responded me 
the last ones asking for help), anyway next try:
Thank you so much Alexandre, I think is a very useful bit of code 
because this feature (breadcumbs) its a must for web 2.0 nowdays, and 
from my point of view I think it should be included in web2py framework.
After trying to review and understand your code, the most impressive 
part (for a Java ex-programmer like me) its this little line: ***return 
XML(' > '.join(str(m) for m in menus))***

Alex F

El 28/12/2009 21:45, Alexandre Andrade escribió:
> I improved the function and put it at 
> http://www.web2pyslices.com/main/slices/take_slice/46
>
> Features:
>
> * links in every breadcrumb
> * can set a breadcrumb to args
> * can localize/personalize the controllers - using T()
>
> Thanks to Richard http://gmail.com>>, for 
> original function that I made improvements
>
> Put in your model/module:
>
> Select
> | def breadcrumbs(arg_title=None):
> "Create breadcrumb links for current request"
>
> # make links pretty by capitalizing and using 'home' instead of 
> 'default'
> #pretty = lambda s: s.replace('default', 'Início').replace('_', ' 
> ').capitalize()
>
> menus = [A(T('Home'), _href=URL(r=request, c='default', f='index'))]
> if request.controller != 'default':
> # add link to current controller
> menus.append(A(T(pretty(request.controller)), 
> _href=URL(r=request, c=request.controller, f='index')))
>
> if request.function == 'index':
> # are at root of controller
> menus[-1] = A(T(pretty(request.controller)), 
> _href=URL(r=request, c=request.controller, f=request.function))
>
> else:
> # are at function within controller
> menus.append(A(T(pretty(request.function)), 
> _href=URL(r=request, c=request.controller, f=request.function)))
> # you can set a title putting using breadcrumbs('My Detail Title')
>
> if request.args and arg_title:
> menus.append(A(T(arg_title)), _href=URL(r=request, 
> c=request.controller, f=request.function,args=[request.args]))
> else:
> #menus.append(A(pretty(request.controller), _href=URL(r=request, 
> c=request.controller, f='index')))
>
> if request.function == 'index':
> # are at root of controller
> #menus[-1] = pretty(request.controller)
> pass
> #menus.append(A(pretty(request.controller), 
> _href=URL(r=request, c=request.controller, f=request.function)))
>
> else:
> # are at function within controller
> menus.append(A(T(pretty(request.function)), 
> _href=URL(r=request, c=request.controller, f=request.function)))
> # you can set a title putting using breadcrumbs('My Detail Title')
>
> if request.args and arg_title:
> menus.append(A(T(arg_title), _href=URL(r=request, 
> f=request.function,args=[request.args])))
>
> return XML('>  '.join(str(m) for m in menus))
>
> |
>
> To use, put in your view:
>
> Select
> |  {{=breadcrumbs() }}
> |
>
> or
>
> Select
> |   {{=breadcrumbs('My Title for request.args ') }}
> |
> 
> 2009/8/7 Richard mailto:richar...@gmail.com>>
>
>
> hi Alex,
>
> I am now using this automatic breadcrumb function:
>
>
> def breadcrumbs():
>"Create breadcrumb links for current request"
># make links pretty by capitalizing and using 'home' instead of
> 'default'
>pretty = lambda s: s.replace('default', 'home').replace('_', '
> ').capitalize()
>menus = [A('Home', _href=URL(r=request, c='default', f='index'))]
>if request.controller != 'default':
># add link to current controller
>menus.append(A(pretty(request.controller), _href=URL
> (r=request, c=request.controller, f='index')))
>if request.function == 'index':
># are at root of controller
>menus[-1] = pretty(request.controller)
>else:
># are at function within controller
>menus.append(pretty(request.function))
>return 

Re: [web2py:37939] Re: Patch to Cache

2009-12-28 Thread Alex Fanjul
Thadeus, your web interface its simply awesome!, clear and nice... what 
is this blogitize about? could you tell us something more?
Thanks in advance,
Alex F

El 28/12/2009 15:56, mdipierro escribió:
> I also like the screenshot. Would you add a page to appadmin?
>
> On Dec 28, 5:43 am, Thadeus Burgess  wrote:
>
>> Hey Massimo, would you take a patch to Cache that allows it to keep
>> track of its hit ratio? It is nice from a profiling prospective, so
>> that you can easily determine if you have your cache settings too high
>> or too low.
>>
>> Here is a screenshot of it in action...
>>
>> http://static.thadeusb.com/web2py-cache-thadeusb-admin.png
>>
>> Here is the diff on google code...
>>
>> http://code.google.com/r/thadeusburgess-web2py/source/diff?spec=svnf6...
>>
>> What is the command to make a diff of just one file in hg, from
>> revision to revision?
>>
>> -Thadeus
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37813] Twill + Web2Py

2009-12-24 Thread Alex Fanjul
Hello Again, could somebody help me saying how to redirect stdout to the 
page renderer?
I'm trying all the combinatios in twill method "twill.set_output( )"  
but I can't manage with this.
Thanks
Alex F

El 23/12/2009 2:56, Alex Fanjul escribió:
> I'm trying with something like:
> twill.set_output(response.render)
> without luck by now.
>
> I don't know where to catch the object which render the output to views.
>
> El 23/12/2009 2:43, Alex Fanjul escribió:
>> Has somebody got to work with twill+web2py? (Im using Apache + mod_wsgi)
>> I'm trying to navigate to some page and show the html in my page 
>> (return of my index controller)
>>
>> I'm trying that, and it's my situation:
>>
>> 1) Succesful importing module: I installed and used " from twill 
>> import * "
>> 2) At first attempt it threw me and error: " IOError: sys.stdout 
>> access restricted by mod_wsgi "
>> 3) I used the trick to redirect stdout (spited from twill command 
>> line tool) to stderr: " sys.stdout = sys.stderr "
>> 4) Now it shows None in webpage but spite the html form through 
>> error.log Apache  (but that isnt what we want to)
>> 5) I investigated some deeper and found this -maybe- useful things:
>>
>> - From Twill Documentation <http://twill.idyll.org/python-api.html>:
>>
>> /You can capture command output by passing any write-enabled file 
>> handle to twill.set_output, e.g.
>> twill.set_output(StringIO()) will send all non-error output into a 
>> StringIO() object./
>>
>> Could I use that to redirect to page renderer or a string to return 
>> from controller? I'm sorry I'm newby in python
>>
>> - Another interesting thing I found is a  " wsgi_intercept.py " file 
>> in twill, which say
>>
>> /wsgi_intercept.WSGI_HTTPConnection is a replacement for
>> httplib.HTTPConnection that intercepts certain HTTP connections into a
>> WSGI application.
>> Use 'add_wsgi_intercept' and 'remove_wsgi_intercept' to control this 
>> behavior./
>>
>> I don't know if it is necessary to use Twill with 
>> Web2py+Apache+mod_wsgi. In my first attempt it seems that spited out 
>> well the html form options to error.log.
>>
>> So the question is, how to redirect all twill output to page renderer 
>> or wsgi handle, or whatever...
>> Thanks in advance,
>> Alex F
>>
>>
>> El 11/11/2009 23:06, David escribió:
>>> Hey guys,
>>>
>>> I've been studying up on working with scraping/parsing and remote
>>> logins for sites that don't have APIs and I came across Twill.
>>>
>>> Have any of you used it to automate things like login and screen/html
>>> parsing?
>>>
>>> It would be nice to be able to login to a remote site via a model/
>>> controller and pull a small clip of html and stick it on a view
>>> somewhere.
>>>
>>> I've got it working nicely on the shell and it seems quite promising
>>> but it doesn't readily appear to me how I would use something like
>>> this from inside web2py.
>>>
>>> Are there any examples that I can have a look at while I am still
>>> learning about web2py?
>>>
>>> Thanks in advance!
>>>
>>> - David
>>> --~--~-~--~~~---~--~~
>>> You received this message because you are subscribed to the Google Groups 
>>> "web2py-users" group.
>>> To post to this group, send email toweb...@googlegroups.com
>>> To unsubscribe from this group, send email 
>>> toweb2py+unsubscr...@googlegroups.com
>>> For more options, visit this group 
>>> athttp://groups.google.com/group/web2py?hl=en
>>> -~--~~~~--~~--~--~---
>>>
>>>
>>>
>>
>> -- 
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.com
>> www.mhproject.org
>
> -- 
> Alejandro Fanjul Fdez.
> alex.fan...@gmail.com
> www.mhproject.org

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37800] Happy Holidays

2009-12-24 Thread Alex Fanjul
Happy Holidays to all of you from Asturias (Spain) too!
Have a nice day!
Alex F

El 24/12/2009 5:25, mdipierro escribió:
> I wish everybody Happy Holidays. I will probably be on the list as any
> other day.
>
> Massimo
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37715] Twill + Web2Py

2009-12-22 Thread Alex Fanjul
I'm trying with something like:
twill.set_output(response.render)
without luck by now.

I don't know where to catch the object which render the output to views.

El 23/12/2009 2:43, Alex Fanjul escribió:
> Has somebody got to work with twill+web2py? (Im using Apache + mod_wsgi)
> I'm trying to navigate to some page and show the html in my page 
> (return of my index controller)
>
> I'm trying that, and it's my situation:
>
> 1) Succesful importing module: I installed and used " from twill 
> import * "
> 2) At first attempt it threw me and error: " IOError: sys.stdout 
> access restricted by mod_wsgi "
> 3) I used the trick to redirect stdout (spited from twill command line 
> tool) to stderr: " sys.stdout = sys.stderr "
> 4) Now it shows None in webpage but spite the html form through 
> error.log Apache  (but that isnt what we want to)
> 5) I investigated some deeper and found this -maybe- useful things:
>
> - From Twill Documentation <http://twill.idyll.org/python-api.html>:
>
> /You can capture command output by passing any write-enabled file 
> handle to twill.set_output, e.g.
> twill.set_output(StringIO()) will send all non-error output into a 
> StringIO() object./
>
> Could I use that to redirect to page renderer or a string to return 
> from controller? I'm sorry I'm newby in python
>
> - Another interesting thing I found is a  " wsgi_intercept.py " file 
> in twill, which say
>
> /wsgi_intercept.WSGI_HTTPConnection is a replacement for
> httplib.HTTPConnection that intercepts certain HTTP connections into a
> WSGI application.
> Use 'add_wsgi_intercept' and 'remove_wsgi_intercept' to control this 
> behavior./
>
> I don't know if it is necessary to use Twill with 
> Web2py+Apache+mod_wsgi. In my first attempt it seems that spited out 
> well the html form options to error.log.
>
> So the question is, how to redirect all twill output to page renderer 
> or wsgi handle, or whatever...
> Thanks in advance,
> Alex F
>
>
> El 11/11/2009 23:06, David escribió:
>> Hey guys,
>>
>> I've been studying up on working with scraping/parsing and remote
>> logins for sites that don't have APIs and I came across Twill.
>>
>> Have any of you used it to automate things like login and screen/html
>> parsing?
>>
>> It would be nice to be able to login to a remote site via a model/
>> controller and pull a small clip of html and stick it on a view
>> somewhere.
>>
>> I've got it working nicely on the shell and it seems quite promising
>> but it doesn't readily appear to me how I would use something like
>> this from inside web2py.
>>
>> Are there any examples that I can have a look at while I am still
>> learning about web2py?
>>
>> Thanks in advance!
>>
>> - David
>> --~--~-~--~~~---~--~~
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email toweb...@googlegroups.com
>> To unsubscribe from this group, send email 
>> toweb2py+unsubscr...@googlegroups.com
>> For more options, visit this group 
>> athttp://groups.google.com/group/web2py?hl=en
>> -~--~~~~--~~--~--~---
>>
>>
>>
>
> -- 
> Alejandro Fanjul Fdez.
> alex.fan...@gmail.com
> www.mhproject.org

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37714] Twill + Web2Py

2009-12-22 Thread Alex Fanjul
Has somebody got to work with twill+web2py? (Im using Apache + mod_wsgi)
I'm trying to navigate to some page and show the html in my page (return 
of my index controller)

I'm trying that, and it's my situation:

1) Succesful importing module: I installed and used " from twill import * "
2) At first attempt it threw me and error: " IOError: sys.stdout access 
restricted by mod_wsgi "
3) I used the trick to redirect stdout (spited from twill command line 
tool) to stderr: " sys.stdout = sys.stderr "
4) Now it shows None in webpage but spite the html form through 
error.log Apache  (but that isnt what we want to)
5) I investigated some deeper and found this -maybe- useful things:

- From Twill Documentation :

/You can capture command output by passing any write-enabled file handle 
to twill.set_output, e.g.
twill.set_output(StringIO()) will send all non-error output into a 
StringIO() object./

Could I use that to redirect to page renderer or a string to return from 
controller? I'm sorry I'm newby in python

- Another interesting thing I found is a  " wsgi_intercept.py " file in 
twill, which say

/wsgi_intercept.WSGI_HTTPConnection is a replacement for
httplib.HTTPConnection that intercepts certain HTTP connections into a
WSGI application.
Use 'add_wsgi_intercept' and 'remove_wsgi_intercept' to control this 
behavior./

I don't know if it is necessary to use Twill with 
Web2py+Apache+mod_wsgi. In my first attempt it seems that spited out 
well the html form options to error.log.

So the question is, how to redirect all twill output to page renderer or 
wsgi handle, or whatever...
Thanks in advance,
Alex F


El 11/11/2009 23:06, David escribió:
> Hey guys,
>
> I've been studying up on working with scraping/parsing and remote
> logins for sites that don't have APIs and I came across Twill.
>
> Have any of you used it to automate things like login and screen/html
> parsing?
>
> It would be nice to be able to login to a remote site via a model/
> controller and pull a small clip of html and stick it on a view
> somewhere.
>
> I've got it working nicely on the shell and it seems quite promising
> but it doesn't readily appear to me how I would use something like
> this from inside web2py.
>
> Are there any examples that I can have a look at while I am still
> learning about web2py?
>
> Thanks in advance!
>
> - David
> --~--~-~--~~~---~--~~
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web2py@googlegroups.com
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en
> -~--~~~~--~~--~--~---
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37708] Web2py and MongoDB

2009-12-22 Thread Alex Fanjul
You are not the only one Pystar!! I'm impatient too!! :-D
Alex F

El 23/12/2009 0:11, Thadeus Burgess escribió:
> The DAL is being rewritten, and MongoDB is one of the new back ends 
> that web2py will support. It will be about another month and a half 
> before it is ready.
>
> -Thadeus
>
>
>
>
> On Tue, Dec 22, 2009 at 4:47 PM, Pystar  > wrote:
>
> This question has been asked before, but I would like to know the
> extent of support that Web2py's DAL has for MongoDB. I stumbled on it,
> and I am finding it very interesting and innovative, but will like to
> try it with Web2py.
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "web2py-users" group.
> To post to this group, send email to web2py@googlegroups.com
> .
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>
>
> --
>
> You received this message because you are subscribed to the Google 
> Groups "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37678] nginx + web2py T3 application

2009-12-22 Thread Alex Fanjul
Do you use Nginx with Apache or only Nginx? I tried to manage Nginx (as 
frontend for statics files) + Apache (for python) without success yet.
Alex F

El 22/12/2009 9:35, shuval escribió:
> http://istt-nsk.ru  csstemplate in freecsstemplates.org spontaneous. I
> managed site T3 application. Database is Fiebird ( I changed in
> controllers/default.py and modules/t2.py field password to
> passwordq).
>
> nginx.conf
>
> server {
>  listen   istt-nsk.ru:80;
>  server_name  istt-nsk.ru;
>  access_log  /var/log/nginx/
> balder161.startdedicated.com.access.log;
>  location / {
>  set $fixed_destination $http_destination;
>  if ($http_destination ~* ^https(.*)$)
>  {
>  set $fixed_destination http$1;
>  }
>  proxy_pass http://127.0.0.1:8000;
>  proxy_set_header Host $host;
>  proxy_set_header X-Real-IP $remote_addr;
>  #   proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarder_for;
>  proxy_set_header X-Forwarded-For $remote_addr;
>  proxy_set_headerDestination $fixed_destination;
>  }
> }
>
>
> It is very interesting. It is work!)
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37642] Re: Delete File

2009-12-21 Thread Alex Fanjul
That is just what I referred in my last email, but maybe it didn't 
understand or I didn't explain myself with the correct words... Maybe 
there is a lack of "standard" ways of doing things like this one Yarko 
comment... in this case what if we would have a "standards" heritable 
methods  acting as transversal catchable hooks, like "ondelete", 
"oncreate", "onloaded", "onvalidate", "onaccess" (I know this it is), 
maybe to be able to i.e. "do something when framework load a Form, or 
delete a Field, or create a Button, or even access to Admin, or..."  
This way and "interoperable/cross" paragraph (or matrix table) in 
documentation would be sufficient to explain some manageable object 
actions.  Sorry If I'm wrong.

Regards,
Alex F

El 22/12/2009 6:31, Yarko Tymciurak escribió:
> On Dec 21, 11:07 pm, Thadeus Burgess  wrote:
>
>> dope...
>>  
> What!?!  You mean this wasn't intuitively _obvious_?  (ha!  It sure
> isn't to me, and I wouldn't expect anyone else - although once this
> has bitten you a time or two, it becomes memorable)
>
> No, no dope at all
>
> There are a lot of fields for the Field() constructor, and this is a
> sort of extra-sql "ondelete" one ... would it be "more intuitive" (?)
> if it were just a special, extra-sql behavior, an extension of
> 'ondelete'? ...
>
> You (everyone) probably wants to get familiar with the section,
> starting on P.154 of the 2009/v2 manual on the Field() constructor,
> and it's defaults.  Curiously, it is under section 6.4, titled
> "Migrations" (which is probably just a mistake; there could have been
> an additional section/name):
>
> • autodelete - determines if the corresponding uploaded file should be
> deleted when the record referencing the file is deleted. For "upload"
> fields only.
>
> - Yarko
>
>
>> http://markmail.org/message/vdyy5j5fclv2vgnh#query:web2py%20delete%20...
>>
>> :)
>>
>> [SOLVED]
>>
>> -Thadeus
>>
>> On Mon, Dec 21, 2009 at 10:57 PM, Thadeus 
>> Burgesswrote:
>>
>>
>>
>>  
>>> If I am deleting an upload field from my database, how do I also seamlessly
>>> remove its corresponding file?
>>>
>>  
>>> Currently I have a query as such. Would I need to perform a select query
>>> first, looping through the filenames and using os.unlink to delete these
>>> files, and then remove the record from the database?
>>>
>>  
>>> db(my_super_awesome_cleaning_query).delete()
>>>
>>  
>>> -Thadeus
>>>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37317] web2py blog screencast

2009-12-15 Thread Alex Fanjul
Downloading!!! does it include any new feature Mengu? or are the book 
standard ones?
Thanks a lot!
Alex F

El 16/12/2009 4:01, Mengu escribió:
> hi everyone,
>
> i have recorded a blog screencast which i think may help many web2py
> beginners. it includes:
> - how to use sqlform,
> - how to customize sqlform,
> - how to use DAL,
> - how to use joins,
> - how to create categories
> - how to implement tagging
> - how to add new menus
>
> i tried to be clean on the codes as much as possible but didn't pay
> attention on styling / design of the pages. please download the
> screencast at http://rapidshare.com/files/321445375/blogscreencast.mp4.zip
> and let me know your thoughts.
>
> Mengu
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37296] ¿Too much Tricky?

2009-12-15 Thread Alex Fanjul
Very good trick that I had forgotten Mr.Freeze!!!

Massimo, (all), let me please do some meditation...
Even though I really think web2py its by far the best and rising python 
framework outhere, many times it comes to my mind one word: "tricky".
Let me explain, tricky (in the good sense), because there are a lot of 
things that we should (or need) to do with some hidden snippet somebody 
did lost among thousands of group mails in the past.
I usually tick as favorite all the useful snippet mails, and really love 
web2pyslices, but... it seems not sufficient for me (as newby programmer)...
The fact is that I don't really know the cause (maybe the backward 
compatibility, rapid raising?) neither solution (maybe more planning, 
documentation?).

Just a reflection, What do you think about?,
Alex F


El 15/12/2009 23:17, mr.freeze escribió:
> element and elements take any combination of args and keywords and
> cycle through the form components looking for match(es)
>
> form.element('input',_type='text')# grabs the first text input
> form.elements('input',_type='text')# grabs all text inputs
>
> form.elements('input','textarea') # grabs all inputs and textareas
>
> On Dec 15, 2:02 pm, waTR  wrote:
>
>> Is there a definition of all possible arguments for form.element and
>> some examples somewhere?
>>
>> I am mainly looking to use it with SQLForm and factory().
>> Specifically, I want to create a form with SQLForm&  factory, and then
>> modify some of the elements to be things other than text boxes, i.e.
>> to change some to drop-downs with some choices, and others to radio
>> buttons, etc.
>>
>> Is the above possible? And with what element argument?
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37258] Re: Excess whitespace in html

2009-12-15 Thread Alex Fanjul
Hello Kbochert, it seems you found out a way to make cleaner output, do 
you get it working automatically? (ie. with out manual action for output 
clean process)
I'm thinking in alway pass dictionaris throught filter function so 
instead of return dict we'd return filter(dict) but I'm not sure if it 
would be right.
Could you give me the steps or snippet example to achieve this?

Finally, did you find any disadventages doing this? errors, slower 
speed, etc...

Thanks a lot,
Alex F

El 15/12/2009 17:13, kbochert escribió:
> Jonathon wrote:
>
>> 2x seems like an awful lot, since a newline is only one byte. Are you sure?
>>  
> The  output typically has multiple leading spaces on those blank
> lines, presumably driven by the indenting of the original html.
>
> DenesL wrote:
>
>> Do you want you view or your final output to be legible and
>> aesthetically pleasing according to some subjective human standard?.
>>  
> Absolutely!
> For instance,  I'm currently looking for a designer to style my site.
> The first thing I do is surf to their home page and look at its source
> code!
> If I'm evangelizing web2py to colleagues, clean output helps. (makes
> me prouder of my work, at least)
>
>
> I tried massimos' code snippet
> def filter(d):
>  import re
>  if isinstance(d,dict):
>   return re.compile('\n\n').sub('\n',response.render(d))
>  return d
> response._caller=filter
>
> It failed, generating pages with a single line of html " index at 0x01A04C70>"
>-- but --
>
> def filter(d):
>  import re
>  if isinstance(d,dict):
>   return re.compile('\n\s\s+\n').sub('\n',response.render(d))
>  return re.compile('\n\s\s+\n').sub('\n',response.render(d()))
> response._caller=filter
>
> worked !beautifully!  When I take care to write the template cleanly,
> the rendering is also clean.
>
> This makes a distinction between empty lines (with no characters), and
> blank lines (containing only whitespace chars).
> blank lines are removed, empty lines are not. (whitespace matters!)
>
>
> It would be nice if web2py could make this its default rendering
> behavior.
>
> Are there other issues than  blocks?
>
>
> Karl
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37228] Re: SQLFORM, no-table, with fieldsets.

2009-12-15 Thread Alex Fanjul
Very good patch for tableless forms @Thadeus, I think it's a must for 
web2py to be tableless for at least to accomplish AA accesibility w3c.
Alex F

El 15/12/2009 0:00, Thadeus Burgess escribió:
> Take, for example:  http://jeffhowden.com/code/css/forms/
>
> With a form design as such, you can turn it easily into
>
> http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx
>
> A custom patch seems to be the most appropriate. Create a list, that
> represents the form, and use a function to chop through it.
>
> I am playing around with the following
>
> http://pastebin.com/m764d7a39
>
> Basically, it takes a list of lists, each sublist is a fieldset where
> if a element is a list it is the fieldset title, and if it is a tuple,
> it goes into the notes div.
>
> It formats the form and looks "almost" exactly like the one on the
> first link (with the appropriate css. Then using the formtowizard, it
> looks nice :)
>
> I am actually happier with this, since I believe allows for the most
> customization as far as form content goes.
>
> SQLFORM does need to be refactored into more MVC format I am
> thinking of SQLFORM only making the data ready, and performing the
> validation, and have a separate class that creates and renders the
> form elements.
>
> -Thadeus
>
>
>
>
>
> On Mon, Dec 14, 2009 at 4:20 PM, DenesL  wrote:
>
>> Many moons have passed since I last looked at this but if I remember
>> correctly I went for a class that was based on SQLFORM (currently
>> sitting in the back burner).
>>
>> SQLFORM mixes processing and presentation very tightly, which is fine
>> for starters but you soon get to a point where you want to keep the
>> processing but have a completely different presentation.
>>
>> My initial approach was the 'custom form' patch which is fine but
>> somewhat cumbersome.
>> The lastest is CSS based and it would allow easy form customization if
>> I can iron out some pending issues. I would love to hear your ideas,
>> specially about CSS.
>>
>> Denes.
>>
>>
>> On Dec 14, 12:51 pm, Thadeus Burgess  wrote:
>>  
>>> I would like to accomplish the output of the below, but use SQLFORM,
>>> and not mess with sqlform.custom.
>>>
>>> form = FORM(
>>>  FIELDSET(
>>>  LEGEND("Your Information"),
>>>  LABEL("Name:", _for="name"),
>>>  INPUT(_name="name"),
>>>  LABEL("Email:", _for="email"),
>>>  INPUT(_name="email"),
>>>  LABEL("Country:", _for="country"),
>>>  INPUT(_name="country"),
>>>  ),
>>>  FIELDSET(
>>>  LEGEND("Account Info"),
>>>  LABEL("Username:", _for="username"),
>>>  INPUT(_name="username"),
>>>  LABEL("Password:", _for="password"),
>>>  INPUT(_name="password"),
>>>  LABEL("Password Again:", _for="passwordrpt"),
>>>  INPUT(_name="passwordrpt"),
>>>  ),
>>>  )
>>>
>>> I am thinking an interface that allows mixing and matching of DIV
>>> based objects and fields.
>>> Should I a new form class be created, or a class that uses an existing
>>> forms sqlform.custom?
>>>
>>> Does anyone have any ideas on the best way to implement the functionality?
>>>
>>> SQLFORM.factory(
>>> FIELDSET(
>>> LEGEND("Your Information"),
>>> db.accounts.name,
>>> db.accounts.email,
>>> db.accounts.country,
>>>), FIELDSET(
>>> LEGEND("Account Info"),
>>> db.accounts.username,
>>> db.accounts.password,
>>> db.accounts.passwordrpt,
>>>   ),
>>> )
>>>
>>> Also on a side note, You can get the same functionality of forms (the
>>> table like layout) with pure CSS. I keep wondering why a TABLE was
>>> chosen for default forms, since it makes it impossible to style the
>>> form **layout** with CSS.
>>>
>>> -Thadeus
>>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>>
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@

Re: [web2py:37220] Re: web2py 1.74.1 is OUT

2009-12-15 Thread Alex Fanjul
MongoDB nicee!!!
I'm willing to see it!
Alex F

El 15/12/2009 5:34, mdipierro escribió:
> I made more changes in new DAL. It is broken badly now because it is
> in a the middle of a major change so that GAE and MongoDB can become
> simple adapters.
>
> Anyway, it passes some tests. You can try:
>
> cd gluon
> python dal.py
>
> Preliminary tests of the functions that work show that selects are 10%
> faster. This was a concern of mine, I thought it was going to be slow.
> No more string comparisons and table lookups.
>
> Take a look. Advice and comments are appreciated.
>
> Massimo
>
> On Dec 14, 10:23 pm, Massimo Di Pierro
> wrote:
>
>> It will only upgrade admin, welcome, examples and only overwrite those  
>> apps. It will not touch the other apps.
>>
>> Anyway. Make a backup first. ;-)
>>
>> Massimo
>>
>> On Dec 14, 2009, at 9:46 PM, Alex Fanjul wrote:
>>
>>  
>>> Hello Massimo,
>>> With the new characteristic of no need to upgrade, (if I  didn't any
>>> change to admin or welcome) is it safe to just (copy over) overwrite
>>> entirely web2py folder and execute "python2.5 web2py.py" at least  
>>> one time?
>>>
>>  
>>> Thanks
>>> Alex F
>>>
>>  
>>> El 14/12/2009 17:33, mdipierro escribió:
>>>
>>>> New features:
>>>> - Moved to mercurial
>>>> - Default validators use the new define_table(,format='...')
>>>> - New get_vars and post_vars compatible in 2.5 and 2.6 (thanks Tim)
>>>> - Major rewrite of gql.py extends DAL syntax on GAE, supports belongs
>>>> - No more *.w2p, welcome.w2p is create automatically, base apps are
>>>> always upgrade
>>>> - decimal validator allow negative numbers
>>>>  
>>  
>>>> 1.74.* is the last version with the old DAL. The new DAL is in gluon/
>>>> dal.py. To try out the new experimenatal DAL do
>>>>  
>>  
>>>>  cp gluon/dal.py gluon/sql.py
>>>>  
>>  
>>>> Please report any problem.
>>>>  
>>  
>>>> Massimo
>>>>  
>>  
>>>> --
>>>>  
>>  
>>>> You received this message because you are subscribed to the Google  
>>>> Groups "web2py-users" group.
>>>> To post to this group, send email to web...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> web2py+unsubscr...@googlegroups.com
>>>> .
>>>> For more options, visit this group 
>>>> athttp://groups.google.com/group/web2py?hl=en
>>>> .
>>>>  
>>  
>>> --
>>> Alejandro Fanjul Fdez.
>>> alex.fan...@gmail.com
>>> www.mhproject.org
>>>
>>
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37219] Re: Excess whitespace in html

2009-12-15 Thread Alex Fanjul
Forget my last sentence, Slimmer seems much better solution as Jonathan 
point us.
Alex F

El 15/12/2009 8:59, Alex Fanjul escribió:
> Hi Jonathan, I attatched both html with a very simple example in the 
> email showing double in size. Doesn't appear attached? I always write 
> from Thunderbird, so let me know.
>
> Massimo, ,maybe not whitespaces but strip more than one consecutive 
> blank lines?
> Alex F
>
> El 15/12/2009 7:37, Jonathan Lundell escribió:
>> On Dec 14, 2009, at 8:39 PM, Alex Fanjul wrote:
>>
>>> But... what about pages size?
>>> Doing some very basic test with Denes Example show us that including
>>> blank lines increase the output page size by *x2 factor* at least (ie.
>>> 67KB vs 130KB).
>>> Maybe I'm wrong, but, forgetting server deflating (which not everybody
>>> use), there are a double size in store and transmit bandwidth, that is
>>> money.
>>>
>>> If it isn't too dificult to implement I would prefer to see it legible
>>> in 'design' and 'running' time, because many times people review and
>>> debug webpages over generated code (I guess)
>> 2x seems like an awful lot, since a newline is only one byte. Are you 
>> sure?
>>
>> You could try slimmer: http://pypi.python.org/pypi/slimmer/
>>
>> -- 
>>
>> You received this message because you are subscribed to the Google 
>> Groups "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37218] Re: Excess whitespace in html

2009-12-14 Thread Alex Fanjul
Hi Jonathan, I attatched both html with a very simple example in the 
email showing double in size. Doesn't appear attached? I always write 
from Thunderbird, so let me know.

Massimo, ,maybe not whitespaces but strip more than one consecutive 
blank lines?
Alex F

El 15/12/2009 7:37, Jonathan Lundell escribió:
> On Dec 14, 2009, at 8:39 PM, Alex Fanjul wrote:
>
>
>> But... what about pages size?
>> Doing some very basic test with Denes Example show us that including
>> blank lines increase the output page size by *x2 factor* at least (ie.
>> 67KB vs 130KB).
>> Maybe I'm wrong, but, forgetting server deflating (which not everybody
>> use), there are a double size in store and transmit bandwidth, that is
>> money.
>>
>> If it isn't too dificult to implement I would prefer to see it legible
>> in 'design' and 'running' time, because many times people review and
>> debug webpages over generated code (I guess)
>>  
> 2x seems like an awful lot, since a newline is only one byte. Are you sure?
>
> You could try slimmer: http://pypi.python.org/pypi/slimmer/
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37209] web2py 1.74.1 is OUT

2009-12-14 Thread Alex Fanjul
Hello Massimo,
With the new characteristic of no need to upgrade, (if I  didn't any 
change to admin or welcome) is it safe to just (copy over) overwrite 
entirely web2py folder and execute "python2.5 web2py.py" at least one time?

Thanks
Alex F

El 14/12/2009 17:33, mdipierro escribió:
> New features:
> - Moved to mercurial
> - Default validators use the new define_table(,format='...')
> - New get_vars and post_vars compatible in 2.5 and 2.6 (thanks Tim)
> - Major rewrite of gql.py extends DAL syntax on GAE, supports belongs
> - No more *.w2p, welcome.w2p is create automatically, base apps are
> always upgrade
> - decimal validator allow negative numbers
>
> 1.74.* is the last version with the old DAL. The new DAL is in gluon/
> dal.py. To try out the new experimenatal DAL do
>
>  cp gluon/dal.py gluon/sql.py
>
> Please report any problem.
>
> Massimo
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36912] Quickly prototyping applications. Table management Snippet.

2009-12-09 Thread Alex Fanjul
Benigno, the cool thing would be a def method for all the tables, not 
one method for each table_name isnt it?
Alex F

El 09/12/2009 21:10, Thadeus Burgess escribió:
> Anything wrong with appadmin?
>
>
> -Thadeus
>
>
>
>
>
> On Wed, Dec 9, 2009 at 6:30 AM, Benigno  wrote:
>
>> Hello,
>>
>>I have posted a very basic snippet to quickly prototype
>> applications, that I use again and again and saves me quite a bit of
>> time. Its basically just to Select, Update and create records from a
>> table in a single controller function.
>>
>>I know its not much but it will probably help newcomers to spend
>> less time on each table that needs management.
>>
>>Find it at:
>> http://www.web2pyslices.com/main/slices/take_slice/42
>>
>> (I hope this is not out of the rules of the board now. If it is, just
>> let me know please).
>>
>> Cheers,
>> Benigno.
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>>
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36889] Re: Apache vs Cherokee vs all the rest

2009-12-09 Thread Alex Fanjul
Hi Graham,
I have configured an Apache+web2py corretcly in VPS hosting, but I'd 
like to give a try to Nginx (I tried to set it up but without success), 
could you give us an example configuration of Nginx+Apache+web2py? My 
Apache conf (now) its the typical one with the DaemonProcess, 
ProcessGroup and ScriptAlias...

Thanks
Alex F


El 09/11/2009 22:58, Graham Dumpleton escribió:
>
>
> On Nov 10, 3:10 am, Thadeus Burgess  wrote:
>
>> I use apache on virtualhost at slicehost running multiple web2py
>> virtualhosts.
>>
>> With one web2py instance, my server stands at around 90MB average for
>> memory, it *might* spike up to 115MB if I start some ram caching, however my
>> reports have never reported anything higher. I am running apache with
>> mod_wsgi. Also I havn't seen anything faster :) I would say it's a toss up
>> between "Just Working" and "A couple more microseconds".
>>  
> The important thing is to use daemon mode of mod_wsgi on memory
> constrained systems and not embedded mode. Although Apache is slower
> at serving static files than nginx or Cherokee, if configured
> correctly you wouldn't expect to see much difference for your actual
> web2py application requests. This is because the underlying web server
> isn't going to be the bottleneck. Instead the performance bottleneck
> is going to be your web2py code and the database access.
>
> FWIW, a good middle ground is to use nginx as front end to Apache/
> mod_wsgi (daemon mode). The nginx server will serve static files and
> proxy everything else to Apache. This gives benefit of fast static
> file serving from nginx and nginx will also isolate Apache from slow
> HTTP clients due to how nginx buffers request/responses. This means
> that Apache is only bothered for absolute minimum time required to
> handle request and thus can do more with less Apache processes/threads
> and thus less memory.
>
> Graham
>
>
>> On Mon, Nov 9, 2009 at 5:45 AM, David  wrote:
>>
>>  
>>> I recently setup a VPS host over at Santrex.net for testing web2py.
>>> It took me about two shifts to get Cherokee installed and running with
>>> Web2Py.  What a pain.  For those others that seemed to miss
>>> "libcherokee-mod-libssl" that was a painful  lesson that could have
>>> been remarked elsewhere and saved a lot of time.
>>>
>>  
>>> One of the things I noticed was that while working on the server that
>>> sometimes I could get the HTML source output starting with a "0"
>>> followed by the headers and then the page content.  Ultimately this
>>> would cause an error and the page would fail to load.   I noticed this
>>> happened about every 10th request or sooner depending on the speed at
>>> which I was moving through the site.
>>>
>>  
>>> Fed up with this problem, I decided to install Apache server and
>>> configure a VirtualHost.  This installation took about 20 minutes
>>> including apt-get, ssl gen, and virtualhost setup etc.  It also works
>>> flawlessly even though it is a touch slower for what I am working on
>>> right now.
>>>
>>  
>>> Do any other people here use Cherokee?  Is it worth my time to chase
>>> down this page display problem?  The only drawbacks for Apache with me
>>> are the default memory configuration issues (it's a pig out of the box
>>> on a vps and limited if your memory is limited) and that it happens to
>>> be the slowest, as far as I can see, based on performance reports.
>>> That being said it's still rock solid when it comes to working with
>>> Web2Py.
>>>
> --~--~-~--~~~---~--~~
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web2py@googlegroups.com
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en
> -~--~~~~--~~--~--~---
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36884] Re: Pass class to widgets

2009-12-09 Thread Alex Fanjul
Hello Thadeus, Mr.Freeze,
What is this for? to acommodate the same stylish widgets across application?
Could you give me an full simply code example please? For example, do I 
should use this method to obscure a little bit all input texts backgrounds?

Finally, what is the best correct solution? Thadeus at python class code 
or Mr.Freez at xml tag replacing?

Thanks in advance,
Alex F.

El 08/11/2009 15:45, mr.freeze escribió:
> Seems like you could do the same to DIV.xml (which most helpers derive
> from I believe):
>
> def xml(self):
>  (fa, co) = self._xml()
>  if 'class="' in fa:
>  fa = fa.replace('class="','class="myclass ')
>  if not self.tag:
>  return co
>  if self.tag[-1:] == '/':
>  return '<%s%s />' % (self.tag[:-1], fa)
>  return '<%s%s>%s' % (self.tag, fa, co, self.tag)
>
> import gluon.html
> gluon.html.DIV.xml = xml
>
> On Nov 8, 8:18 am, "mr.freeze"  wrote:
>
>> If you want to append a class to every widget, you can replace the
>> _attributes static method of sqlhtml.FormWidget. Try this in your
>> model:
>> ...
>> @staticmethod
>> def _attributes(field, widget_attributes, **attributes):
>>  attr = dict(
>>  _id = '%s_%s' % (field._tablename, field.name),
>>  _class = field.type,
>>  _name = field.name,
>>  requires = field.requires,
>>  )
>>  attr.update(widget_attributes)
>>  attr.update(attributes)
>>  attr.update(_class=attr['_class'] + ' myclass') #<-NEW
>>  return attr
>>
>> import gluon.sqlhtml
>> gluon.sqlhtml.FormWidget._attributes = _attributes
>>
>> Or were you wanting to actually do it at the helper level?
>>
>> On Nov 8, 1:58 am, Thadeus Burgess  wrote:
>>
>>  
>>> But I don't want the labels to have this class, just the actual form
>>> elements
>>>
>>  
>>> -Thadeus
>>>
>>  
>>> On Sun, Nov 8, 2009 at 1:56 AM, Thadeus Burgesswrote:
>>>
>>  
 What would be the best way to automatically pass a certain class to every
 web2py form helper? (INPUT, TEXTAREA, etc..)
  
>>  
 -Thadeus
  
> --~--~-~--~~~---~--~~
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web2py@googlegroups.com
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en
> -~--~~~~--~~--~--~---
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36818] Re: possible ? WYSIWYG editor with integrated image upload

2009-12-08 Thread Alex Fanjul
Woww!! it seems outstanding!!! with clear and bright design!!
Alex F

El 08/12/2009 7:01, Darcy Clark escribió:
> Jon,
>
> Any chance you could put some notes on your approach together ? I
> think it would really help promote Web2py as a platform for CMS work.
> All we need now is a good plugin for state-based workflow ? ;)
>
> On Nov 26, 2:36 am, Jon Romero  wrote:
>
>> Sorry for the late reply!
>> I have already integrate CKEditor WITH uploading into web2py (check a
>> screenshot here:http://emotionull.com/blog_files/ckeditor.png) for a
>> new CMS my company is building (yeap, in web2py and probably it will
>> be released as opensource).
>> You just need to create an action/view to upload the file which
>> returns the vars CKEditorFuncNum and url:
>>
>> def upload_file():
>>  url = ""
>>  form = SQLFORM(db.files, showid=False, fields=['title',
>> 'uploaded_data'])
>>  if form.accepts(request.vars, session):
>>  response.flash = T('File uploaded successfully!')
>>  url = URL(r=request, f="download", args = db(db.files.title 
>> ==
>> request.vars.title).select(orderby=~db.files.created_on)
>> [0].uploaded_data)
>>
>>  return dict(form=form, cknum=request.vars.CKEditorFuncNum, url=url)
>>
>> If you have any problems, I could write a tutorial an release a small
>> app.
>>
>> On Nov 25, 2:33 pm, David  wrote:
>>
>>  
>>> Also found this:
>>>
>>  
>>> http://zerokspot.com/weblog/2009/09/09/custom-filebrowser-callbacks-c...
>>>
>>  
>>> On Nov 25, 5:53 am, David  wrote:
>>>
>>  
 I don't know if this helps but I've found this:
  
>>  
 http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(...
  
>>  
 and
  
>>  
 http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_(...)
  
>>  
 On Nov 19, 10:23 pm, Thadeus Burgess  wrote:
  
>>  
> I don't think it needs RPC. Just to return XML data.
>
>>  
> It shouldn't be hard, we just need to start gathering data that gets
> communicated between CKFinder and the server. They don't really have any
> examples for implementing backend code, since they expect you to use their
> written code, which is way more complicated than it needs to be.
>
>>  
> -Thadeus
>
>>  
> On Thu, Nov 19, 2009 at 10:18 PM, Wes James  wrote:
>
>>  
>> web2py has xmlrpc service - would that help any?
>>  
>>  
>> -wes
>>  
>>  
>> On Thu, Nov 19, 2009 at 9:05 PM, Thadeus Burgess
>> wrote:
>>  
>>> As far as integratingCKeditor, easy.
>>>
>>  
>>> Integrating something like CKFinder however, is a whole nother story. I
>>>
>> have
>>  
>>> been researching, and it seems that the backend code will need to be
>>>
>> ported
>>  
>>> from their examples, to web2py. CKFinder uses mostly XML to communicate
>>>
>> for
>>  
>>> file browsing etc, and with a little bit of firebug magic and some time,
>>>
>> I
>>  
>>> think a workable back end is possible.
>>>
>>  
>>> I'm thinking this can be designed as a web2py plug-in.
>>>
>>  
>>> -Thadeus
>>>
>>  
>>> On Thu, Nov 19, 2009 at 9:48 PM, Darcy Clark  wrote:
>>>
>>  
 I'm willing to help on this - however I'm hoping someone with a deeper
 knowledge of web2py can provide some guidance on where to start and
 best practice etc...
  
>>  
 On Nov 20, 12:26 pm, blackthorne  wrote:
  
> That was one my first intentions when I got into web2py. Just to say
> I'm willing to work for that. Get aWYSIWYGweb based editor like kupu
> or TinyMCE or FCKeditor in web2py for rich content handling. My idea
> for that would be to turn it as a optional setting (namely for the
> views).
> Afaik kupu started outside the Plone project but became "assimilated".
> Seems to me it should be possible to integrate it on any project but
> probably harder than with TinyMCE or FCKeditor/CKeditor.
>
>>  
> Anyone feels like putting hands-on this?
>
>>  
> On Nov 19, 12:09 am, Darcy Clark  wrote:
>
>>  
>> I've come to web2py from a Plone CMS background. Plone integrated a
>> WYSIWYGeditor called kupu which allowed theuploadand integration
>>  
>> of
>> 

Re: [web2py:36697] Re: Support for new HTTP/1.1 Methods

2009-12-07 Thread Alex Fanjul
Hi Fran,
In fact I saw it before and I tried to understand your code, but I'm 
afraid it's to complex for me because it's part of a big platform 
(sahana) with a lot of methods, variables, (lines of code) which I don't 
know.
Thanks anyway!!

El 07/12/2009 17:03, Fran escribió:
> On Dec 7, 3:50 pm, Alex Fanjul  wrote:
>
>> What I've never seen is a good example of RESTful services implemented
>> in web2py, I could see a lazy example from so much time ago (but not
>> clear example), If someone could upload a good Slice about this to
>> web2pyslices.com it would be perfect for all of us. Maybe some example
>> consuming some public REST service and implementing another REST service.
>>  
> I don't have a slice but we use REST within our project, so that could
> be extracted into a slice...maybe a good project for you? :)
>
> http://trac.sahanapy.org/browser/models/01_RESTlike_controller.py
> http://trac.sahanapy.org/wiki/RESTController
>
> F
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36688] Re: Support for new HTTP/1.1 Methods

2009-12-07 Thread Alex Fanjul
You are welcome,
What I've never seen is a good example of RESTful services implemented 
in web2py, I could see a lazy example from so much time ago (but not 
clear example), If someone could upload a good Slice about this to 
web2pyslices.com it would be perfect for all of us. Maybe some example 
consuming some public REST service and implementing another REST service.

REST its (and will) still kicking due to internet mobiles trending, and 
its small overhead.

Thanks
Alex F

El 07/12/2009 4:43, weheh escribió:
> Thanks, Alex, for helping me find this older thread on the topic:
> http://groups.google.com/group/web2py/browse_thread/thread/4b1af88db82df261/7bcf667b299d4581?lnk=gst&q=put+delete#7bcf667b299d4581
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36664] Support for new HTTP/1.1 Methods

2009-12-06 Thread Alex Fanjul
I thought that this methods (put and delete) was already implemented by 
massimo due to one email thread about this... isnt it?
Alex F

El 07/12/2009 3:00, weheh escribió:
> According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html,
> there are new methods in addition to the usual GET and POST methods,
> such as PUT, DELETE, TRACE and CONNECT. I would like to upgrade my
> web2py API to support some of these new methods. Is there any plan to
> support them in web2py?
>
> For instance, is there a plan to support request.delete.vars,
> request.put.vars, etc.?
>
> Also, I notice that when I BEAUTIFY(request), I see that
> request.wsgi.environ.REQUEST_METHOD is GET (or POST), but
> request.env.request_method is blank. Why would that be?
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36651] Re: HOW2Py

2009-12-06 Thread Alex Fanjul
John, my congratulations for your job in screen scrapping article!! Im 
now following it and its incredible good!!

Is it hang in any web2py related place? web2pyslice.com for example? It 
should be!

Alex F



El 20/07/2009 23:12, JohnMc escribió:
> Ok, here is a draft of the article -- 
> http://76.185.48.154/images/web2pyart1.pdf.
>
> Have not applied a great deal off formatting. Looking for input as to
> preferences in that regard.
>
> JohnMc
>
> On Jul 19, 10:13 pm, Yarko Tymciurak  wrote:
>
>> On Sun, Jul 19, 2009 at 7:49 PM, Tim Michelsen
>> wrote:
>>
>>
>>
>>  
 A directed question if I may. What tools do you use to create the rest
 doc that goes into Sphinx.
  
>>> I tried to show some here:
>>>
>>  
>>> http://bazaar.launchpad.net/~timmie/web2py/web2py-appdocu/annotate/he...
>>>
>> This was Timmies patch for web2py documenting - and his proposal to follow
>> numpy standards (a good starting point, I thought, and continue to think,
>> but too detailed for web2py sources). I got partway thru parsing this down
>> to what I thought would be useful essentials for web2py;  I need to send
>> this to Massimo.  In the end, too many people working at once, and no
>> coherent direction, so this confused the issue / task (too many / no chiefs;
>> incongruent effort), and I just dropped it until this aspect cooled (anyway,
>> other things in my life took priority at the time).
>>
>> I haven't tried prettytable (write python code to generate ascii table; but
>> could be useful to dump existing data).
>>
>> The shell scripts for making web2py specific sphinx docs I don't think apply
>> to your question of what tools do I use to create rest (that is, the
>> structured format of the content).
>>
>> But bottom line is still - you can easily just use a normal text editor
>>
>> To get a feel for this - to convince yourself that as a edit / contributor
>> this is "sane", just look at one of the "show source" links on any of the
>> sphinx docs
>> e.g.http://sphinx.pocoo.org/_sources/intro.txt 
>> ofhttp://sphinx.pocoo.org/intro.html;
>> other sphinx docs listed here:http://sphinx.pocoo.org/examples.html
>>
>> - Yarko
>>
>>
>>
>>  
>>> you can use a simple editor that involves good syntax highlighting. Like
>>> HTML...
>>>
>>  
>>> Or see the post on Lyx.
>>>
> --~--~-~--~~~---~--~~
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web2py@googlegroups.com
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en
> -~--~~~~--~~--~--~---
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36640] Re: Someone have examples using mongodb

2009-12-06 Thread Alex Fanjul
Thanks to both,
Will we see this great database implemented in DAL at any point in 
future Massimo?? :-D

Other thing: lxml its simply awesome!!! thanks for the people who 
recommended it !!!

Alex F

El 04/12/2009 20:01, Yarko Tymciurak escribió:
> On Dec 4, 10:08 am, Massimo Di Pierro  wrote:
>
>> They are very similar but  MongoDB has commercial support, is faster  
>> and the only one actually used in serious production environments.
>> CouchDB is more popular because ships with ubuntu.
>>  
> Looking at my 2 Ubuntu installs, CouchDB is not distributed with
> Ubuntu 9.04;
> it is included as part of the evolution email client in 9.10, and for
> desktop syncing:
>
> In Ubuntu 9.10, see:
> file:///usr/share/doc/python-couchdb/index.html
> and
> https://wiki/ubuntu.com/MeetingLogs/devweek0909/CouchDB  which has
> examples of using couchdb desktop
>
>
>> Massimo
>>
>> On Dec 4, 2009, at 10:00 AM, Alex Fanjul wrote:
>>
>>
>>
>>  
>>> +1 Im also pretty interested in have a key-value document oriented
>>> database implemented in web2py to do "real-time" services like  
>>> twitter,
>>> bitly, etc.
>>> I've heard about couchdb but not this one (mongDB), any major  
>>> differences?
>>>
>>  
>>> Alex F
>>>
>>  
>>> El 04/12/2009 4:10, mdipierro escribió:
>>>
>>>> It should be easy to port the DAL on mongoDB. Look into gluon/
>>>> contrib/
>>>> gql.py
>>>> I can help, I ma very much interested in this.
>>>>  
>>  
>>>> massimo
>>>>  
>>  
>>>> On Dec 3, 6:37 pm, Alexandre Andrade
>>>> wrote:
>>>>  
>>  
>>>>> I found some messages at the list talk about mongodb and maybe a
>>>>> DAL-like interface.
>>>>>
>>  
>>>>> Someone have examples of using web2py with mongobd?
>>>>>
>>  
>>>>> I'm planning work in a workflow/bpm app using it.
>>>>>
>>  
>>>>> Any help welcome.
>>>>>
>>  
>>>>> --
>>>>> Atenciosamente
>>>>>
>>  
>>>>> --
>>>>> =
>>>>> Alexandre Andrade
>>>>> Hipercenter.com
>>>>>
>>  
>>>> --
>>>>  
>>  
>>>> You received this message because you are subscribed to the Google  
>>>> Groups "web2py-users" group.
>>>> To post to this group, send email to web...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> web2py+unsubscr...@googlegroups.com
>>>> .
>>>> For more options, visit this group 
>>>> athttp://groups.google.com/group/web2py?hl=en
>>>> .
>>>>  
>>  
>>> --
>>> Alejandro Fanjul Fdez.
>>> alex.fan...@gmail.com
>>> www.mhproject.org
>>>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:36504] Re: Someone have examples using mongodb

2009-12-04 Thread Alex Fanjul
+1 Im also pretty interested in have a key-value document oriented 
database implemented in web2py to do "real-time" services like twitter, 
bitly, etc.
I've heard about couchdb but not this one (mongDB), any major differences?

Alex F

El 04/12/2009 4:10, mdipierro escribió:
> It should be easy to port the DAL on mongoDB. Look into gluon/contrib/
> gql.py
> I can help, I ma very much interested in this.
>
> massimo
>
> On Dec 3, 6:37 pm, Alexandre Andrade  wrote:
>
>> I found some messages at the list talk about mongodb and maybe a
>> DAL-like interface.
>>
>> Someone have examples of using web2py with mongobd?
>>
>> I'm planning work in a workflow/bpm app using it.
>>
>> Any help welcome.
>>
>> --
>> Atenciosamente
>>
>> --
>> =
>> Alexandre Andrade
>> Hipercenter.com
>>  
> --
>
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:35337] Re: a slice from the maestro himself: ubuntu deployment script

2009-11-14 Thread Alex Fanjul

Nice Massimo, so the problem was the port, I didnt realize...
thanks

El 13/11/09 21:04, mdipierro escribió:
> What the script does is to start a web2py instance with admin from
> localhost only and port 8123. So http://127.0.0.1:8123/admin will work
>
> The admin interface is not exposed via http nor https at all.
>
> Massimo
>
>
> On Nov 13, 12:27 pm, Alex Fanjul  wrote:
>
>> But as far as I knew, we could access to admin secction either by remote
>> ssh (443) or by localhost (with 80), and now I'm on
>> localhost...actually,  :(
>> Alex F
>>
>> El 13/11/09 19:21, mdipierro escribió:
>>
>>
>>
>>  
>>> That is done on purpose. In production you should only access admin
>>> via ssh tunnel.
>>> You should not expose admin via http, not even with mod_proxy.
>>> If you read the script it tells you what to uncomment to expose admin
>>> via https
>>>
>>  
>>> On Nov 13, 12:00 pm, Alex Fanjulwrote:
>>>
>>  
>>>> Hi Mr Freeze,
>>>> After using this script in a clean ubuntu I cannot acceso to admin
>>>> section from localhost using http.
>>>> It shows:
>>>>  
>>  
>>>> Forbidden
>>>>  
>>  
>>>> You don't have permission to access /admin/default/index on this server.
>>>>  
>>  
>>>> I dont know if it is apache conf issue or user permisions issues...
>>>> sorry im not a linux master...
>>>> Alex F
>>>>  
>>  
>>>> El 12/11/09 17:23, mr.freeze escribió:
>>>>  
>>  
>>>>> http://www.web2pyslices.com/main/slices/take_slice/29
>>>>>
>>  
>>>> --
>>>> Alejandro Fanjul Fdez.
>>>> alex.fan...@gmail.comwww.mhproject.org
>>>>  
>> --
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.comwww.mhproject.org
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:35276] Re: a slice from the maestro himself: ubuntu deployment script

2009-11-13 Thread Alex Fanjul

But as far as I knew, we could access to admin secction either by remote 
ssh (443) or by localhost (with 80), and now I'm on 
localhost...actually,  :(
Alex F

El 13/11/09 19:21, mdipierro escribió:
> That is done on purpose. In production you should only access admin
> via ssh tunnel.
> You should not expose admin via http, not even with mod_proxy.
> If you read the script it tells you what to uncomment to expose admin
> via https
>
> On Nov 13, 12:00 pm, Alex Fanjul  wrote:
>
>> Hi Mr Freeze,
>> After using this script in a clean ubuntu I cannot acceso to admin
>> section from localhost using http.
>> It shows:
>>
>>Forbidden
>>
>> You don't have permission to access /admin/default/index on this server.
>>
>> I dont know if it is apache conf issue or user permisions issues...
>> sorry im not a linux master...
>> Alex F
>>
>> El 12/11/09 17:23, mr.freeze escribió:
>>
>>  
>>> http://www.web2pyslices.com/main/slices/take_slice/29
>>>
>> --
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.comwww.mhproject.org
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:/] Re: a slice from the maestro himself: ubuntu deployment script

2009-11-13 Thread Alex Fanjul
Hi Mr Freeze,
After using this script in a clean ubuntu I cannot acceso to admin 
section from localhost using http.
It shows:


  Forbidden

You don't have permission to access /admin/default/index on this server.


I dont know if it is apache conf issue or user permisions issues... 
sorry im not a linux master...
Alex F


El 12/11/09 17:23, mr.freeze escribió:
> http://www.web2pyslices.com/main/slices/take_slice/29
>
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34558] Re: new slices: jQueryUI slider and datepicker widgets

2009-11-04 Thread Alex Fanjul
The pain with the pingoworks autocomplete is that only complete words 
with a 'start-with' match, not a completed match, so you for example 
could find "New York" searching for 'New' but not searching for 'York', 
the same with surnames, etc.
One day I was searching such a kind of autocomplete for jquery and I 
couldnt find it...

Over all code I hardly understand this 3 lines, could you vaguely 
explain these...

| inp = SQLFORM.widgets.string.widget(f,v, **attr)  ¿add to widgets form a 
widget string function?
 scr1 = SCRIPT("jQuery('#%s').autocomplete('%s');" % 
(inp['_id'],items_url),_type="text/javascript") ¿generate script substituting 
the form widget and the items?
 wrapper.components.extend([inp,scr1]) (i got lost here at all :D)
|


Thanks Mr.freeze,
Alex F


El 03/11/2009 23:06, mr.freeze escribió:
> I have a cheesy autocomplete widget here. It's no match for the
> facebook version but might help someone:
>
> http://www.web2pyslices.com/main/slices/take_slice/24
>
>
> On Nov 3, 11:24 am, Alex Fanjul  wrote:
>
>> I love this kind of widget!!! maybe your next challene would be the so
>> famous "facebook-autocomplete".
>> Nowdays in facebook there is also a new feature where you can appoint a
>> "friend" writting "@friend" as twitter did it, but with autocompleter...
>>
>> By the way Mr. Freeze, I think we should talk with someone who proposed
>> and was working on a wrapper framework por jquery widgets...
>> I cant find the email She proposed us 3 options to choose for
>> implementation...
>>
>> Alex F
>>
>> El 03/11/2009 7:06, mr.freeze escribió:
>>
>>
>>
>>  
>>> Nothing like a slice of web2py before bedtime :) I'm going widget
>>> crazy! Here's an in-place edit widget that presents your text as a
>>> SPAN until you double click then it changes into an input.
>>>
>>  
>>> http://www.web2pyslices.com/main/slices/take_slice/23
>>>
>>  
>>> On Nov 3, 12:01 am, mdipierrowrote:
>>>
>>  
>>>> These slices taste excellent!
>>>>  
>>  
>>>> On Nov 2, 11:56 pm, "mr.freeze"wrote:
>>>>  
>>  
>>>>> Thanks, I updated it to specify adding to the model or controller.
>>>>>
>>  
>>>>> On Nov 2, 11:33 pm, mdipierrowrote:
>>>>>
>>  
>>>>>> Thank you Mr Freeze.
>>>>>>  
>>  
>>>>>> One comment. I do not think people should edit web2py_ajax.html.
>>>>>>  
>>  
>>>>>> response.files.append should go in plugin models or controller of the
>>>>>> plugin; or theshould go directly in the views.
>>>>>>  
>>  
>>>>>> Massimo
>>>>>>  
>>  
>>>>>> On Nov 2, 10:48 pm, "mr.freeze"wrote:
>>>>>>  
>>  
>>>>>>> Here are two ready to use widgets that employ the jQueryUI slider and
>>>>>>> datepicker:
>>>>>>>
>>  
>>>>>>> slider -http://www.web2pyslices.com/main/slices/take_slice/20
>>>>>>> datepicker -http://www.web2pyslices.com/main/slices/take_slice/22
>>>>>>>
>>  
>>>>>>> Have fun!
>>>>>>>
>> --
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.comwww.mhproject.org
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34252] Re: how to generate absolute url ?

2009-10-30 Thread Alex Fanjul

Thanks Yarko I'll give it a try!
Alex F

El 30/10/2009 19:58, Yarko Tymciurak escribió:
> this is standard RE (although Massimo has added some convenience
> forms, I didn't see any used in this thread)...
>
> Have you tried something like re-try.appspot.com?
>
>
> On 10/30/09, Alex Fanjul  wrote:
>
>> Massimo, the regexp you write is not the 'standard' regular expresions
>> (for example in htaccess), is it?
>> Do you know any online tool to check this expressions as this
>> http://gskinner.com/RegExr/ but for your kind of code?
>>
>> Thanks
>> alex f
>>
>> El 30/10/2009 6:33, mdipierro escribió:
>>  
>>> Sorry. I misunderstood.
>>>
>>> create a file web2py/routes.py and in it write
>>>
>>> routes_out=[('/admin/(?P.*)','https://hostname/admin/\g')]
>>>
>>> where hostname is your hostname or ip address and port.
>>>
>>> On Oct 29, 11:46 pm, akonsu   wrote:
>>>
>>>
>>>> Massimo,
>>>>
>>>> thanks for taking time to explain.
>>>>
>>>> my question is not about running admin over https or http and how
>>>> web2py detects this, or how to connect to admin using ssh. i was just
>>>> wondering how to emit the correct url. right now the default hello
>>>> world app emits relative url for the admin and the browser uses http
>>>> for this url if the hello world application runs over http. i wanted
>>>> to know how to force https for admin n the url. that is how to emit
>>>> the absolute url with the right scheme prefix. or am i missing
>>>> something?
>>>>
>>>> konstantin
>>>>
>>>>
>>>>  
>>>
>>>
>> --
>> Alejandro Fanjul Fdez.
>> alex.fan...@gmail.com
>> www.mhproject.org
>>
>>  
>>>
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34249] Re: Google Adsense

2009-10-30 Thread Alex Fanjul

This snippet sounds to me like a great plugin,  any volunteer? :-D
Alex F

El 30/10/2009 16:51, Chris S escribió:
> I've apparently got some orphaned HTML tags, so I'll get that all
> cleaned up.  I'm sure that's what's causing the problem.
>
> On Oct 30, 10:33 am, Chris S  wrote:
>
>> I'll see how I can best explain this.
>>
>> - Layout.html ---
>> 
>>  
>>
>>  
>>
>>  
>>  {{title=response.title or 'response.title'}}
>>  {{=A(title, _href=URL
>> (request.application,'default','index'))}}
>>  
>>  {{=response.subtitle or 'response.subtitle'}}
>>
>>  
>>  
>>
>>  
>>  {{=MENU(response.menu,_class='web2py-menu web2py-menu-
>> horizontal')}}
>>> width="10%">Toggle Filters
>>
>>  
>> ...
>> --
>>
>> That being a section of my layout.html, I was pasting the above code
>> after the {{=menu}} statement.  I'll poke around with firebug some
>> more if it sounds like a CSS problem.
>> Could having other JS items on the page be a problem?  I'll remove the
>> includes for the other scripts and see if that changes anything, now
>> that I know it 'should' work and it's a matter of my implementation.
>>
>> On Oct 30, 10:24 am, mdipierro  wrote:
>>
>>  
>>> works for me.
>>> Where did you put it exactly? Perhaps is a place hidden by the css?
>>>
>>  
>>> On Oct 30, 9:56 am, Chris S  wrote:
>>>
>>  
 I was trying to ad the google search bar from Adsense where I could
 search my web2py page with google.  The way it works after running
 through setup options you're given a code snippet to past into any
 page you want.  I figured it would be easy but It's not working 100%
 for me yet.
  
>>  
 The code google gives me to paste is:
 http://www.google.com/cse"; id="cse-search-box"
 target="_blank">

  
  
  
  

 
 http://www.google.com/cse/brand?
 form=cse-search-box&lang=en">
  
>>  
 Pasting this into my 'layout.html' page doesn't produce anything.
 However, pasting it into one of the html files that includes
 layout.html works just fine.  I wanted the search bar next to my menu
 in my layout.html, can someone tell me what the rub is here?
  
>>  
 I tried putting it in it's own .html file and doing an {{include
 'googlesearch.html'}} but that didn't work either.
 Thanks for the help.
  
>>
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34229] Re: web2py uglyness

2009-10-30 Thread Alex Fanjul

force_reload? its self explanatory.

El 30/10/2009 14:20, DenesL escribió:
> +1 rename 'force' to 'reload'
>
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34226] Re: how to generate absolute url ?

2009-10-30 Thread Alex Fanjul

Massimo, the regexp you write is not the 'standard' regular expresions 
(for example in htaccess), is it?
Do you know any online tool to check this expressions as this 
http://gskinner.com/RegExr/ but for your kind of code?

Thanks
alex f

El 30/10/2009 6:33, mdipierro escribió:
> Sorry. I misunderstood.
>
> create a file web2py/routes.py and in it write
>
> routes_out=[('/admin/(?P.*)','https://hostname/admin/\g')]
>
> where hostname is your hostname or ip address and port.
>
> On Oct 29, 11:46 pm, akonsu  wrote:
>
>> Massimo,
>>
>> thanks for taking time to explain.
>>
>> my question is not about running admin over https or http and how
>> web2py detects this, or how to connect to admin using ssh. i was just
>> wondering how to emit the correct url. right now the default hello
>> world app emits relative url for the admin and the browser uses http
>> for this url if the hello world application runs over http. i wanted
>> to know how to force https for admin n the url. that is how to emit
>> the absolute url with the right scheme prefix. or am i missing
>> something?
>>
>> konstantin
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34089] Re: New web2pyslice on Google Wave robot

2009-10-29 Thread Alex Fanjul

Massimo, we are not here, and we should!

http://wsgi.org/wsgi/Frameworks

Alex F

El 29/10/2009 16:32, mdipierro escribió:
> WSGI app

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34037] Re: plugin system again

2009-10-29 Thread Alex Fanjul

More on drupal modules development:
http://drupal.org/developing/modules

El 29/10/2009 5:46, mdipierro escribió:
> I agree. Can you help me find such articles?
>
> for now a plugin is just any subset of an app with a naming
> convention. This is just a place where to put something more
> structured eventually.
>
> On Oct 28, 9:07 pm, Álvaro Justen [Turicas]
> wrote:
>
>> If we are using plugins as "little apps" and it has controller, view
>> and model, I think it should have language too.
>> I think we are talking a lot about implementation and forgeting to
>> think more about the concept (what if we create some mind maps and
>> read some articles about plugin systems?).
>> We make a software that mantain backward compability so we need to
>> think more about decisions because it can be very ugly in future.
>>
>> --
>>   Álvaro Justen
>>   Peta5 - Nós fazemos TV Digital!
>>   21 3021-6001 / 9898-0141
>>   http://www.peta5.com.br/
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34036] Re: New web2pyslice on Google Wave robot

2009-10-29 Thread Alex Fanjul

Could you tell me some example of what is a wave robot for? Is it the 
same as a typical gtalk translator robot (en...@bot.talk.google.com) 
where you can send a word and he replay with traslation? or it is more 
advanced?

thanks
alex f

El 29/10/2009 9:11, hcvst escribió:
> http://www.web2pyslices.com/main/slices/take_slice/17
>
> Still work in progress, but testing locally seems to work.
>
> HC
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34035] Re: plugin system again

2009-10-29 Thread Alex Fanjul

This book shows how drupal modules works in detail...
http://mhproject.org/media/users/aleksdj/Learning.Drupal.6.Module.Development.May.2008.pdf

Alex F

El 29/10/2009 5:46, mdipierro escribió:
> I agree. Can you help me find such articles?
>
> for now a plugin is just any subset of an app with a naming
> convention. This is just a place where to put something more
> structured eventually.
>
> On Oct 28, 9:07 pm, Álvaro Justen [Turicas]
> wrote:
>
>> If we are using plugins as "little apps" and it has controller, view
>> and model, I think it should have language too.
>> I think we are talking a lot about implementation and forgeting to
>> think more about the concept (what if we create some mind maps and
>> read some articles about plugin systems?).
>> We make a software that mantain backward compability so we need to
>> think more about decisions because it can be very ugly in future.
>>
>> --
>>   Álvaro Justen
>>   Peta5 - Nós fazemos TV Digital!
>>   21 3021-6001 / 9898-0141
>>   http://www.peta5.com.br/
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:34013] Re: Searching

2009-10-28 Thread Alex Fanjul

Massimo, what about a full text database search engine, but at web2py 
level to abstract databases peculiarities?
Maybe its a silly idea...
Alex F

El 29/10/2009 2:21, mdipierro escribió:
> I think it does not show because you overwrite the variable at every
> iteration
> I would try something like this
>
> def index():
>  key=request.vars.baton
>  records = {}
>  for tablename in db.tables:
>  table=db[tablename]
>  fields=[table[fieldname] for fieldname in table.fields]
>  queries=[field.like('%'+key+'%') for field in fields if
> field.type in ['text','string']]
>  query=reduce(lambda x,y: x|y,queries)
>  records[tablename]=db(query).select()
>  return dict(records)
>
> It should display a list of records that match by any field without
> duplicates
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:33984] Re: New web2pyslice on deploying web2py to slicehost, or other VPS.

2009-10-28 Thread Alex Fanjul

Definitelly I Lilke web2py slices!!
Great Slice, I hope it works for vps.net too.

thanks Thadeus,
Alex F

El 28/10/2009 19:11, mr.freeze escribió:
> Excellent! I gave it 5 stars.  Don't forget to subscribe to comments
> if you want to be alerted when people post feedback.
>
> On Oct 28, 1:08 pm, Thadeus Burgess  wrote:
>
>> Here is a quickstart guide to deploying web2py on slicehost vps. This is how
>> I set up surrenderthebooty.thadeusb.com
>>
>> http://www.web2pyslices.com/main/slices/take_slice/14
>>
>> -Thadeus
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:33948] Re: bug in Rows.last()

2009-10-28 Thread Alex Fanjul
I agree with Jonathan, (find) and (exclude) are the best.
Filter is like "let me this in the result" (just the opposite sense), 
and remove is like "real remove this from my database"

So... '*Find*' this in my rows, BUT also *Exclude *this from my results!

Alex F

El 28/10/2009 18:23, Jonathan Lundell escribió:
> On Oct 28, 2009, at 9:58 AM, mdipierro wrote:
>
>
>> On a third thougth. Mr Freeze original names are better (find and
>> filter it is).
>>  
> Your use of 'filter' (or my confusion about it) for both cases
> illustrates its ambiguity. How about 'find' and 'exclude'?
>
>
>> I added slices too. Here is an example:
>>
>>
>> b=DAL('sqlite://storage')
>> db.define_table('a',Field('b'))
>> db.a.insert(b='aaa')
>> db.a.insert(b='aab')
>> db.a.insert(b='abb')
>> db.a.insert(b='bbb')
>>
>> ### return rows that match condition
>> rows=db(db.a.id>0).select().find(lambda row: row.b>0)
>>
>>  sort rows
>> rows0 = rows.sort(lambda row: row.b.upper()):
>>
>> rows1=db(db.a.id>0).select()
>> ### move matching rows from rows1 to rows2
>> rows2=rows1.filter(lambda row: row.b>'b')
>>
>> ### get a slice of the rows
>> rows3=rows[1:3]
>>
>> They can be mixed and matched
>>
>> rows=(rows1|rows2|rows3).find(..)[:].filter(..).sort(..)
>>
>> Now one implement at DAL level most functions missing on GAE like OR,
>> LIKE, BELONGS.
>>
>> Massimo
>>
>> On Oct 28, 11:17 am, mdipierro  wrote:
>>  
>>> Ok, I am going with filter (same as your find) and extract (same as
>>> your filter with some changes to make it faster and issue that caused
>>> it to skip some rows). In trunk now.
>>>
>>> Massimo
>>>
>>> On Oct 28, 10:51 am, "mr.freeze"  wrote:
>>>
>>>
 Now I'm confused :)  What if you just changed the 'where' to 'find'
 and kept both.  Filter should reduce the actual set, returning the
 removed rows.  Find should just return the matched rows.
  
>>>
 On Oct 28, 10:15 am, mdipierro  wrote:
  
>>>
> OK I just put the where function in trunk but renamed it filter
> (sorry
> for the confusion).
>
>>>
> On Oct 28, 10:11 am, Joe Barnhart  wrote:
>
>>>
>> I know, that's what I'm saying the word "where" suggests it
>> is an SQL
>> verb but it has nothing to do with SQL.  I was just thinking it
>> might be
>> confusing to new users of w2p.
>>  
>>>
>> On Wed, Oct 28, 2009 at 6:32 AM, mr.freeze
>>   wrote:
>>  
>>>
>>> No, anything post 'select' is done after the db call, including
>>> first
>>> () and last().
>>>
>>>
>>> On Oct 28, 2:51 am, Joe  Barnhart  wrote:
>>>
 I love the functionality, but doesn't calling the function
 "where"
 conjure up the SQL WHERE clause?  I might think it was doing
 something
 with SELECT...WHERE in the underlying DB.
  
>>>
 -- Joe B.
  
>>>
 On Oct 27, 10:11 pm, "mr.freeze"  wrote:
  
>>>
> Works! Would you be interested in these for sql.py Rows class?:
>
>>>
> def where(self,f):
>  if not self.response:
>  return None
>  rows = []
>  for i in range(0,len(self)):
>  row = self[i]
>  if f(row): rows.append(self.response[i])
>  return Rows(self._db,rows,*self.colnames)
>
>>>
> def filter(self,f):
>  if not self.response:
>  return None
>  rows = self.response
>  removed = []
>  for i in range(0,len(self)):
>  row = self[i]
>  if f(row):
>  removed.append(rows[i])
>  rows.remove(rows[i])
>  return Rows(self._db,removed,*self.colnames)
>
>>>
> Example:
> db.define_table('things',Field('category'))
> rows = db(db.things.id>0).select()
> tests = rows.where(lamdba row: row.category=="test") #
> returns matches
> rows.filter(lamdba row: row.category=="test")# removes and
> returns
> removed
>
>>>
> On Oct 27, 10:49 pm, mdipierro  wrote:
>
>>>
>> Thanks. Just fixed in trunk!
>>  
>>>
>> On Oct 27, 10:35 pm, "mr.freeze"  wrote:
>>  
>>>
>>> I get a syntax error when using this. I believe line 2926 of
>>> Rows.__getitem__ needs to be changed from:
>>>
>>>
>>> if i>= len(self.response) or i<  0:
>>>  

[web2py:33935] Re: bug in Rows.last()

2009-10-28 Thread Alex Fanjul

But filter function is in use for remove items, isnt it? maybe im wrong

def filter(self,f):
>  >  >  >   if not self.response:
>  >  >  >   return None
>  >  >  >   rows = self.response
>  >  >  >   removed = []
>  >  >  >   for i in range(0,len(self)):
>  >  >  >   row = self[i]
>  >  >  >   if f(row):
>  >  >  >   removed.append(rows[i])
>  >  >  >   rows.remove(rows[i])
>  >  >  >   return Rows(self._db,removed,*self.colnames)



El 28/10/2009 16:15, mdipierro escribió:
> OK I just put the where function in trunk but renamed it filter (sorry
> for the confusion).
>
>
> On Oct 28, 10:11 am, Joe Barnhart  wrote:
>
>> I know, that's what I'm saying the word "where" suggests it is an SQL
>> verb but it has nothing to do with SQL.  I was just thinking it might be
>> confusing to new users of w2p.
>>
>> On Wed, Oct 28, 2009 at 6:32 AM, mr.freeze  wrote:
>>
>>  
>>> No, anything post 'select' is done after the db call, including first
>>> () and last().
>>>
>>  
>>> On Oct 28, 2:51 am, Joe  Barnhart  wrote:
>>>
 I love the functionality, but doesn't calling the function "where"
 conjure up the SQL WHERE clause?  I might think it was doing something
 with SELECT...WHERE in the underlying DB.
  
>>  
 -- Joe B.
  
>>  
 On Oct 27, 10:11 pm, "mr.freeze"  wrote:
  
>>  
> Works! Would you be interested in these for sql.py Rows class?:
>
>>  
> def where(self,f):
>  if not self.response:
>  return None
>  rows = []
>  for i in range(0,len(self)):
>  row = self[i]
>  if f(row): rows.append(self.response[i])
>  return Rows(self._db,rows,*self.colnames)
>
>>  
> def filter(self,f):
>  if not self.response:
>  return None
>  rows = self.response
>  removed = []
>  for i in range(0,len(self)):
>  row = self[i]
>  if f(row):
>  removed.append(rows[i])
>  rows.remove(rows[i])
>  return Rows(self._db,removed,*self.colnames)
>
>>  
> Example:
> db.define_table('things',Field('category'))
> rows = db(db.things.id>0).select()
> tests = rows.where(lamdba row: row.category=="test") # returns matches
> rows.filter(lamdba row: row.category=="test")# removes and returns
> removed
>
>>  
> On Oct 27, 10:49 pm, mdipierro  wrote:
>
>>  
>> Thanks. Just fixed in trunk!
>>  
>>  
>> On Oct 27, 10:35 pm, "mr.freeze"  wrote:
>>  
>>  
>>> I get a syntax error when using this. I believe line 2926 of
>>> Rows.__getitem__ needs to be changed from:
>>>
>>  
>>> if i>= len(self.response) or i<  0:
>>>
>>  
>>> ...to...
>>>
>>  
>>> if i>= len(self.response):
>>>
>>  
>>> since Rows.last() returns self[-1]
>>>
>>
>>  
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:33932] Re: yet more stuff in trunk

2009-10-28 Thread Alex Fanjul

We will have to document this 'database stuffs' very well because I'm 
lost with so many new features. The best documentation for me is finally 
an example like this  (maybe in more real context).
Thanks for new features Massimo,
Alex F

El 28/10/2009 16:08, mdipierro escribió:
> ### given:
> db=DAL('sqlite://storage')
> db.define_table('a',Field('b'))
> db.a.insert(b='aaa')
> db.a.insert(b='aab')
> db.a.insert(b='abb')
> db.a.insert(b='bbb')
> row=db(db.a.id>0).select().first()
>
> ### you can do, as before
> print row.b
> row.update_record(b='yyy')
>
> ### or as you used to do in Django (NEW to web2py)
> row.b='xxx'
> row.save
> ()
> print row,b
>
> ### you can now also filter and sort at the web2py level searsh
> results (thanks Mr. Freeze) (NEW)
> rows=db(db.a.id>0).select().filter(lambda row: row.b>0).sort(lambda
> row: row.b.upper())
> for row in rows: print row.b
>
> >
>
>

-- 
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



  1   2   >