[web2py] flush cache

2010-02-16 Thread hamdy.a.farag
Hi

it's important that we've a cache say for example for example in a tag
cloud that shows the recently added products to database
but how can I force some cached function to flush cache and re-read
database based on certain situations
like [admin adds new product, and want to flush cache of a the
function that returns the product tag cloud]

I've 2 questions regarding this

Is this practical to have ?   [For me I faced situations that may need
this]
Is it possible ?

-- 
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: they are copying us....

2010-02-16 Thread pistacchio
hi massimo,
i really appreciate your work on web2py. the product is excellent,
i've just launched my first site using it and other two are on the
work. i like the new documentation (how it's shaping up) and the way
you "rule" the community around web2py prove that your way is right. i
mean, you do a lot of work and coordinate inputs.

one thing i really don't understand is your approach to the opensource
philosophy. i already pointed it out weeks ago about the non free, pdf
documentation that is something really sick in a opensource
environment. fortunately i was not the only one thinking this way and,
in the end, the online book is now there and shining.

now, i think this "copying us" is utterly out of place. as you stated
somewhere, your sources of inspiration were initially django and
rails. are you copying them? did you make the idea of "web framework"
by yourself? were you the first one to come out with the mvc pattern?
i don't think so, and this is perfect.

the opensource community, seen as a whole, not as a series of rival
smaller communities that gather around isolated projects, drains its
power from the openness of the ideas, from making them circulate and
the word "copy", with the negative connotation of "plagiarize" hidden
within it, has nothing to do with this.
the guy may or may be not been inspired by web2py, but if he was, it
is a good thing that web2py did something so valid that other people
want to take inspiration from it. if he ends up writing a piece of
software that is better than the current web2py's online editor, we
can replace it with the new, better one and the circle will be
completed as opening an idea would lead to end up with a better
product. that's the whole point of opensource.

On Feb 16, 5:57 am, mdipierro  wrote:
> http://haineault.com/blog/125/
>
> P.S. Of course we have 3 years of head start and the web2py
> architecture was designed for this, theirs isn't.

-- 
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: how to NOT IN with DAL?

2010-02-16 Thread baloan
Thanks, Massimo. Are you sure about the "[db.t.day.max()]"?

I'll also check dal.py if I don't find it in the book. ;-)

@Thadeus: on a Sybase ASE MAX returns one row only. See below.

CREATE TABLE "mt_mytable" (
id int not null,
text varchar
)

insert into "tempdb"."guest"."mt_mytable" (id, text) values (1, 'a')
insert into "tempdb"."guest"."mt_mytable" (id, text) values (2, 'b')
insert into "tempdb"."guest"."mt_mytable" (id, text) values (3, 'c')
insert into "tempdb"."guest"."mt_mytable" (id, text) values (3, 'd')
commit

select MAX(id) from mt_mytable

>> 3


On Feb 16, 1:03 am, mdipierro  wrote:
> print
> db(db.t.day [db.t.day.max()]

-- 
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: they are copying us....

2010-02-16 Thread Mengu
actually i don't think massimo really meant "they are copying us" in
the way you understood. what i have understood from his sentence is
"this is an approval of our approach to how a framework should be"

On 16 Şubat, 11:25, pistacchio  wrote:
> hi massimo,
> i really appreciate your work on web2py. the product is excellent,
> i've just launched my first site using it and other two are on the
> work. i like the new documentation (how it's shaping up) and the way
> you "rule" the community around web2py prove that your way is right. i
> mean, you do a lot of work and coordinate inputs.
>
> one thing i really don't understand is your approach to the opensource
> philosophy. i already pointed it out weeks ago about the non free, pdf
> documentation that is something really sick in a opensource
> environment. fortunately i was not the only one thinking this way and,
> in the end, the online book is now there and shining.
>
> now, i think this "copying us" is utterly out of place. as you stated
> somewhere, your sources of inspiration were initially django and
> rails. are you copying them? did you make the idea of "web framework"
> by yourself? were you the first one to come out with the mvc pattern?
> i don't think so, and this is perfect.
>
> the opensource community, seen as a whole, not as a series of rival
> smaller communities that gather around isolated projects, drains its
> power from the openness of the ideas, from making them circulate and
> the word "copy", with the negative connotation of "plagiarize" hidden
> within it, has nothing to do with this.
> the guy may or may be not been inspired by web2py, but if he was, it
> is a good thing that web2py did something so valid that other people
> want to take inspiration from it. if he ends up writing a piece of
> software that is better than the current web2py's online editor, we
> can replace it with the new, better one and the circle will be
> completed as opening an idea would lead to end up with a better
> product. that's the whole point of opensource.
>
> On Feb 16, 5:57 am, mdipierro  wrote:
>
>
>
> >http://haineault.com/blog/125/
>
> > P.S. Of course we have 3 years of head start and the web2py
> > architecture was designed for this, theirs isn't.

-- 
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: how to NOT IN with DAL?

2010-02-16 Thread baloan
Hi Tiago,

you mean like this?

SELECT DAY FROM T WHERE DAY < '2007-12-04' ORDER BY DAY DESC LIMITBY 1

I remember this not working on Oracle 7.3.4 (yeah it is somewhat
outdated) because Oracle would sort only AFTER limiting the result
set. So, as a workaround this might not work on all databases.

Andreas

On Feb 16, 12:08 am, Tiago Almeida  wrote:
> Can't you sort by day and get the first?
> I don't know if max exists.
>
> Regards,
> Tiago

-- 
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: they are copying us....

2010-02-16 Thread Kuba Kucharski
lol, I understood "copying us" was clearly a semi-joke.. a sarcasm..
"why so serious, son?" :))


-- 
Kuba

-- 
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.



[web2py] Re: WSGI, Apache2, and web2py NOT at root

2010-02-16 Thread Christopher Steel
Thanks,

In our new documentation scheme would this become a comment in the now
online book?

C

On Feb 15, 11:10 am, mdipierro  wrote:
> I am changing this in trunk. I run into the same problem. The new
> script also prompts you for the admin password.
>
> On Feb 15, 9:31 am, Christopher Steel  wrote:
>
> > This is a "reprint" from web2pyslice located here 
> > ->http://www.web2pyslices.com/main/slices/take_slice/29anda comment I
> > left. Some of the other comments look like they could be helpful as
> > well, I notice at least one about an updated ubuntu install script.
> > Here is my comment regarding the Ubuntu Apache setup:
>
> > I got errors with that setup but when I tried changing the following
> > it worked with no Apache errors:
>
> > VirtualHost *:80>
> > WSGIDaemonProcess web2py user=www-data group=www-data display-name=%
> > {GROUP}
>
> > To be this:
>
> > VirtualHost *:80>
> > WSGIDaemonProcess web2py user=www-data group=www-data
>
> > lets Apache run with no error...
>
> > On Feb 13, 2:47 pm, Johann Spies  wrote:
>
> > > On 15 April 2009 18:30, Mark Larsen  wrote:
>
> > > > I did figure out a hack if anyone comes up against this problem:
>
> > > > RewriteEngine on
> > > > RewriteRule ^/[NAMEOFAPP](.*)$ /web2py/[NAMEOFAPP]$1 [PT,L]
> > > > WSGIScriptAlias /web2py /opt/web2py/wsgihandler.py
>
> > > > This essentially allows you to place web2py outside of root.
> > > > Mod_Rewrite then rewrites the URLs to fix what would be broken URLs so
> > > > when URL() function writes:
>
> > > I am trying to set up web2py alongside a php-site  behind apache and
> > > came across this thread.  I have tried to modify the configuration
> > > file created by Massimo's Ubuntu setup script using the above hint of
> > > a RewriteRule but it works only partially:
>
> > > I get the index page without the layout and css and no subsequent pages.
>
> > > I would appreciate some help to get this working.
>
> > > In the log I get:
> > > [Sat Feb 13 21:34:30 2010] [error] [client 196.36.153.134] File does
> > > not exist: /var/www/sadec
> > > [Sat Feb 13 21:34:42 2010] [error] [client 196.36.153.134] File does
> > > not exist: /var/www/sadec, referer:http://kbase.sun.ac.za/web2py/sadec
>
> > > The web2py stuff is in /home/www-data/web2py.
>
> > > My configuration:
>
> > > NameVirtualHost *:443
> > >    WSGIDaemonProcess web2py user=www-data group=www-data
> > >    WSGIProcessGroup web2py
> > >    RewriteEngine on
> > >    RewriteRule ^/[NAMEOFAPP](.*)$ /web2py/[NAMEOFAPP]$1 [PT,L]
> > >    WSGIScriptAlias /web2py /home/www-data/web2py/wsgihandler.py
>
> > > 
>
> > >   
> > >     AllowOverride None
> > >     Order Allow,Deny
> > >     Deny from all
> > >     
> > >       Allow from all
> > >     
> > >   
>
> > >   AliasMatch ^/([^/]+)/static/(.*) \
> > >            /home/www-data/web2py/applications/$1/static/$2
> > >   
> > >     Order Allow,Deny
> > >     Allow from all
> > >   
>
> > >   
> > >   Deny from all
> > >   
>
> > >   
> > >   Deny from all
> > >   
>
> > >   CustomLog /var/log/apache2/access.log common
> > >   ErrorLog /var/log/apache2/error.log
> > > 
>
> > > 
> > >   SSLEngine on
> > >   SSLCertificateFile /etc/apache2/ssl/self_signed.cert
> > >   SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key
>
> > >   WSGIProcessGroup web2py
>
> > >   WSGIScriptAlias /web2py /home/www-data/web2py/wsgihandler.py
>
> > >   
> > >     AllowOverride None
> > >     Order Allow,Deny
> > >     Deny from all
> > >     
> > >       Allow from all
> > >     
> > >   
>
> > >   AliasMatch ^/([^/]+)/static/(.*) \
> > >         /home/www-data/web2py/applications/$1/static/$2
>
> > >   
> > >     Order Allow,Deny
> > >     Allow from all
> > >   
>
> > >   CustomLog /var/log/apache2/access.log common
> > >   ErrorLog /var/log/apache2/error.log
> > > 
>
> > > Regards
> > > Johann

-- 
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: they are copying us....

2010-02-16 Thread Albert Abril
knowing the efforts that massimo did (and is doing) with web2py, almost
keepin it open, i got it as an intented joke.

of course is good taking ideas from here and from there, and makes
opensource better as possible.
this is why FLOSS rocks!

regards!

On Tue, Feb 16, 2010 at 11:17 AM, Kuba Kucharski
wrote:

> lol, I understood "copying us" was clearly a semi-joke.. a sarcasm..
> "why so serious, son?" :))
>
>
> --
> Kuba
>
> --
> 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.



Re: [web2py] Re: they are copying us....

2010-02-16 Thread Jason Brower
Hmm...
If I though someone was plagurizing my idea I would say it.  But I think
copy is the best term you could use here.  I don't know of a better way
to say it. Copy is an ok thing to say, it's just the media has turned it
into a bad thing. My two cents.
---
Best Regards,
Jason Brower
On Tue, 2010-02-16 at 01:25 -0800, pistacchio wrote: 
> hi massimo,
> i really appreciate your work on web2py. the product is excellent,
> i've just launched my first site using it and other two are on the
> work. i like the new documentation (how it's shaping up) and the way
> you "rule" the community around web2py prove that your way is right. i
> mean, you do a lot of work and coordinate inputs.
> 
> one thing i really don't understand is your approach to the opensource
> philosophy. i already pointed it out weeks ago about the non free, pdf
> documentation that is something really sick in a opensource
> environment. fortunately i was not the only one thinking this way and,
> in the end, the online book is now there and shining.
> 
> now, i think this "copying us" is utterly out of place. as you stated
> somewhere, your sources of inspiration were initially django and
> rails. are you copying them? did you make the idea of "web framework"
> by yourself? were you the first one to come out with the mvc pattern?
> i don't think so, and this is perfect.
> 
> the opensource community, seen as a whole, not as a series of rival
> smaller communities that gather around isolated projects, drains its
> power from the openness of the ideas, from making them circulate and
> the word "copy", with the negative connotation of "plagiarize" hidden
> within it, has nothing to do with this.
> the guy may or may be not been inspired by web2py, but if he was, it
> is a good thing that web2py did something so valid that other people
> want to take inspiration from it. if he ends up writing a piece of
> software that is better than the current web2py's online editor, we
> can replace it with the new, better one and the circle will be
> completed as opening an idea would lead to end up with a better
> product. that's the whole point of opensource.
> 
> On Feb 16, 5:57 am, mdipierro  wrote:
> > http://haineault.com/blog/125/
> >
> > P.S. Of course we have 3 years of head start and the web2py
> > architecture was designed for this, theirs isn't.
> 


-- 
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: they are copying us....

2010-02-16 Thread Albert Abril
(where i told **almost** i would say **especially**, i confused, sorry about
my english)

On Tue, Feb 16, 2010 at 2:07 PM, Albert Abril wrote:

> knowing the efforts that massimo did (and is doing) with web2py, almost
> keepin it open, i got it as an intented joke.
>
> of course is good taking ideas from here and from there, and makes
> opensource better as possible.
> this is why FLOSS rocks!
>
> regards!
>
>
> On Tue, Feb 16, 2010 at 11:17 AM, Kuba Kucharski  > wrote:
>
>> lol, I understood "copying us" was clearly a semi-joke.. a sarcasm..
>> "why so serious, son?" :))
>>
>>
>> --
>> Kuba
>>
>> --
>> 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.



[web2py] Re: they are copying us....

2010-02-16 Thread pistacchio
didn't get it as a joke, sorry for that :)

On Feb 16, 11:17 am, Kuba Kucharski  wrote:
> lol, I understood "copying us" was clearly a semi-joke.. a sarcasm..
> "why so serious, son?" :))
>
> --
> Kuba

-- 
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: IS_NULL_OR vs IS_IN_DB with brackets

2010-02-16 Thread villas
> db.dog.owner.requires = [IS_NULL_OR(IS_IN_DB(db, 'person.id', '))]

The last apostrophe still doesn't seem right,  either take it out,
or, try this (the name will be used in the drop down box):

db.dog.owner.requires = [IS_NULL_OR(IS_IN_DB(db, 'person.id', '%
(name)s'))]

-- 
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: On the online book

2010-02-16 Thread Nico de Groot
Online book is very usefull, nice touch that searching the book also
searches the Google group.
On the startingpage there is a link 'Complete API', but it doesn't
fulfill its semantic promise, it links to a page with just the helper
functions. Shouldn't we show the API (http://web2py.com/examples/
default/api), DAL and epydoc pages (http://web2py.com/examples/static/
epydoc/index.html) too, maybe with a nicer url? Or are these pages
going to be integrated in the book?

Nico de Groot

On 13 feb, 00:17, mdipierro  wrote:
> The book
>
>    http://web2py.com/book
>
> Seems to work well enough. I need to add some editor locking to avoid
> conflicts and I will do next week.
> There are some issues with IE8 so if you want to be an editor, you
> better use Firefox.
> If you want to start creating pages or editing please go ahead
>
> ... and feel free to te ll your friends. ;-)
>
> 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.



[web2py] Re: flush cache

2010-02-16 Thread mdipierro
set the time to zero.

cache.ram(,0)


or

db(...).select(...,cache=(cache.ram,0)))

On Feb 16, 3:12 am, "hamdy.a.farag"  wrote:
> Hi
>
> it's important that we've a cache say for example for example in a tag
> cloud that shows the recently added products to database
> but how can I force some cached function to flush cache and re-read
> database based on certain situations
> like [admin adds new product, and want to flush cache of a the
> function that returns the product tag cloud]
>
> I've 2 questions regarding this
>
> Is this practical to have ?   [For me I faced situations that may need
> this]
> Is it possible ?

-- 
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: how to NOT IN with DAL?

2010-02-16 Thread mdipierro
Yes.

print
db(db.t.day wrote:
> Thanks, Massimo. Are you sure about the "[db.t.day.max()]"?
>
> I'll also check dal.py if I don't find it in the book. ;-)
>
> @Thadeus: on a Sybase ASE MAX returns one row only. See below.
>
> CREATE TABLE "mt_mytable" (
> id int not null,
> text varchar
> )
>
> insert into "tempdb"."guest"."mt_mytable" (id, text) values (1, 'a')
> insert into "tempdb"."guest"."mt_mytable" (id, text) values (2, 'b')
> insert into "tempdb"."guest"."mt_mytable" (id, text) values (3, 'c')
> insert into "tempdb"."guest"."mt_mytable" (id, text) values (3, 'd')
> commit
>
> select MAX(id) from mt_mytable
>
> >> 3
>
> On Feb 16, 1:03 am, mdipierro  wrote:
>
> > print
> > db(db.t.day > [db.t.day.max()]

-- 
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: WSGI, Apache2, and web2py NOT at root

2010-02-16 Thread mdipierro
No. This should got in the errata page (to be created and attached to
preface) until it is fixed in the book.

On Feb 16, 6:42 am, Christopher Steel  wrote:
> Thanks,
>
> In our new documentation scheme would this become a comment in the now
> online book?
>
> C
>
> On Feb 15, 11:10 am, mdipierro  wrote:
>
> > I am changing this in trunk. I run into the same problem. The new
> > script also prompts you for the admin password.
>
> > On Feb 15, 9:31 am, Christopher Steel  wrote:
>
> > > This is a "reprint" from web2pyslice located here 
> > > ->http://www.web2pyslices.com/main/slices/take_slice/29andacomment I
> > > left. Some of the other comments look like they could be helpful as
> > > well, I notice at least one about an updated ubuntu install script.
> > > Here is my comment regarding the Ubuntu Apache setup:
>
> > > I got errors with that setup but when I tried changing the following
> > > it worked with no Apache errors:
>
> > > VirtualHost *:80>
> > > WSGIDaemonProcess web2py user=www-data group=www-data display-name=%
> > > {GROUP}
>
> > > To be this:
>
> > > VirtualHost *:80>
> > > WSGIDaemonProcess web2py user=www-data group=www-data
>
> > > lets Apache run with no error...
>
> > > On Feb 13, 2:47 pm, Johann Spies  wrote:
>
> > > > On 15 April 2009 18:30, Mark Larsen  wrote:
>
> > > > > I did figure out a hack if anyone comes up against this problem:
>
> > > > > RewriteEngine on
> > > > > RewriteRule ^/[NAMEOFAPP](.*)$ /web2py/[NAMEOFAPP]$1 [PT,L]
> > > > > WSGIScriptAlias /web2py /opt/web2py/wsgihandler.py
>
> > > > > This essentially allows you to place web2py outside of root.
> > > > > Mod_Rewrite then rewrites the URLs to fix what would be broken URLs so
> > > > > when URL() function writes:
>
> > > > I am trying to set up web2py alongside a php-site  behind apache and
> > > > came across this thread.  I have tried to modify the configuration
> > > > file created by Massimo's Ubuntu setup script using the above hint of
> > > > a RewriteRule but it works only partially:
>
> > > > I get the index page without the layout and css and no subsequent pages.
>
> > > > I would appreciate some help to get this working.
>
> > > > In the log I get:
> > > > [Sat Feb 13 21:34:30 2010] [error] [client 196.36.153.134] File does
> > > > not exist: /var/www/sadec
> > > > [Sat Feb 13 21:34:42 2010] [error] [client 196.36.153.134] File does
> > > > not exist: /var/www/sadec, referer:http://kbase.sun.ac.za/web2py/sadec
>
> > > > The web2py stuff is in /home/www-data/web2py.
>
> > > > My configuration:
>
> > > > NameVirtualHost *:443
> > > >    WSGIDaemonProcess web2py user=www-data group=www-data
> > > >    WSGIProcessGroup web2py
> > > >    RewriteEngine on
> > > >    RewriteRule ^/[NAMEOFAPP](.*)$ /web2py/[NAMEOFAPP]$1 [PT,L]
> > > >    WSGIScriptAlias /web2py /home/www-data/web2py/wsgihandler.py
>
> > > > 
>
> > > >   
> > > >     AllowOverride None
> > > >     Order Allow,Deny
> > > >     Deny from all
> > > >     
> > > >       Allow from all
> > > >     
> > > >   
>
> > > >   AliasMatch ^/([^/]+)/static/(.*) \
> > > >            /home/www-data/web2py/applications/$1/static/$2
> > > >   
> > > >     Order Allow,Deny
> > > >     Allow from all
> > > >   
>
> > > >   
> > > >   Deny from all
> > > >   
>
> > > >   
> > > >   Deny from all
> > > >   
>
> > > >   CustomLog /var/log/apache2/access.log common
> > > >   ErrorLog /var/log/apache2/error.log
> > > > 
>
> > > > 
> > > >   SSLEngine on
> > > >   SSLCertificateFile /etc/apache2/ssl/self_signed.cert
> > > >   SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key
>
> > > >   WSGIProcessGroup web2py
>
> > > >   WSGIScriptAlias /web2py /home/www-data/web2py/wsgihandler.py
>
> > > >   
> > > >     AllowOverride None
> > > >     Order Allow,Deny
> > > >     Deny from all
> > > >     
> > > >       Allow from all
> > > >     
> > > >   
>
> > > >   AliasMatch ^/([^/]+)/static/(.*) \
> > > >         /home/www-data/web2py/applications/$1/static/$2
>
> > > >   
> > > >     Order Allow,Deny
> > > >     Allow from all
> > > >   
>
> > > >   CustomLog /var/log/apache2/access.log common
> > > >   ErrorLog /var/log/apache2/error.log
> > > > 
>
> > > > Regards
> > > > Johann

-- 
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: they are copying us....

2010-02-16 Thread mdipierro
sorry was a joke and I did not mean it in a negative ways. I meant to
indicate that if before we were taking inspirations from them now thay
are taking inspirations from us. I think that is a nice project and
perhaps we can learn from it too.

On Feb 16, 3:25 am, pistacchio  wrote:
> hi massimo,
> i really appreciate your work on web2py. the product is excellent,
> i've just launched my first site using it and other two are on the
> work. i like the new documentation (how it's shaping up) and the way
> you "rule" the community around web2py prove that your way is right. i
> mean, you do a lot of work and coordinate inputs.
>
> one thing i really don't understand is your approach to the opensource
> philosophy. i already pointed it out weeks ago about the non free, pdf
> documentation that is something really sick in a opensource
> environment. fortunately i was not the only one thinking this way and,
> in the end, the online book is now there and shining.
>
> now, i think this "copying us" is utterly out of place. as you stated
> somewhere, your sources of inspiration were initially django and
> rails. are you copying them? did you make the idea of "web framework"
> by yourself? were you the first one to come out with the mvc pattern?
> i don't think so, and this is perfect.
>
> the opensource community, seen as a whole, not as a series of rival
> smaller communities that gather around isolated projects, drains its
> power from the openness of the ideas, from making them circulate and
> the word "copy", with the negative connotation of "plagiarize" hidden
> within it, has nothing to do with this.
> the guy may or may be not been inspired by web2py, but if he was, it
> is a good thing that web2py did something so valid that other people
> want to take inspiration from it. if he ends up writing a piece of
> software that is better than the current web2py's online editor, we
> can replace it with the new, better one and the circle will be
> completed as opening an idea would lead to end up with a better
> product. that's the whole point of opensource.
>
> On Feb 16, 5:57 am, mdipierro  wrote:
>
> >http://haineault.com/blog/125/
>
> > P.S. Of course we have 3 years of head start and the web2py
> > architecture was designed for this, theirs isn't.

-- 
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: flush cache

2010-02-16 Thread hamdy.a.farag
:)

Aha thanks

-- 
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] New features not documented in Book (2 ed)

2010-02-16 Thread DenesL
New features not documented in Book (2nd edition)

1.75.2
- no more cron with -S option
- ability to override/upgrade and app
- gluon.tools.prettydate
  http://groups.google.com/group/web2py/msg/03ea6109ec90f0c8
- crud.archive
  http://groups.google.com/group/web2py/msg/d4892f347889fc6e
- better uuid avoids conflicts on replicated servers in the cloud
  http://groups.google.com/group/web2py/msg/12e8a11e1c574838
  http://groups.google.com/group/web2py-developers/msg/dcfe498b80e66e64
note: moved from EC2 to VPS.net
http://groups.google.com/group/web2py/browse_thread/thread/6fbcd5f9a0c5032c#

1.75.1
* minor fixes
http://groups.google.com/group/web2py/browse_thread/thread/9507d225c0ff40c3#

1.74.11 / 1.74.10
- fixes a few problems with CRON, typos
- check for invalid field and in DB
http://groups.google.com/group/web2py/browse_thread/thread/d830cb54fe913028#

1.74.9
* Fixes security hole that affects 1.74.8 and 1.74.7
http://groups.google.com/group/web2py/browse_thread/thread/23c04866d81fe57d#

1.74.8
*** UPGRADE TO 1.74.9 IMMEDIATELY! ***
http://groups.google.com/group/web2py/browse_thread/thread/23c04866d81fe57d#
1) IS_SLUG()
2) web2py.py -nogui
3) solved a problem with jython
4) login has "remember me option"
5) fixed problem with keepvalues in update forms
http://groups.google.com/group/web2py/browse_thread/thread/4075ac6578a5197e#

1.74.7
*** UPGRADE TO 1.74.9 IMMEDIATELY! ***
http://groups.google.com/group/web2py/browse_thread/thread/23c04866d81fe57d#
1) request_password_reset and password reset verification
2) python web2py.py -S app -M -R script.py -A arg1 arg2 arg3
3) support for T("%(a)s") % dict(a="hello")
http://groups.google.com/group/web2py/browse_thread/thread/fed8aa7e13d44ab2#

1.74.6
Mostly bug fixes and two main security issues fixed:
* deals with misconfiguration of postgresql that may cause SQL
Injection vulnerability
* blocked accounts were not really blocked
http://groups.google.com/group/web2py/browse_thread/thread/5b60ab4685d33b57#

1.74.5
* auth.user_id (shortcut for auth.user.id, defaults to None if not
logged in)
* support for all native types on GAE (e.g. StringListProperty)
* cache.ram usage statistics
* no more auth menu in scaffolding
* no more splash screen with -Q
* export_to_csv_file has represent
http://groups.google.com/group/web2py/browse_thread/thread/89a718332e6d7115#

1.74.4 - 1.74.2: bug fix releases

LOAD function
  introduced along the plugin system, this went fairly unnoticed
  LOAD(a, b, args=args, vars=vars, ajax=ajax, ajax_trap=ajax_trap )
http://www.web2py.com/AlterEgo/default/show/252

1.74.1
* Moved to mercurial
* Default validators use the new define_table(,format='...')
  http://groups.google.com/group/web2py/browse_thread/thread/35298fa6005a3a5b
* New get_vars and post_vars compatible in 2.5 and 2.6
* Major rewrite of gql.py extends DAL syntax on GAE, supports belongs
  http://groups.google.com/group/web2py/browse_thread/thread/6efa5dd4095f91e1
* No more *.w2p, welcome.w2p is created automatically, base apps are
  always upgraded
* decimal validator allows negative numbers
* last version with the old DAL, the new DAL is in gluon/dal.py
  To try out the new experimental DAL
  copy or rename gluon/dal.py as gluon/sql.py
http://groups.google.com/group/web2py/msg/3e40f3d30c3b82f2

1.73.1
* New decimal field type, as discussed in
 http://groups.google.com/group/web2py/browse_thread/thread/3c1957d8ed743513
* New IS_DECIMAL_IN_RANGE validator
* Experimental support for non UTF8 encoding in DB
* T.current_languages default to 'en' and new T.set_current_languages
* New gluon/contrib/populate.py
* Customizable CSV and more...
http://groups.google.com/group/web2py/browse_thread/thread/72a7d6d43a8aecb1

1.72.1
* Alias for id field
  allows to redefine the name of the 'id' field.
* make_migrate=True
   rebuild missing .table files
http://groups.google.com/group/web2py/browse_thread/thread/eed21229883b5a1a

* keyed tables
  support for legacy tables (MS SQL, DB2, Ingres & Informix)
http://groups.google.com/group/web2py/browse_thread/thread/db150376b06d47fc

1.71.1
* complete rewrite of the Rows object, makes web2py faster and smaller
* DALStorage is renamed Row
* Now you can call web DAL from any Python program
* You can also use the template language from any Python program
http://groups.google.com/group/web2py/browse_thread/thread/159b44bfbb634df2
http://groups.google.com/group/web2py/browse_thread/thread/c81061bc00c6181e

1.70.1
It fixes some problems introduced by new features in 1.69.1.
It also includes:
* db(...).select().as_dict()
* Experimental distributed transactions with mysql, postgresql and
firebird
* Improved validators
* ability to call wsgi apps from actions
http://groups.google.com/group/web2py/browse_thread/thread/5faa2e926e05e200
* local_import
http://groups.google.com/group/web2py/browse_thread/thread/ca06c49b1aa2df5a

1.69.1
* Lots of new DAL APIs including
  OR, LIKE, BELONGS, and more on GAE
* response.meta.keywords, reponse.meta.description,
  

Re: [web2py] Re: help with password and admin

2010-02-16 Thread Thadeus Burgess
Well if I don't have ssh access to the machine, then I can't get in
and install mercurial on it and whatnot. I also cannot host my
mercurial repositories over ssh.

I was just trying to say that, even though most users might not need
to ssh into the system, don't lock it down so it loses the ability to,
is all I'm saying.

-Thadeus





On Tue, Feb 16, 2010 at 12:44 AM, mdipierro  wrote:
> explain more please
>
> On Feb 15, 10:35 pm, Thadeus Burgess  wrote:
>> what if i want my server to host ssh mercurial repositories ?
>>
>> -Thadeus
>>
>> On Mon, Feb 15, 2010 at 10:32 PM, mdipierro  wrote:
>> > I am not suggesting that as a general solution. What I have in mind is
>> > an appliance with a single account (root or whatever). The root
>> > password is the only parameter set by the hosting provider and
>> > communicated to the user. The user never ssh into the vps. He instead
>> > uses the provided password to login into web2py admin and changes the
>> > web2py admin password (not the root password). From that moment on
>> > web2py works as usual. We could provide enough web2py tools to
>> > completely manage the vm from inside.
>>
>> > On Feb 15, 9:20 pm, Thadeus Burgess  wrote:
>> >> Potential security risk validating against root. but a user account 
>> >> definitely.
>>
>> >> -Thadeus
>>
>> >> On Mon, Feb 15, 2010 at 7:46 PM, mdipierro  
>> >> wrote:
>> >> > Currently in admin you login using a password stored in the file
>> >> > parameters_443.py (443 is the post number).
>>
>> >> > I would like the option that if parameters_443.py contains
>> >> > password='posix:root'
>>
>> >> > then web2py admin authenticates the visitor using the 'root' password.
>>
>> >> > I do not know how to do it but it would be a really nice feature to
>> >> > have. In particular when running on a VPS.
>>
>> >> > Can anybody help?
>>
>> >> > All I would need a simple script that given a username and some text
>> >> > checks whether that is a the valid password for the user.
>>
>> >> > 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.
>>
>> > --
>> > 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.
>
> --
> 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.



Re: [web2py] Re: flush cache

2010-02-16 Thread Thadeus Burgess
Also if you need to flush the entire cache


cache.ram.clear()
cache.disk.clear()


There is also code in the new appadmin that shows you cache
statistics, with buttons to clear it if you need to during
development.

-Thadeus





On Tue, Feb 16, 2010 at 8:54 AM, hamdy.a.farag  wrote:
> :)
>
> Aha thanks
>
> --
> 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.



[web2py] Re: help with password and admin

2010-02-16 Thread mdipierro
I was not suggesting that. There will always be ssh access. I just
want a vm that boots with web2py out of the box and non-trivial to
guess password assigned by the provider that can be changed.

On Feb 16, 9:16 am, Thadeus Burgess  wrote:
> Well if I don't have ssh access to the machine, then I can't get in
> and install mercurial on it and whatnot. I also cannot host my
> mercurial repositories over ssh.
>
> I was just trying to say that, even though most users might not need
> to ssh into the system, don't lock it down so it loses the ability to,
> is all I'm saying.
>
> -Thadeus
>
> On Tue, Feb 16, 2010 at 12:44 AM, mdipierro  wrote:
> > explain more please
>
> > On Feb 15, 10:35 pm, Thadeus Burgess  wrote:
> >> what if i want my server to host ssh mercurial repositories ?
>
> >> -Thadeus
>
> >> On Mon, Feb 15, 2010 at 10:32 PM, mdipierro  
> >> wrote:
> >> > I am not suggesting that as a general solution. What I have in mind is
> >> > an appliance with a single account (root or whatever). The root
> >> > password is the only parameter set by the hosting provider and
> >> > communicated to the user. The user never ssh into the vps. He instead
> >> > uses the provided password to login into web2py admin and changes the
> >> > web2py admin password (not the root password). From that moment on
> >> > web2py works as usual. We could provide enough web2py tools to
> >> > completely manage the vm from inside.
>
> >> > On Feb 15, 9:20 pm, Thadeus Burgess  wrote:
> >> >> Potential security risk validating against root. but a user account 
> >> >> definitely.
>
> >> >> -Thadeus
>
> >> >> On Mon, Feb 15, 2010 at 7:46 PM, mdipierro  
> >> >> wrote:
> >> >> > Currently in admin you login using a password stored in the file
> >> >> > parameters_443.py (443 is the post number).
>
> >> >> > I would like the option that if parameters_443.py contains
> >> >> > password='posix:root'
>
> >> >> > then web2py admin authenticates the visitor using the 'root' password.
>
> >> >> > I do not know how to do it but it would be a really nice feature to
> >> >> > have. In particular when running on a VPS.
>
> >> >> > Can anybody help?
>
> >> >> > All I would need a simple script that given a username and some text
> >> >> > checks whether that is a the valid password for the user.
>
> >> >> > 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.
>
> >> > --
> >> > 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.
>
> > --
> > 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.

-- 
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: help with password and admin

2010-02-16 Thread Thadeus Burgess
Ok :) That will be awesome.

-Thadeus





On Tue, Feb 16, 2010 at 9:35 AM, mdipierro  wrote:
> t suggesting that. There will always be ssh access. I just
> want a vm that boots with web2

-- 
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: flush cache

2010-02-16 Thread hamdy.a.farag

This's also cool, thank you

-- 
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: help with password and admin

2010-02-16 Thread mdipierro
Found the solution:

http://atlee.ca/software/pam/

I will include this in web2py admin and integrate it with
http://www.turnkeylinux.org/lapp
The turnkey developers have done a great job and are very friendly.
They have a well documented sdk and everything we need. Once done this
vm will be listed as an option under vpt.net.

Massimo

On Feb 16, 9:44 am, Thadeus Burgess  wrote:
> Ok :) That will be awesome.
>
> -Thadeus
>
> On Tue, Feb 16, 2010 at 9:35 AM, mdipierro  wrote:
> > t suggesting that. There will always be ssh access. I just
> > want a vm that boots with web2

-- 
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] New features not documented in Book (2 ed)

2010-02-16 Thread Jonathan Lundell
On Feb 16, 2010, at 7:16 AM, DenesL wrote:

> New features not documented in Book (2nd edition)
> 
> 1.75.2
> - no more cron with -S option
> - ability to override/upgrade and app

overwrite

-- 
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: New features not documented in Book (2 ed)

2010-02-16 Thread DenesL

Thanks (it is copy/paste of the original).
Do you know of any docs on usage?.

On Feb 16, 11:21 am, Jonathan Lundell  wrote:
> On Feb 16, 2010, at 7:16 AM, DenesL wrote:
>
> > New features not documented in Book (2nd edition)
>
> > 1.75.2
> > - no more cron with -S option
> > - ability to override/upgrade and app
>
> overwrite

-- 
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: IS_NULL_OR vs IS_IN_DB with brackets

2010-02-16 Thread reyelts
villas, That was cut/paste from the web version of the book...
formatting errors and all. Fortunately, the live code I'm working on
doesn't have that particular error.

mdpierro, THANKS for the redirect... putting the brackets on the
outside did the trick.

-- 
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] unmarshallable object problem

2010-02-16 Thread reyelts
First, I'm trying to create a data base entry using SQLFORM+insert(),
and am getting this error:

S'Traceback (most recent call last):\n  File "gluon/main.py", line
504, in wsgibase\n  File "gluon/globals.py", line 375, in
_try_store_on_disk\n  File "gluon/sql.py", line 705, in Row_pickler
\nValueError: unmarshallable object\n'

I suspect it is complaining that the value of one of the fields/
columns. Is there any way to figure out *which* field/column it
doesn't like?

Second, I'm seeing some odd behavior once I hit this error. The
session is automatically logged out (auth.is_logged_in() becomes
False). When I log back in, another unmarshallable object error as
above is immediately generated... even though I'm not going to the
page/form where the original error occurred. Further, the recovery
process seems quite extreme: stop the server, delete everything in the
databases directory, and restart the server. Is this normal/expected
behavior?

-- 
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: extend login method of Auth class

2010-02-16 Thread reyelts
Thanks... it's a beautiful thing.
Sorry I didn't see that in the doc... I clearly wasn't searching on
the right keywords.

-- 
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: New features not documented in Book (2 ed)

2010-02-16 Thread Jonathan Lundell
On Feb 16, 2010, at 8:32 AM, DenesL wrote:

> 
> Thanks (it is copy/paste of the original).
> Do you know of any docs on usage?.

On the admin app's app-installation page, there's a checkbox to enable 
overwriting of an uploaded app. If not checked, the behavior is the same as 
before: an attempt to install an app with the same name as an installed app 
fails. In the overwrite case, the new app simply gets untarred over the old app.

> 
> On Feb 16, 11:21 am, Jonathan Lundell  wrote:
>> On Feb 16, 2010, at 7:16 AM, DenesL wrote:
>> 
>>> New features not documented in Book (2nd edition)
>> 
>>> 1.75.2
>>> - no more cron with -S option
>>> - ability to override/upgrade and app
>> 
>> overwrite


-- 
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: extend login method of Auth class

2010-02-16 Thread reyelts
Hmm... I stumbled on a headscratcher that took a while to figure out.
When I use the register function to create a new user, that user is
automatically logged in. But, auth.settings.login_onaccept was never
invoked. I would have expected one of the following:

A) The auth.settings.login_onaccept function is invoked in addition to
auth.settings.register_onaccept because the register function
automatically logs me in.

B) The register function does not automatically log me in but instead
redirects to the login page for me to supply my new login info (and
consequently get auth.settings.login_onaccept invoked along the way).

or

C) The documentation for auth.settings.login_onaccept makes clear the
fact that it does not apply to the automatic login that happens at
registration time. This way we know we need to duplicate
auth.settings.login_onaccept in auth.settings.register_onaccept.





-- 
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: Auth class and login time

2010-02-16 Thread reyelts
Sweet. Are there any other interesting undocumented variables like
this? Is there any reason they aren't mentioned in the documentation?

-- 
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: unmarshallable object problem

2010-02-16 Thread mdipierro
You are storing in session something that cannot be stored like a
function, a complex object or a reference to an open database.

On Feb 16, 10:57 am, reyelts  wrote:
> First, I'm trying to create a data base entry using SQLFORM+insert(),
> and am getting this error:
>
> S'Traceback (most recent call last):\n  File "gluon/main.py", line
> 504, in wsgibase\n  File "gluon/globals.py", line 375, in
> _try_store_on_disk\n  File "gluon/sql.py", line 705, in Row_pickler
> \nValueError: unmarshallable object\n'
>
> I suspect it is complaining that the value of one of the fields/
> columns. Is there any way to figure out *which* field/column it
> doesn't like?
>
> Second, I'm seeing some odd behavior once I hit this error. The
> session is automatically logged out (auth.is_logged_in() becomes
> False). When I log back in, another unmarshallable object error as
> above is immediately generated... even though I'm not going to the
> page/form where the original error occurred. Further, the recovery
> process seems quite extreme: stop the server, delete everything in the
> databases directory, and restart the server. Is this normal/expected
> behavior?

-- 
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: extend login method of Auth class

2010-02-16 Thread mdipierro
It should be B is you require email verification. Need to update the
docs.

On Feb 16, 11:41 am, reyelts  wrote:
> Hmm... I stumbled on a headscratcher that took a while to figure out.
> When I use the register function to create a new user, that user is
> automatically logged in. But, auth.settings.login_onaccept was never
> invoked. I would have expected one of the following:
>
> A) The auth.settings.login_onaccept function is invoked in addition to
> auth.settings.register_onaccept because the register function
> automatically logs me in.
>
> B) The register function does not automatically log me in but instead
> redirects to the login page for me to supply my new login info (and
> consequently get auth.settings.login_onaccept invoked along the way).
>
> or
>
> C) The documentation for auth.settings.login_onaccept makes clear the
> fact that it does not apply to the automatic login that happens at
> registration time. This way we know we need to duplicate
> auth.settings.login_onaccept in auth.settings.register_onaccept.

-- 
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] New features not documented in Book (2 ed)

2010-02-16 Thread DenesL
New features not documented in Book (2nd edition)

1.75.2
- no more cron with -S option
- ability to overwrite/upgrade and app
  http://groups.google.com/group/web2py/msg/4f3ba5eedeced6a6
- gluon.tools.prettydate
  http://groups.google.com/group/web2py/msg/03ea6109ec90f0c8
- crud.archive
  http://groups.google.com/group/web2py/msg/d4892f347889fc6e
- better uuid avoids conflicts on replicated servers in the cloud
  http://groups.google.com/group/web2py/msg/12e8a11e1c574838
  http://groups.google.com/group/web2py-developers/msg/dcfe498b80e66e64
note: moved from EC2 to VPS.net
http://groups.google.com/group/web2py/browse_thread/thread/6fbcd5f9a0c5032c#

1.75.1
* minor fixes
http://groups.google.com/group/web2py/browse_thread/thread/9507d225c0ff40c3#

1.74.11 / 1.74.10
- fixes a few problems with CRON, typos
- check for invalid field and in DB
http://groups.google.com/group/web2py/browse_thread/thread/d830cb54fe913028#

1.74.9
* Fixes security hole that affects 1.74.8 and 1.74.7
http://groups.google.com/group/web2py/browse_thread/thread/23c04866d81fe57d#

1.74.8
*** UPGRADE TO 1.74.9 IMMEDIATELY! ***
http://groups.google.com/group/web2py/browse_thread/thread/23c04866d81fe57d#
1) IS_SLUG()
2) web2py.py -nogui
3) solved a problem with jython
4) login has "remember me option"
5) fixed problem with keepvalues in update forms
http://groups.google.com/group/web2py/browse_thread/thread/4075ac6578a5197e#

1.74.7
*** UPGRADE TO 1.74.9 IMMEDIATELY! ***
http://groups.google.com/group/web2py/browse_thread/thread/23c04866d81fe57d#
1) request_password_reset and password reset verification
2) python web2py.py -S app -M -R script.py -A arg1 arg2 arg3
3) support for T("%(a)s") % dict(a="hello")
http://groups.google.com/group/web2py/browse_thread/thread/fed8aa7e13d44ab2#

1.74.6
Mostly bug fixes and two main security issues fixed:
* deals with misconfiguration of postgresql that may cause SQL
Injection vulnerability
* blocked accounts were not really blocked
http://groups.google.com/group/web2py/browse_thread/thread/5b60ab4685d33b57#

1.74.5
* auth.user_id (shortcut for auth.user.id, defaults to None if not
logged in)
* support for all native types on GAE (e.g. StringListProperty)
* cache.ram usage statistics
* no more auth menu in scaffolding
* no more splash screen with -Q
* export_to_csv_file has represent
http://groups.google.com/group/web2py/browse_thread/thread/89a718332e6d7115#

1.74.4 - 1.74.2: bug fix releases

LOAD function
  introduced along the plugin system, this went fairly unnoticed
  LOAD(a, b, args=args, vars=vars, ajax=ajax, ajax_trap=ajax_trap )
http://www.web2py.com/AlterEgo/default/show/252

1.74.1
* Moved to mercurial
* Default validators use the new define_table(,format='...')
  http://groups.google.com/group/web2py/browse_thread/thread/35298fa6005a3a5b
* New get_vars and post_vars compatible in 2.5 and 2.6
* Major rewrite of gql.py extends DAL syntax on GAE, supports belongs
  http://groups.google.com/group/web2py/browse_thread/thread/6efa5dd4095f91e1
* No more *.w2p, welcome.w2p is created automatically, base apps are
  always upgraded
* decimal validator allows negative numbers
* last version with the old DAL, the new DAL is in gluon/dal.py
  To try out the new experimental DAL
  copy or rename gluon/dal.py as gluon/sql.py
http://groups.google.com/group/web2py/msg/3e40f3d30c3b82f2

1.73.1
* New decimal field type, as discussed in
 http://groups.google.com/group/web2py/browse_thread/thread/3c1957d8ed743513
* New IS_DECIMAL_IN_RANGE validator
* Experimental support for non UTF8 encoding in DB
* T.current_languages default to 'en' and new T.set_current_languages
* New gluon/contrib/populate.py
* Customizable CSV and more...
http://groups.google.com/group/web2py/browse_thread/thread/72a7d6d43a8aecb1

1.72.1
* Alias for id field
  allows to redefine the name of the 'id' field.
* make_migrate=True
   rebuild missing .table files
http://groups.google.com/group/web2py/browse_thread/thread/eed21229883b5a1a

* keyed tables
  support for legacy tables (MS SQL, DB2, Ingres & Informix)
http://groups.google.com/group/web2py/browse_thread/thread/db150376b06d47fc

1.71.1
* complete rewrite of the Rows object, makes web2py faster and smaller
* DALStorage is renamed Row
* Now you can call web DAL from any Python program
* You can also use the template language from any Python program
http://groups.google.com/group/web2py/browse_thread/thread/159b44bfbb634df2
http://groups.google.com/group/web2py/browse_thread/thread/c81061bc00c6181e

1.70.1
It fixes some problems introduced by new features in 1.69.1.
It also includes:
* db(...).select().as_dict()
* Experimental distributed transactions with mysql, postgresql and
firebird
* Improved validators
* ability to call wsgi apps from actions
http://groups.google.com/group/web2py/browse_thread/thread/5faa2e926e05e200
* local_import
http://groups.google.com/group/web2py/browse_thread/thread/ca06c49b1aa2df5a

1.69.1
* Lots of new DAL APIs including
  OR, LIKE, BELONGS, and more

[web2py] Re: they are copying us....

2010-02-16 Thread mikech
To quote a saying:
Imitation is the sincerest form of flattery.

On Feb 16, 6:48 am, mdipierro  wrote:
> sorry was a joke and I did not mean it in a negative ways. I meant to
> indicate that if before we were taking inspirations from them now thay
> are taking inspirations from us. I think that is a nice project and
> perhaps we can learn from it too.
>
> On Feb 16, 3:25 am, pistacchio  wrote:
>
>
>
> > hi massimo,
> > i really appreciate your work on web2py. the product is excellent,
> > i've just launched my first site using it and other two are on the
> > work. i like the new documentation (how it's shaping up) and the way
> > you "rule" the community around web2py prove that your way is right. i
> > mean, you do a lot of work and coordinate inputs.
>
> > one thing i really don't understand is your approach to the opensource
> > philosophy. i already pointed it out weeks ago about the non free, pdf
> > documentation that is something really sick in a opensource
> > environment. fortunately i was not the only one thinking this way and,
> > in the end, the online book is now there and shining.
>
> > now, i think this "copying us" is utterly out of place. as you stated
> > somewhere, your sources of inspiration were initially django and
> > rails. are you copying them? did you make the idea of "web framework"
> > by yourself? were you the first one to come out with the mvc pattern?
> > i don't think so, and this is perfect.
>
> > the opensource community, seen as a whole, not as a series of rival
> > smaller communities that gather around isolated projects, drains its
> > power from the openness of the ideas, from making them circulate and
> > the word "copy", with the negative connotation of "plagiarize" hidden
> > within it, has nothing to do with this.
> > the guy may or may be not been inspired by web2py, but if he was, it
> > is a good thing that web2py did something so valid that other people
> > want to take inspiration from it. if he ends up writing a piece of
> > software that is better than the current web2py's online editor, we
> > can replace it with the new, better one and the circle will be
> > completed as opening an idea would lead to end up with a better
> > product. that's the whole point of opensource.
>
> > On Feb 16, 5:57 am, mdipierro  wrote:
>
> > >http://haineault.com/blog/125/
>
> > > P.S. Of course we have 3 years of head start and the web2py
> > > architecture was designed for this, theirs isn't.

-- 
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: unmarshallable object problem

2010-02-16 Thread reyelts
I see, it was the following statement after the insert() that was the
underlying cause:

   session.myrec =
db(PIDB.PI_username==auth.user.username).select().first()

I played around with different variations on this theme with no luck.
Is there something inherently wrong with trying to store a database
record id in a session variable?

-- 
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: unmarshallable object problem

2010-02-16 Thread mdipierro
session.myrec =
db(PIDB.PI_username==auth.user.username).select().first().as_dict()

On Feb 16, 12:40 pm, reyelts  wrote:
> I see, it was the following statement after the insert() that was the
> underlying cause:
>
>    session.myrec =
> db(PIDB.PI_username==auth.user.username).select().first()
>
> I played around with different variations on this theme with no luck.
> Is there something inherently wrong with trying to store a database
> record id in a session variable?

-- 
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] iptables

2010-02-16 Thread mdipierro
does anybody have a decent iptables script that:

- rejects malformed requests
- allows only http, https and ssh
- blocks sys attacks
- blocks more 3 ssh connections/minute to ssh
- blocks more 10 http requests/minute from known spiders (yahoo,
google, ms)
- blocks all https request from spiders

-- 
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: help with password and admin

2010-02-16 Thread villas
The appliance sounds great,  but only PostgreSQL?
Any chance of Firebird?
If not, will the script be available so I can adapt it?

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.



[web2py] Re: cancel button

2010-02-16 Thread reyelts
I'm trying to use this with my shiny new SQLFORM. But I'm clearly
missing something. Here's a snippet:

   form = SQLFORM(...blah...)
   submit = form.element(_type='submit')
 
submit.parent.append(INPUT(_type='submit',_value='Cancel',_name='button'))

   if request.vars.button == 'Cancel':
  session.flash = 'profile create was cancelled'
  session.flash = 'profile update was cancelled'
  redirect(URL(r=request,f='index'))
   elif form.accepts(request.vars,session,dbio=False):
  ...update/insert logic...

The cancel works perfectly. But the sql on the form.accepts path craps
out:

S'Traceback (most recent call last):\n  File "gluon/restricted.py",
line 173, in restricted\n  File "w:\\web2py_win\\applications\
\canyonezt/controllers/default.py", line 184, in \n  File
"gluon/globals.py", line 96, in \n  File "gluon/tools.py",
line 1851, in f\n  File "w:\\web2py_win\\applications\\canyonezt/
controllers/default.py", line 152, in profile\n  File "gluon/sql.py",
line 1877, in insert\n  File "gluon/sql.py", line 1845, in _insert
\nSyntaxError: invalid field names: [\'button\']\n'

It looks like the DAL is trying to store 'button' in my data base,
though it is unclear to me why. What's the secret, here?

-- 
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: help with password and admin

2010-02-16 Thread mdipierro
You can install it. By default I am going with postgres because they
already have a lapp applicance with phppgadmin

On Feb 16, 1:50 pm, villas  wrote:
> The appliance sounds great,  but only PostgreSQL?
> Any chance of Firebird?
> If not, will the script be available so I can adapt it?
>
> 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.



[web2py] Re: cancel button

2010-02-16 Thread mdipierro
   if request.vars.button == 'Cancel':
  session.flash = 'profile create was cancelled'
  session.flash = 'profile update was cancelled'
  redirect(URL(r=request,f='index'))
   elif form.accepts(request.vars,session,dbio=False):
  del request.vars.button
  ...update/insert logic...



On Feb 16, 2:18 pm, reyelts  wrote:
> I'm trying to use this with my shiny new SQLFORM. But I'm clearly
> missing something. Here's a snippet:
>
>    form = SQLFORM(...blah...)
>    submit = form.element(_type='submit')
>
> submit.parent.append(INPUT(_type='submit',_value='Cancel',_name='button'))
>
>    if request.vars.button == 'Cancel':
>       session.flash = 'profile create was cancelled'
>       session.flash = 'profile update was cancelled'
>       redirect(URL(r=request,f='index'))
>    elif form.accepts(request.vars,session,dbio=False):
>       ...update/insert logic...
>
> The cancel works perfectly. But the sql on the form.accepts path craps
> out:
>
> S'Traceback (most recent call last):\n  File "gluon/restricted.py",
> line 173, in restricted\n  File "w:\\web2py_win\\applications\
> \canyonezt/controllers/default.py", line 184, in \n  File
> "gluon/globals.py", line 96, in \n  File "gluon/tools.py",
> line 1851, in f\n  File "w:\\web2py_win\\applications\\canyonezt/
> controllers/default.py", line 152, in profile\n  File "gluon/sql.py",
> line 1877, in insert\n  File "gluon/sql.py", line 1845, in _insert
> \nSyntaxError: invalid field names: [\'button\']\n'
>
> It looks like the DAL is trying to store 'button' in my data base,
> though it is unclear to me why. What's the secret, here?

-- 
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] iptables

2010-02-16 Thread Richard Shebora
You might look at http://www.shorewall.net/ for the iptables portion,
and it comes with great example config files.  I think you need
something else to block requests or connections per minute like
http://www.fail2ban.org, it has worked well for me.

Hope this helps,
Richard Shebora

On Tue, Feb 16, 2010 at 1:57 PM, mdipierro  wrote:
> does anybody have a decent iptables script that:
>
> - rejects malformed requests
> - allows only http, https and ssh
> - blocks sys attacks
> - blocks more 3 ssh connections/minute to ssh
> - blocks more 10 http requests/minute from known spiders (yahoo,
> google, ms)
> - blocks all https request from spiders
>
> --
> 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.



[web2py] Re: help with password and admin

2010-02-16 Thread mdipierro
You will be able to do aptget

The only reason is that we have phpmyadmin and phppgadmin but I do
know of anything similar for firebird.

Turnkey already provides a LAPP and I only need to customize by adding
web2py..

I implemented PAM login in admin and as a plugin for auth. Will push
tonight.

On Feb 16, 1:50 pm, villas  wrote:
> The appliance sounds great,  but only PostgreSQL?
> Any chance of Firebird?
> If not, will the script be available so I can adapt it?
>
> 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.



Re: [web2py] Displaying a gantt like chart...

2010-02-16 Thread Alexandre Andrade
Once a create a graphic class in php to do that.

In a graphic, it is easier, because you create the ''all days'' plot, and
then, create your planned date over.

I think the logic is similar.

The gantt class is in http://www.phpclasses.org/browse/package/2737.html

In html you have to adjust, because you can't plot 'over', but 'while'

A way I think this work is draw 'line' by 'line, as a printer.

Think drawing this like a printer:
A table, creating each row, a cell for each day.



2010/2/15 Jason Brower 

> I am making a scheduling application and am getting fairly close.
> I have it displaying a charts relative to the size of screen.
> The data configured in the controller and built on the screen with only
> html and css.
> But I have a few issues.
> I need to create a date that I can add one day to another over and over
> to get the day and date and most of all be able to print it to the
> screen.  Do I really need to do that all before I get to the view
> without importing datetime in both the controller and the view?
>
> This view will mark across the screen with tick marks representing each
> day.
> I can get each day, but I can't get the date for each day.
> I need this and then be able to mark when ever there is a saturday and
> sunday. (As the business will be closed.  Any idea how this could be
> best done?
> Enclosed is the view I am using for it...
> I also have encloded my css so you get the idea of how it would look.
>
> Hope you can help out.
>
> --
> 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.
>
>


-- 
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.



[web2py] [BK] Proposal: updating the book comments/wiki

2010-02-16 Thread villas
There are many excellent postings in this group and it would be great
if we had a systematic way of including them in the book.  The
proposal is this:

1. If we find a very helpful posting edit the subject header to
include [BK] and post back to the group (e.g. as in the subject of
this message).  Everyone would soon learn that this was regarding the
book not request for support.

2. When *anyone* has any time,  update the book and repost the message
with [BX].  Where
necessary,  include a note as to which section (or wiki page) it has
been inserted.

It generates more traffic on the list,  but group regulars will know
it is just about the book.  Non-regulars will be treated to worthwhile
repostings of good tips until they learn what [BK] and [BX] mean.

BTW I suggest [BK] and [BX] because you can do unambiguous searches
with 'insubject:[BK]'.

Anyone would be able to participate,  or not,  so it is not an onerous
idea.  Please add any other ideas of how we can get the information
out of this group into the book and whether or not you like this
suggestion.

Best regards,  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.



Re: [web2py] Example of apache2 configuration where web2py exists along other sites

2010-02-16 Thread Alexandre Andrade
A way it works is a subdomain:

www.hipercenter.com (web2py)
php.hipercenter.com(php, obvious)

the recipe is in (portuguese, translate with google) :

http://alexandremas.blogspot.com/2010/02/como-configurar-web2py-e-php-no-mesmo.html



2010/2/13 Johann Spies 

> I am becoming desperate about this problem.  I could so far not
> succeed to get web2py working behind apache where web2py is not root
> (e.g. the setup of the ubuntu-setup script).
>
> Is there somewhere an working example of a setup where web2py is
> working with wsgi alongside a php site behind apache2?
>
> If I do not get this one solved, I will be forced to stop trying to
> use web2py in a production environment and look for other (maybe php)
> solutions.  My preference is to work with python and I have invested a
> lot of time trying to learn web2py and get it working.
>
> Regards
> Johann
>
> --
> 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.
>
>


-- 
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.



Re: [web2py] Re: cancel button

2010-02-16 Thread Jonathan Lundell
On Feb 16, 2010, at 12:18 PM, reyelts wrote:

> I'm trying to use this with my shiny new SQLFORM. But I'm clearly
> missing something. Here's a snippet:
> 
>   form = SQLFORM(...blah...)
>   submit = form.element(_type='submit')
> 
> submit.parent.append(INPUT(_type='submit',_value='Cancel',_name='button'))
> 
>   if request.vars.button == 'Cancel':
>  session.flash = 'profile create was cancelled'
>  session.flash = 'profile update was cancelled'
>  redirect(URL(r=request,f='index'))
>   elif form.accepts(request.vars,session,dbio=False):
>  ...update/insert logic...
> 
> The cancel works perfectly.

A problem that someone mentioned recently (or at least alluded to) is that 
there's an issue with IE and multiple submit buttons, namely that if the user 
types a return in a form field, you aren't guaranteed that you'll see the first 
submit button. So somebody might type a return, and  you'll see a cancel.

So I ended up with _type='button', and an onclick script to provide the URL. So 
far so good

-- 
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] routes for subdomain

2010-02-16 Thread Thadeus Burgess
I need to take the following with routes

controller.website.com/action/args

and convert it to

/init/controller/action/args

How can I do this, I have attempted to copy the book example however
it is just giving syntax errors.


-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.



Re: [web2py] routes for subdomain

2010-02-16 Thread Wes James
On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess  wrote:
> I need to take the following with routes
>
> controller.website.com/action/args
>
> and convert it to
>
> /init/controller/action/args
>
> How can I do this, I have attempted to copy the book example however
> it is just giving syntax errors.
>
>

This is a guess based on an example I saw:

routes_in=[('/init/controller/action/args','/action/args')

-wes

-- 
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] routes for subdomain

2010-02-16 Thread Wes James
forgot right bracket ]

On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess  
> wrote:
>> I need to take the following with routes
>>
>> controller.website.com/action/args
>>
>> and convert it to
>>
>> /init/controller/action/args
>>
>> How can I do this, I have attempted to copy the book example however
>> it is just giving syntax errors.
>>
>>
>
> This is a guess based on an example I saw:
>
> routes_in=[('/init/controller/action/args','/action/args')
>
> -wes
>

-- 
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] routes for subdomain

2010-02-16 Thread Thadeus Burgess
No.

example.com/$c/$f

maps to

/init/public/$c/$f

and then

dashboard.example.com/$f

maps to

/init/dashboard/$f

I basically want

$c.example.com/$f

/init/$c/$f

As I say this I kind of remember a post about this, search failing me.

-Thadeus





On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
> forgot right bracket ]
>
> On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
>> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess  
>> wrote:
>>> I need to take the following with routes
>>>
>>> controller.website.com/action/args
>>>
>>> and convert it to
>>>
>>> /init/controller/action/args
>>>
>>> How can I do this, I have attempted to copy the book example however
>>> it is just giving syntax errors.
>>>
>>>
>>
>> This is a guess based on an example I saw:
>>
>> routes_in=[('/init/controller/action/args','/action/args')
>>
>> -wes
>>
>
> --
> 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.



[web2py] Re: help with password and admin

2010-02-16 Thread villas
Thanks.  FYI

1. For php there is IbWebAdmin.net I haven't used it for ages though
but I think it is still active.
I saw there is a package for Ubuntu too:
http://jimicompot.blogspot.com/2008/04/ibwebadmin-20-added-to-ubuntu-ppa.html

2. Cross platform client:  FlameRobin.org.  Is maintained and can be
installed as a package.
You can install locally and remotely.

3. However, for those who have windows, Firebird has a fantastic
remote admin tool.
IbExpert http://ibexpert.net/ibe/
This is better than anything I've seen for other DBs,  and there's a
free version.

So we don't need to reply on any PHP tools, or even server installed
software :-)


On Feb 16, 7:59 pm, mdipierro  wrote:
> You will be able to do aptget
>
> The only reason is that we have phpmyadmin and phppgadmin but I do
> know of anything similar for firebird.
>
> Turnkey already provides a LAPP and I only need to customize by adding
> web2py..
>
> I implemented PAM login in admin and as a plugin for auth. Will push
> tonight.
>
> On Feb 16, 1:50 pm, villas  wrote:
>
> > The appliance sounds great,  but only PostgreSQL?
> > Any chance of Firebird?
> > If not, will the script be available so I can adapt it?
>
> > 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.



[web2py] Re: Proposal: updating the book comments/wiki

2010-02-16 Thread mdipierro
Good idea

On Feb 16, 3:31 pm, villas  wrote:
> There are many excellent postings in this group and it would be great
> if we had a systematic way of including them in the book.  The
> proposal is this:
>
> 1. If we find a very helpful posting edit the subject header to
> include [BK] and post back to the group (e.g. as in the subject of
> this message).  Everyone would soon learn that this was regarding the
> book not request for support.
>
> 2. When *anyone* has any time,  update the book and repost the message
> with [BX].  Where
> necessary,  include a note as to which section (or wiki page) it has
> been inserted.
>
> It generates more traffic on the list,  but group regulars will know
> it is just about the book.  Non-regulars will be treated to worthwhile
> repostings of good tips until they learn what [BK] and [BX] mean.
>
> BTW I suggest [BK] and [BX] because you can do unambiguous searches
> with 'insubject:[BK]'.
>
> Anyone would be able to participate,  or not,  so it is not an onerous
> idea.  Please add any other ideas of how we can get the information
> out of this group into the book and whether or not you like this
> suggestion.
>
> Best regards,  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.



[web2py] Re: routes for subdomain

2010-02-16 Thread mdipierro
This cannot be done with routes (at least not unless you list all
options for c).
You can do this with mod-rewrite in apache.

On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
> No.
>
> example.com/$c/$f
>
> maps to
>
> /init/public/$c/$f
>
> and then
>
> dashboard.example.com/$f
>
> maps to
>
> /init/dashboard/$f
>
> I basically want
>
> $c.example.com/$f
>
> /init/$c/$f
>
> As I say this I kind of remember a post about this, search failing me.
>
> -Thadeus
>
> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
> > forgot right bracket ]
>
> > On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
> >> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess  
> >> wrote:
> >>> I need to take the following with routes
>
> >>> controller.website.com/action/args
>
> >>> and convert it to
>
> >>> /init/controller/action/args
>
> >>> How can I do this, I have attempted to copy the book example however
> >>> it is just giving syntax errors.
>
> >> This is a guess based on an example I saw:
>
> >> routes_in=[('/init/controller/action/args','/action/args')
>
> >> -wes
>
> > --
> > 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.

-- 
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] Roadmap - or wishlist

2010-02-16 Thread Alexandre Andrade
I think is a recorrent subject, but would be good have a roadmap or at least
a wishlist.

It can provide some help to achieve the roadmap, and help with documentation
too.



-- 
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.



Re: [web2py] Re: routes for subdomain

2010-02-16 Thread Thadeus Burgess
Can I do it for just one $c then, that is all I need. Every other
controller will continue to function normally, this is only a special
case controller.

-Thadeus





On Tue, Feb 16, 2010 at 4:35 PM, mdipierro  wrote:
> This cannot be done with routes (at least not unless you list all
> options for c).
> You can do this with mod-rewrite in apache.
>
> On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
>> No.
>>
>> example.com/$c/$f
>>
>> maps to
>>
>> /init/public/$c/$f
>>
>> and then
>>
>> dashboard.example.com/$f
>>
>> maps to
>>
>> /init/dashboard/$f
>>
>> I basically want
>>
>> $c.example.com/$f
>>
>> /init/$c/$f
>>
>> As I say this I kind of remember a post about this, search failing me.
>>
>> -Thadeus
>>
>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
>> > forgot right bracket ]
>>
>> > On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
>> >> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess  
>> >> wrote:
>> >>> I need to take the following with routes
>>
>> >>> controller.website.com/action/args
>>
>> >>> and convert it to
>>
>> >>> /init/controller/action/args
>>
>> >>> How can I do this, I have attempted to copy the book example however
>> >>> it is just giving syntax errors.
>>
>> >> This is a guess based on an example I saw:
>>
>> >> routes_in=[('/init/controller/action/args','/action/args')
>>
>> >> -wes
>>
>> > --
>> > 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.
>
> --
> 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.



Re: [web2py] Re: first gae app

2010-02-16 Thread Wes James
so if I created a field

Field('fieldKey', 'text')

and put ['web2py', 'web2p', 'web2', 'web', 'we', 'w'], in for the
value and then did

query=request.vars._query

rows=db(db.table.all().filter('fieldKey >=', query).filter('fieldKey
<', query + u'\ufffd')).select(db.table.ALL,
orderby=db.table.tableitem)

this would work?

On Sun, Feb 14, 2010 at 3:57 AM, Richard  wrote:
> sounds like this will be useful.
>
> StringListProperty is a native gae type now supported by web2py:
> http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#StringListProperty
> http://groups.google.com/group/web2py/browse_thread/thread/7d284c9fa488e855
>
> To get around the like problem you can do something like this:
> Model.all().filter('ngrams >=', word).filter('ngrams <', word +
> u'\ufffd')
>
> Check out Thadeus's code for a full example.
>
> There's also info how to do this in the docs:
> http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Introducing_Indexes
>
> Richard
>
>
> On Feb 14, 1:52 pm, Wes James  wrote:
>> Richard,
>>
>> Do you have a python example of this?  I'll check on
>> StringListProperty also and see how it works. (would this work on
>> gae?) I was trying somthing else since like is not supported, but this
>> might work.  I would like this site to provide quick search on
>> anything that would be helpful in building a web2py app.  There are a
>> lot of things in tools.py that could go here for instance, and maybe
>> another page with docstrings?  Whatever anyone thinks would be
>> helpful.
>>
>> -wes
>>
>>
>>
>> On Sat, Feb 13, 2010 at 4:26 PM, Richard  wrote:
>> > hi wes,
>>
>> > something like this could be really nice for browsing the function
>> > docstrings. Do you intend to take it further?
>>
>> > If you use a StringListProperty to store all the ngrams (eg: web2py,
>> > web2p, web2, web, we, w) then it could match partial words.
>>
>> > Richard
>
> --
> 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.



[web2py] A comment about transactions

2010-02-16 Thread Jose
In the book, when speaking of transactions [1], gives an example of
rollback and referred to again when insert a new record id is
maintained. This may be so only in sqlite, sequences or generators are
out of transactions.

Web2py works works fine, except that the example can lead to
misinterpretation.

[1] http://web2py.com/book/default/section/6/4

Jose

-- 
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: routes for subdomain

2010-02-16 Thread Thadeus Burgess
I can't find any apache rewrite rules that work in this manner.

Basically i am just trying to get

dashboard.example.com to internally rewrite web2py's URL scheme so
that it looks at /init/dashboard but the user is still staring at
dashboard.example.com in their browser. This means web2py routes_out
will have to rewrite to the domain schema as well.

it is not looking like I can accomplish this with routes or mod_rewrite.

Massimo you have said you can redirect to two different apps depending
on http_host, isn't this a similar situation?

By the way.

routes_in containing

('.*:https://dashboard.example.com:GET /(?.*)', '/init/dashboard/\g'),

produces

Traceback (most recent call last):
[Tue Feb 16 16:14:58 2010] [error] [client   File
"/home/servant/sites/themediapanel.com/public/web2py/wsgihandler.py",
line 24, in 
[Tue Feb 16 16:14:58 2010] [error] [client  import gluon.main
[Tue Feb 16 16:14:58 2010] [error] [client ]   File "gluon/main.py",
line 105, in 
[Tue Feb 16 16:14:58 2010] [error] [client ] rewrite.load()
[Tue Feb 16 16:14:58 2010] [error] [client]   File "gluon/rewrite.py",
line 65, in load
[Tue Feb 16 16:14:58 2010] [error] [client
params.routes_in.append((re.compile(k, re.DOTALL), v))
[Tue Feb 16 16:14:58 2010] [error] [client]   File
"/usr/lib/python2.6/re.py", line 190, in compile
[Tue Feb 16 16:14:58 2010] [error] [client ] return _compile(pattern, flags)
[Tue Feb 16 16:14:58 2010] [error] [client ]   File
"/usr/lib/python2.6/re.py", line 245, in _compile
[Tue Feb 16 16:14:58 2010] [error] [client ] raise error, v #
invalid expression
[Tue Feb 16 16:14:58 2010] [error] [client] error: syntax error


-Thadeus





On Tue, Feb 16, 2010 at 5:06 PM, Thadeus Burgess  wrote:
> Can I do it for just one $c then, that is all I need. Every other
> controller will continue to function normally, this is only a special
> case controller.
>
> -Thadeus
>
>
>
>
>
> On Tue, Feb 16, 2010 at 4:35 PM, mdipierro  wrote:
>> This cannot be done with routes (at least not unless you list all
>> options for c).
>> You can do this with mod-rewrite in apache.
>>
>> On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
>>> No.
>>>
>>> example.com/$c/$f
>>>
>>> maps to
>>>
>>> /init/public/$c/$f
>>>
>>> and then
>>>
>>> dashboard.example.com/$f
>>>
>>> maps to
>>>
>>> /init/dashboard/$f
>>>
>>> I basically want
>>>
>>> $c.example.com/$f
>>>
>>> /init/$c/$f
>>>
>>> As I say this I kind of remember a post about this, search failing me.
>>>
>>> -Thadeus
>>>
>>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
>>> > forgot right bracket ]
>>>
>>> > On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
>>> >> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess  
>>> >> wrote:
>>> >>> I need to take the following with routes
>>>
>>> >>> controller.website.com/action/args
>>>
>>> >>> and convert it to
>>>
>>> >>> /init/controller/action/args
>>>
>>> >>> How can I do this, I have attempted to copy the book example however
>>> >>> it is just giving syntax errors.
>>>
>>> >> This is a guess based on an example I saw:
>>>
>>> >> routes_in=[('/init/controller/action/args','/action/args')
>>>
>>> >> -wes
>>>
>>> > --
>>> > 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.
>>
>> --
>> 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.



Re: [web2py] Re: first gae app

2010-02-16 Thread Wes James
There does not seem to be an .all().   How should the line be written?

thx,

-wes

On Tue, Feb 16, 2010 at 4:25 PM, Wes James  wrote:
> so if I created a field
>
> Field('fieldKey', 'text')
>
> and put ['web2py', 'web2p', 'web2', 'web', 'we', 'w'], in for the
> value and then did
>
> query=request.vars._query
>
> rows=db(db.table.all().filter('fieldKey >=', query).filter('fieldKey
> <', query + u'\ufffd')).select(db.table.ALL,
> orderby=db.table.tableitem)
>
> this would work?
>
> On Sun, Feb 14, 2010 at 3:57 AM, Richard  wrote:
>> sounds like this will be useful.
>>
>> StringListProperty is a native gae type now supported by web2py:
>> http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#StringListProperty
>> http://groups.google.com/group/web2py/browse_thread/thread/7d284c9fa488e855
>>
>> To get around the like problem you can do something like this:
>> Model.all().filter('ngrams >=', word).filter('ngrams <', word +
>> u'\ufffd')
>>
>> Check out Thadeus's code for a full example.
>>
>> There's also info how to do this in the docs:
>> http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Introducing_Indexes
>>
>> Richard
>>
>>
>> On Feb 14, 1:52 pm, Wes James  wrote:
>>> Richard,
>>>
>>> Do you have a python example of this?  I'll check on
>>> StringListProperty also and see how it works. (would this work on
>>> gae?) I was trying somthing else since like is not supported, but this
>>> might work.  I would like this site to provide quick search on
>>> anything that would be helpful in building a web2py app.  There are a
>>> lot of things in tools.py that could go here for instance, and maybe
>>> another page with docstrings?  Whatever anyone thinks would be
>>> helpful.
>>>
>>> -wes
>>>
>>>
>>>
>>> On Sat, Feb 13, 2010 at 4:26 PM, Richard  wrote:
>>> > hi wes,
>>>
>>> > something like this could be really nice for browsing the function
>>> > docstrings. Do you intend to take it further?
>>>
>>> > If you use a StringListProperty to store all the ngrams (eg: web2py,
>>> > web2p, web2, web, we, w) then it could match partial words.
>>>
>>> > Richard
>>
>> --
>> 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.



[web2py] Re: An enhanced BEAUTIFY class

2010-02-16 Thread John Heenan
No reaction to including a four line big productivity booster into
web2py!

If not an enhanced BEAUTIFY class why not another BEAUTIFY class such
as BEAUTIFY2?

Surely at least an answer is merited, even if the answer is no!

Below is a copy of http://www.web2pyslices.com/main/slices/take_slice/58

Title: BEAUTIFY enhanced

Notes: How to break the alphabetic ordering dependence of BEAUTIFY and
use multiple word keys with the dict method
The problem

A view page such as

{{extend 'layout.html'}}

{{=BEAUTIFY(response._vars)}}

will produce a nice recursively traversed presentation showing keys
and values of the response._vars dictionary in a table. If a key value
points to an inner dictionary, list ot tuple then the value is
recursed and shown as a table within a table. Very convenient.

There are two problems

   1. The order of presentation of keys at a particular dictionary
recursion level is alphabetical.
   2. Using the dict method is common in web2py to construct a
dictionary. However with this method keys cannot have spaces in them
and so the key will not appear as words when displayed in a view

The solution

The last four lines of the six lines below are an addition to class
BEAUTIFY in file gluon\html.py and provides a solution.


if type(value) == types.LambdaType:
  continue
if isinstance(key, str):  # a key must be a string type
  if key[1]=='_': # 'a_bcde_fghi' means 'bcde_fghi' is the key
to be shown
  key=key[2:] # remove 'a_' from 'a_bcde_fghi'
  key=' '.join([x.capitalize() for x in key.split('_')])  # Converts
remaining 'bcde_fghi' to 'Bcde Fghi'

The code examines the second character of the key. If this character
is '_' it removes the first two characters. This means the single
characters A-Z, a-z and 0-9 are available to arbitrarily and
conveniently reorder presentation independent of alphabetic order, as
the first letter and the underscore following will be removed.

If the second character is '_', then the last line the of code
replaces remaining underscores with a space and capitalizes the
result.
Examples using view above


  return dict(cde_fgh='world', ijk_lmn='hello')
  cde_fgh: world
  ijk_lmn: hello

  return dict(b_cde_fgh='world', a_ijk_lmn='hello')
  Ijk Lmn: hello
  Cde Fgh: world

You can see an example of this technique in action at
http://www.zgus.com/zgus/products/category_item/1

The view page is the three line view page above.

The last statement of the category_item function is


  return stripped_dict(dict(
a_product_category=item.title,
b_custom=item.custom,
d_products= _product_list,
e_category_documentation=_document_list,
f_video=_video_list,
g_about=item.about,
))

As for the quality of the linked videos in the page, I received a
polite complaint from a senior executive of a well known corporation
about their poor quality! Their main purpose is to demonstrate I work
on further developing real product which is not yet ready to be
marketed!

John Heenan


On Feb 16, 12:52 pm, John Heenan  wrote:
> I have just put up a new web2slice that includes a manual patch for
> the BEAUTIFY class. The entry is 
> athttp://www.web2pyslices.com/main/slices/take_slice/58
>
> I would like to propose that the patch or an equivalent one makes it
> way into the web2py trunk. If it does then I can change the web2py
> slice to be an effective and practical example of the use of the
> enhancement.
>
> Thanks
>
> John Heenan

-- 
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: routes for subdomain

2010-02-16 Thread Jonathan Lundell
On Feb 16, 2010, at 3:37 PM, Thadeus Burgess wrote:

> By the way.
> 
> routes_in containing
> 
> ('.*:https://dashboard.example.com:GET /(?.*)', 
> '/init/dashboard/\g'),

(?P...

-- 
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: routes for subdomain

2010-02-16 Thread Thadeus Burgess
Thanks. It is not working like expected. It is now going to /init/default/index.

('.*:https://dashboard.example.com:.* /(?P.*)', '/init/dashboard/\g'),

-Thadeus





On Tue, Feb 16, 2010 at 6:08 PM, Jonathan Lundell  wrote:
> On Feb 16, 2010, at 3:37 PM, Thadeus Burgess wrote:
>
>> By the way.
>>
>> routes_in containing
>>
>> ('.*:https://dashboard.example.com:GET /(?.*)', 
>> '/init/dashboard/\g'),
>
> (?P...
>
> --
> 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.



Re: [web2py] Re: routes for subdomain

2010-02-16 Thread Jonathan Lundell
On Feb 16, 2010, at 4:25 PM, Thadeus Burgess wrote:

> Thanks. It is not working like expected. It is now going to 
> /init/default/index.

You might try experimenting with the doctest in routes.example.py (copy it and 
main to your routes.py unless it's already there).

Going to the default location (/init/default/index) suggests that nothing is 
matching.

> 
> ('.*:https://dashboard.example.com:.* /(?P.*)', 
> '/init/dashboard/\g'),
> 
> -Thadeus
> 
> 
> 
> 
> 
> On Tue, Feb 16, 2010 at 6:08 PM, Jonathan Lundell  wrote:
>> On Feb 16, 2010, at 3:37 PM, Thadeus Burgess wrote:
>> 
>>> By the way.
>>> 
>>> routes_in containing
>>> 
>>> ('.*:https://dashboard.example.com:GET /(?.*)', 
>>> '/init/dashboard/\g'),
>> 
>> (?P...


-- 
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: An enhanced BEAUTIFY class

2010-02-16 Thread villas
On Feb 17, 12:07 am, John Heenan  wrote:
> No reaction to including a four line big productivity booster into
> web2py!

Hi John,
Sorry no one commented!  At least I looked at it, and liked it.  But
Beautify is only a prototyping & testing thing for most so it's making
something prettier that no one will see. But it's still better, so why
not? +1
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.



Re: [web2py] Re: An enhanced BEAUTIFY class

2010-02-16 Thread Thadeus Burgess
I am sorry that I did not comment as well.

I took a look when you originally posted, and I like it. I didn't
comment because I do not use BEAUTIFY.

I really do like the recursive, +1 for me, but only as another option
to the current beautify not a replacement.

-Thadeus





On Tue, Feb 16, 2010 at 7:57 PM, villas  wrote:
> On Feb 17, 12:07 am, John Heenan  wrote:
>> No reaction to including a four line big productivity booster into
>> web2py!
>
> Hi John,
> Sorry no one commented!  At least I looked at it, and liked it.  But
> Beautify is only a prototyping & testing thing for most so it's making
> something prettier that no one will see. But it's still better, so why
> not? +1
> 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.
>
>

-- 
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: An enhanced BEAUTIFY class

2010-02-16 Thread Thadeus Burgess
I will say this, it is alot better, because you can hardly even tell
it is a prototyping table, it could in certain situations pass for
production quality :)

-Thadeus





On Tue, Feb 16, 2010 at 9:06 PM, Thadeus Burgess  wrote:
> I am sorry that I did not comment as well.
>
> I took a look when you originally posted, and I like it. I didn't
> comment because I do not use BEAUTIFY.
>
> I really do like the recursive, +1 for me, but only as another option
> to the current beautify not a replacement.
>
> -Thadeus
>
>
>
>
>
> On Tue, Feb 16, 2010 at 7:57 PM, villas  wrote:
>> On Feb 17, 12:07 am, John Heenan  wrote:
>>> No reaction to including a four line big productivity booster into
>>> web2py!
>>
>> Hi John,
>> Sorry no one commented!  At least I looked at it, and liked it.  But
>> Beautify is only a prototyping & testing thing for most so it's making
>> something prettier that no one will see. But it's still better, so why
>> not? +1
>> 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.
>>
>>
>

-- 
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: An enhanced BEAUTIFY class

2010-02-16 Thread John Heenan
True. But surely better organised or prettier prototypes are
preferable when prototyping, as they gives a more realistic idea of a
final desired layout before the prettifiers get called in!

You can see the effect using just BEAUTIFY at 
http://www.zgus.com/zgus/products/category_item/1

I don't have the skills or time to make the site pretty. If I start to
make money using the site then I will be happy to pay someone to give
my drab functional site a really pretty look!

What I would really prefer in web2py is a hook in BEAUTIFY and other
helpers so I could bypass them and not have my changes overridden
every time I do an upgrade. Even a hook in a low level inherited base
class would be enough, if using the hook would enable the name of the
helper to be determined and to override the helper. However I reckon
this is too much to ask!

John Heenan


On Feb 17, 11:57 am, villas  wrote:
> On Feb 17, 12:07 am, John Heenan  wrote:
>
> > No reaction to including a four line big productivity booster into
> > web2py!
>
> Hi John,
> Sorry no one commented!  At least I looked at it, and liked it.  But
> Beautify is only a prototyping & testing thing for most so it's making
> something prettier that no one will see. But it's still better, so why
> not? +1
> 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.



[web2py] Re: iptables

2010-02-16 Thread Anand Vaidya
Hi Massimo,

Try gShield, GPL licensed script  , It has a very simple configuration
file and a script that reads it.

I have used it for many years, pretty good script.

The URL http://muse.linuxmafia.org/gshield/ is currently down, but you
could dowload it from alternate locations.

Regards
Anand


On Feb 17, 2:57 am, mdipierro  wrote:
> does anybody have a decent iptables script that:
>
> - rejects malformed requests
> - allows only http, https and ssh
> - blocks sys attacks
> - blocks more 3 ssh connections/minute to ssh
> - blocks more 10 http requests/minute from known spiders (yahoo,
> google, ms)
> - blocks all https request from spiders

-- 
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: first gae app

2010-02-16 Thread mdipierro
You are mixing gae syntax and dal syntax.

This is only allowed in

from gluon.contrib.gql import gae
db.define_table('mytable',Field('this_is_a_list',type=gae.StringListProperty()))

queries must use dal syntax.

On Feb 16, 5:46 pm, Wes James  wrote:
> There does not seem to be an .all().   How should the line be written?
>
> thx,
>
> -wes
>
> On Tue, Feb 16, 2010 at 4:25 PM, Wes James  wrote:
> > so if I created a field
>
> > Field('fieldKey', 'text')
>
> > and put ['web2py', 'web2p', 'web2', 'web', 'we', 'w'], in for the
> > value and then did
>
> > query=request.vars._query
>
> > rows=db(db.table.all().filter('fieldKey >=', query).filter('fieldKey
> > <', query + u'\ufffd')).select(db.table.ALL,
> > orderby=db.table.tableitem)
>
> > this would work?
>
> > On Sun, Feb 14, 2010 at 3:57 AM, Richard  wrote:
> >> sounds like this will be useful.
>
> >> StringListProperty is a native gae type now supported by web2py:
> >>http://code.google.com/appengine/docs/python/datastore/typesandproper...
> >>http://groups.google.com/group/web2py/browse_thread/thread/7d284c9fa4...
>
> >> To get around the like problem you can do something like this:
> >> Model.all().filter('ngrams >=', word).filter('ngrams <', word +
> >> u'\ufffd')
>
> >> Check out Thadeus's code for a full example.
>
> >> There's also info how to do this in the docs:
> >>http://code.google.com/appengine/docs/python/datastore/queriesandinde...
>
> >> Richard
>
> >> On Feb 14, 1:52 pm, Wes James  wrote:
> >>> Richard,
>
> >>> Do you have a python example of this?  I'll check on
> >>> StringListProperty also and see how it works. (would this work on
> >>> gae?) I was trying somthing else since like is not supported, but this
> >>> might work.  I would like this site to provide quick search on
> >>> anything that would be helpful in building a web2py app.  There are a
> >>> lot of things in tools.py that could go here for instance, and maybe
> >>> another page with docstrings?  Whatever anyone thinks would be
> >>> helpful.
>
> >>> -wes
>
> >>> On Sat, Feb 13, 2010 at 4:26 PM, Richard  wrote:
> >>> > hi wes,
>
> >>> > something like this could be really nice for browsing the function
> >>> > docstrings. Do you intend to take it further?
>
> >>> > If you use a StringListProperty to store all the ngrams (eg: web2py,
> >>> > web2p, web2, web, we, w) then it could match partial words.
>
> >>> > Richard
>
> >> --
> >> 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.

-- 
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: routes for subdomain

2010-02-16 Thread mdipierro
No you just need routes in to rewrite the hostname. Routesout just
need to delete dashboard from path.

On Feb 16, 5:37 pm, Thadeus Burgess  wrote:
> I can't find any apache rewrite rules that work in this manner.
>
> Basically i am just trying to get
>
> dashboard.example.com to internally rewrite web2py's URL scheme so
> that it looks at /init/dashboard but the user is still staring at
> dashboard.example.com in their browser. This means web2py routes_out
> will have to rewrite to the domain schema as well.
>
> it is not looking like I can accomplish this with routes or mod_rewrite.
>
> Massimo you have said you can redirect to two different apps depending
> on http_host, isn't this a similar situation?
>
> By the way.
>
> routes_in containing
>
> ('.*:https://dashboard.example.com:GET/(?.*)', 
> '/init/dashboard/\g'),
>
> produces
>
> Traceback (most recent call last):
> [Tue Feb 16 16:14:58 2010] [error] [client   File
> "/home/servant/sites/themediapanel.com/public/web2py/wsgihandler.py",
> line 24, in 
> [Tue Feb 16 16:14:58 2010] [error] [client      import gluon.main
> [Tue Feb 16 16:14:58 2010] [error] [client ]   File "gluon/main.py",
> line 105, in 
> [Tue Feb 16 16:14:58 2010] [error] [client ]     rewrite.load()
> [Tue Feb 16 16:14:58 2010] [error] [client]   File "gluon/rewrite.py",
> line 65, in load
> [Tue Feb 16 16:14:58 2010] [error] [client
> params.routes_in.append((re.compile(k, re.DOTALL), v))
> [Tue Feb 16 16:14:58 2010] [error] [client]   File
> "/usr/lib/python2.6/re.py", line 190, in compile
> [Tue Feb 16 16:14:58 2010] [error] [client ]     return _compile(pattern, 
> flags)
> [Tue Feb 16 16:14:58 2010] [error] [client ]   File
> "/usr/lib/python2.6/re.py", line 245, in _compile
> [Tue Feb 16 16:14:58 2010] [error] [client ]     raise error, v #
> invalid expression
> [Tue Feb 16 16:14:58 2010] [error] [client] error: syntax error
>
> -Thadeus
>
> On Tue, Feb 16, 2010 at 5:06 PM, Thadeus Burgess  
> wrote:
> > Can I do it for just one $c then, that is all I need. Every other
> > controller will continue to function normally, this is only a special
> > case controller.
>
> > -Thadeus
>
> > On Tue, Feb 16, 2010 at 4:35 PM, mdipierro  wrote:
> >> This cannot be done with routes (at least not unless you list all
> >> options for c).
> >> You can do this with mod-rewrite in apache.
>
> >> On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
> >>> No.
>
> >>> example.com/$c/$f
>
> >>> maps to
>
> >>> /init/public/$c/$f
>
> >>> and then
>
> >>> dashboard.example.com/$f
>
> >>> maps to
>
> >>> /init/dashboard/$f
>
> >>> I basically want
>
> >>> $c.example.com/$f
>
> >>> /init/$c/$f
>
> >>> As I say this I kind of remember a post about this, search failing me.
>
> >>> -Thadeus
>
> >>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
> >>> > forgot right bracket ]
>
> >>> > On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
> >>> >> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess 
> >>> >>  wrote:
> >>> >>> I need to take the following with routes
>
> >>> >>> controller.website.com/action/args
>
> >>> >>> and convert it to
>
> >>> >>> /init/controller/action/args
>
> >>> >>> How can I do this, I have attempted to copy the book example however
> >>> >>> it is just giving syntax errors.
>
> >>> >> This is a guess based on an example I saw:
>
> >>> >> routes_in=[('/init/controller/action/args','/action/args')
>
> >>> >> -wes
>
> >>> > --
> >>> > 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.
>
> >> --
> >> 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.

-- 
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: An enhanced BEAUTIFY class

2010-02-16 Thread mdipierro
Sorry I did not comment. I think this this can be very useful but it
should not be a replacement for the current beautify. I think it is
important to leave the keys unchanged for debugging purposes. That is
what most people use BEAUTIFY for.

You should post a slice about the improved function and I am sure it
will be useful.

On Feb 16, 9:20 pm, John Heenan  wrote:
> True. But surely better organised or prettier prototypes are
> preferable when prototyping, as they gives a more realistic idea of a
> final desired layout before the prettifiers get called in!
>
> You can see the effect using just BEAUTIFY 
> athttp://www.zgus.com/zgus/products/category_item/1
>
> I don't have the skills or time to make the site pretty. If I start to
> make money using the site then I will be happy to pay someone to give
> my drab functional site a really pretty look!
>
> What I would really prefer in web2py is a hook in BEAUTIFY and other
> helpers so I could bypass them and not have my changes overridden
> every time I do an upgrade. Even a hook in a low level inherited base
> class would be enough, if using the hook would enable the name of the
> helper to be determined and to override the helper. However I reckon
> this is too much to ask!
>
> John Heenan
>
> On Feb 17, 11:57 am, villas  wrote:
>
> > On Feb 17, 12:07 am, John Heenan  wrote:
>
> > > No reaction to including a four line big productivity booster into
> > > web2py!
>
> > Hi John,
> > Sorry no one commented!  At least I looked at it, and liked it.  But
> > Beautify is only a prototyping & testing thing for most so it's making
> > something prettier that no one will see. But it's still better, so why
> > not? +1
> > 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.



[web2py] new GIL bug

2010-02-16 Thread mdipierro
Look at this bug report

http://bugs.python.org/issue7946

specifically look at the benchmarks at the bottom. This kind of bugs
affects web applications since they have threads with lots of IO.  One
more reason to stay with python 2.5 for now.

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.



[web2py] PAM support

2010-02-16 Thread mdipierro
web2py in trunk now support PAM authentication on Linux systems in two
ways

1) In admin.

   web2py.py -a ''

now admin will require your 'root' password. You can specify other
users.

2) In apps

from gluon.contrib.login_methods.pam_auth import
pam_auth
auth.settings.login_methods.append(pam_auth())

Your auth_user table must have also a 'username' field since 'email'
will not do.

-- 
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] Example of apache2 configuration where web2py exists along other sites

2010-02-16 Thread Johann Spies
Thanks to everybody who replied.  I was in a situation where I
urgently had to make an app available to a customer.  In this case I
had access to dns-entries so I just created a virtual IP on the server
interface and created a separate domain name for that IP.  I suppose I
could just have used a CNAME too.  That will be necessary for
Alexandre's solution.

But I will not always have that privilege.  Most of the time web2py
will have to live alongside other url's like this;

http://www.domain1.com/somedomain_maybephp
http://www.domain1.com/web2py_app

I will try again the fastcgi-solution Rob is using.  From what I have
read is fastcgi not as fast as wsgi but wsgi seems to be quite tricky
to set up in such a situation.

I was near the point of deciding to stop using web2py for this very
reason.  It is so easy to deploy a php-product and sometimes so tricky
do to the same with a python-product.

Regards
Johann

-- 
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: routes for subdomain

2010-02-16 Thread Thadeus Burgess
Ok I have spent way to long on this, I can't get any configuration of
routes/mod_rewrite to rewrite the hostname.


-Thadeus





On Tue, Feb 16, 2010 at 10:51 PM, mdipierro  wrote:
> No you just need routes in to rewrite the hostname. Routesout just
> need to delete dashboard from path.
>
> On Feb 16, 5:37 pm, Thadeus Burgess  wrote:
>> I can't find any apache rewrite rules that work in this manner.
>>
>> Basically i am just trying to get
>>
>> dashboard.example.com to internally rewrite web2py's URL scheme so
>> that it looks at /init/dashboard but the user is still staring at
>> dashboard.example.com in their browser. This means web2py routes_out
>> will have to rewrite to the domain schema as well.
>>
>> it is not looking like I can accomplish this with routes or mod_rewrite.
>>
>> Massimo you have said you can redirect to two different apps depending
>> on http_host, isn't this a similar situation?
>>
>> By the way.
>>
>> routes_in containing
>>
>> ('.*:https://dashboard.example.com:GET/(?.*)', 
>> '/init/dashboard/\g'),
>>
>> produces
>>
>> Traceback (most recent call last):
>> [Tue Feb 16 16:14:58 2010] [error] [client   File
>> "/home/servant/sites/themediapanel.com/public/web2py/wsgihandler.py",
>> line 24, in 
>> [Tue Feb 16 16:14:58 2010] [error] [client      import gluon.main
>> [Tue Feb 16 16:14:58 2010] [error] [client ]   File "gluon/main.py",
>> line 105, in 
>> [Tue Feb 16 16:14:58 2010] [error] [client ]     rewrite.load()
>> [Tue Feb 16 16:14:58 2010] [error] [client]   File "gluon/rewrite.py",
>> line 65, in load
>> [Tue Feb 16 16:14:58 2010] [error] [client
>> params.routes_in.append((re.compile(k, re.DOTALL), v))
>> [Tue Feb 16 16:14:58 2010] [error] [client]   File
>> "/usr/lib/python2.6/re.py", line 190, in compile
>> [Tue Feb 16 16:14:58 2010] [error] [client ]     return _compile(pattern, 
>> flags)
>> [Tue Feb 16 16:14:58 2010] [error] [client ]   File
>> "/usr/lib/python2.6/re.py", line 245, in _compile
>> [Tue Feb 16 16:14:58 2010] [error] [client ]     raise error, v #
>> invalid expression
>> [Tue Feb 16 16:14:58 2010] [error] [client] error: syntax error
>>
>> -Thadeus
>>
>> On Tue, Feb 16, 2010 at 5:06 PM, Thadeus Burgess  
>> wrote:
>> > Can I do it for just one $c then, that is all I need. Every other
>> > controller will continue to function normally, this is only a special
>> > case controller.
>>
>> > -Thadeus
>>
>> > On Tue, Feb 16, 2010 at 4:35 PM, mdipierro  wrote:
>> >> This cannot be done with routes (at least not unless you list all
>> >> options for c).
>> >> You can do this with mod-rewrite in apache.
>>
>> >> On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
>> >>> No.
>>
>> >>> example.com/$c/$f
>>
>> >>> maps to
>>
>> >>> /init/public/$c/$f
>>
>> >>> and then
>>
>> >>> dashboard.example.com/$f
>>
>> >>> maps to
>>
>> >>> /init/dashboard/$f
>>
>> >>> I basically want
>>
>> >>> $c.example.com/$f
>>
>> >>> /init/$c/$f
>>
>> >>> As I say this I kind of remember a post about this, search failing me.
>>
>> >>> -Thadeus
>>
>> >>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
>> >>> > forgot right bracket ]
>>
>> >>> > On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
>> >>> >> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess 
>> >>> >>  wrote:
>> >>> >>> I need to take the following with routes
>>
>> >>> >>> controller.website.com/action/args
>>
>> >>> >>> and convert it to
>>
>> >>> >>> /init/controller/action/args
>>
>> >>> >>> How can I do this, I have attempted to copy the book example however
>> >>> >>> it is just giving syntax errors.
>>
>> >>> >> This is a guess based on an example I saw:
>>
>> >>> >> routes_in=[('/init/controller/action/args','/action/args')
>>
>> >>> >> -wes
>>
>> >>> > --
>> >>> > 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.
>>
>> >> --
>> >> 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.
>
> --
> 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

[web2py] Re: PAM support

2010-02-16 Thread Anand Vaidya
Awesome!

So does that imply LDAP, AD, NIS/YP, /etc/passwd , etc etc all become
available?

Does it mean, if say, AD auth works on the host machine, it will work
for web2py too? In such a case, additional inputs such as domain_name
need to passed

Regards
Anand



On Feb 17, 1:24 pm, mdipierro  wrote:
> web2py in trunk now support PAM authentication on Linux systems in two
> ways
>
> 1) In admin.
>
>    web2py.py -a ''
>
> now admin will require your 'root' password. You can specify other
> users.
>
> 2) In apps
>
>     from gluon.contrib.login_methods.pam_auth import
> pam_auth
>     auth.settings.login_methods.append(pam_auth())
>
> Your auth_user table must have also a 'username' field since 'email'
> will not do.

-- 
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: routes for subdomain

2010-02-16 Thread Jonathan Lundell
On Feb 16, 2010, at 9:31 PM, Thadeus Burgess wrote:

> Ok I have spent way to long on this, I can't get any configuration of
> routes/mod_rewrite to rewrite the hostname.

I think Massimo is right: you don't have any reason to rewrite the hostname.

> 
> 
> -Thadeus
> 
> 
> 
> 
> 
> On Tue, Feb 16, 2010 at 10:51 PM, mdipierro  wrote:
>> No you just need routes in to rewrite the hostname. Routesout just
>> need to delete dashboard from path.
>> 
>> On Feb 16, 5:37 pm, Thadeus Burgess  wrote:
>>> I can't find any apache rewrite rules that work in this manner.
>>> 
>>> Basically i am just trying to get
>>> 
>>> dashboard.example.com to internally rewrite web2py's URL scheme so
>>> that it looks at /init/dashboard but the user is still staring at
>>> dashboard.example.com in their browser. This means web2py routes_out
>>> will have to rewrite to the domain schema as well.
>>> 
>>> it is not looking like I can accomplish this with routes or mod_rewrite.
>>> 
>>> Massimo you have said you can redirect to two different apps depending
>>> on http_host, isn't this a similar situation?
>>> 
>>> By the way.
>>> 
>>> routes_in containing
>>> 
>>> ('.*:https://dashboard.example.com:GET/(?.*)', 
>>> '/init/dashboard/\g'),
>>> 
>>> produces
>>> 
>>> Traceback (most recent call last):
>>> [Tue Feb 16 16:14:58 2010] [error] [client   File
>>> "/home/servant/sites/themediapanel.com/public/web2py/wsgihandler.py",
>>> line 24, in 
>>> [Tue Feb 16 16:14:58 2010] [error] [client  import gluon.main
>>> [Tue Feb 16 16:14:58 2010] [error] [client ]   File "gluon/main.py",
>>> line 105, in 
>>> [Tue Feb 16 16:14:58 2010] [error] [client ] rewrite.load()
>>> [Tue Feb 16 16:14:58 2010] [error] [client]   File "gluon/rewrite.py",
>>> line 65, in load
>>> [Tue Feb 16 16:14:58 2010] [error] [client
>>> params.routes_in.append((re.compile(k, re.DOTALL), v))
>>> [Tue Feb 16 16:14:58 2010] [error] [client]   File
>>> "/usr/lib/python2.6/re.py", line 190, in compile
>>> [Tue Feb 16 16:14:58 2010] [error] [client ] return _compile(pattern, 
>>> flags)
>>> [Tue Feb 16 16:14:58 2010] [error] [client ]   File
>>> "/usr/lib/python2.6/re.py", line 245, in _compile
>>> [Tue Feb 16 16:14:58 2010] [error] [client ] raise error, v #
>>> invalid expression
>>> [Tue Feb 16 16:14:58 2010] [error] [client] error: syntax error
>>> 
>>> -Thadeus
>>> 
>>> On Tue, Feb 16, 2010 at 5:06 PM, Thadeus Burgess  
>>> wrote:
 Can I do it for just one $c then, that is all I need. Every other
 controller will continue to function normally, this is only a special
 case controller.
>>> 
 -Thadeus
>>> 
 On Tue, Feb 16, 2010 at 4:35 PM, mdipierro  wrote:
> This cannot be done with routes (at least not unless you list all
> options for c).
> You can do this with mod-rewrite in apache.
>>> 
> On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
>> No.
>>> 
>> example.com/$c/$f
>>> 
>> maps to
>>> 
>> /init/public/$c/$f
>>> 
>> and then
>>> 
>> dashboard.example.com/$f
>>> 
>> maps to
>>> 
>> /init/dashboard/$f
>>> 
>> I basically want
>>> 
>> $c.example.com/$f
>>> 
>> /init/$c/$f
>>> 
>> As I say this I kind of remember a post about this, search failing me.
>>> 
>> -Thadeus
>>> 
>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
>>> forgot right bracket ]
>>> 
>>> On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
 On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess 
  wrote:
> I need to take the following with routes
>>> 
> controller.website.com/action/args
>>> 
> and convert it to
>>> 
> /init/controller/action/args
>>> 
> How can I do this, I have attempted to copy the book example however
> it is just giving syntax errors.
>>> 
 This is a guess based on an example I saw:
>>> 
 routes_in=[('/init/controller/action/args','/action/args')
>>> 
 -wes


-- 
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: new GIL bug

2010-02-16 Thread Graham Dumpleton


On Feb 17, 4:20 pm, mdipierro  wrote:
> Look at this bug report
>
> http://bugs.python.org/issue7946
>
> specifically look at the benchmarks at the bottom. This kind of bugs
> affects web applications since they have threads with lots of IO.  One
> more reason to stay with python 2.5 for now.

For some background context, read:

   http://www.dabeaz.com/python/NewGIL.pdf

Based on the name, same guy as reported the bug has previously worked
in getting the GIL behaviour changed in Python 3.2 to address issues
in linked PDF. That bug report seems just to say that the changes they
made in Python 3.2 so far are not perfect as is showing up this bad
degradation for a particular use case. Just means they need to address
that particular behaviour and further optimise the code behaviour to
counter it before they release Python 3.2.

Overall the changes made to Python 3.2 GIL seem to be positive. Once
they sort any issues like this out, it would be good to see it back
ported to Python 2.X stream.

Anyway, not sure why you are holding this up as reason to stay with
Python 2.5. Python 2.6 and 3.1 both have old GIL code still and Python
3.2 isn't even released yet, so this is a bug for an unreleased
version.

Graham

-- 
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] crud.read()

2010-02-16 Thread Johann Spies
How do I use crud.read() without gettting the

admin  request  session  response

buttons at the bottom?

Or should I use SQLFORM with readonly fields?

I have
Regards
Johann

-- 
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: PAM support

2010-02-16 Thread mdipierro
I am not sure but I think so.

Whatever username:password you use to login into your machine should
now work in admin and apps. In admin you need to specify the username
a priori.

On Feb 16, 11:55 pm, Anand Vaidya  wrote:
> Awesome!
>
> So does that imply LDAP, AD, NIS/YP, /etc/passwd , etc etc all become
> available?
>
> Does it mean, if say, AD auth works on the host machine, it will work
> for web2py too? In such a case, additional inputs such as domain_name
> need to passed
>
> Regards
> Anand
>
> On Feb 17, 1:24 pm, mdipierro  wrote:
>
> > web2py in trunk now support PAM authentication on Linux systems in two
> > ways
>
> > 1) In admin.
>
> >    web2py.py -a ''
>
> > now admin will require your 'root' password. You can specify other
> > users.
>
> > 2) In apps
>
> >     from gluon.contrib.login_methods.pam_auth import
> > pam_auth
> >     auth.settings.login_methods.append(pam_auth())
>
> > Your auth_user table must have also a 'username' field since 'email'
> > will not do.

-- 
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: new GIL bug

2010-02-16 Thread mdipierro
You are right this not a reason not to move. The main reason is
backward compatibility. In general 3.x seems to be slower than 2.x for
data intensive processes. Am I wrong?

On Feb 17, 12:05 am, Graham Dumpleton 
wrote:
> On Feb 17, 4:20 pm, mdipierro  wrote:
>
> > Look at this bug report
>
> >http://bugs.python.org/issue7946
>
> > specifically look at the benchmarks at the bottom. This kind of bugs
> > affects web applications since they have threads with lots of IO.  One
> > more reason to stay with python 2.5 for now.
>
> For some background context, read:
>
>    http://www.dabeaz.com/python/NewGIL.pdf
>
> Based on the name, same guy as reported the bug has previously worked
> in getting the GIL behaviour changed in Python 3.2 to address issues
> in linked PDF. That bug report seems just to say that the changes they
> made in Python 3.2 so far are not perfect as is showing up this bad
> degradation for a particular use case. Just means they need to address
> that particular behaviour and further optimise the code behaviour to
> counter it before they release Python 3.2.
>
> Overall the changes made to Python 3.2 GIL seem to be positive. Once
> they sort any issues like this out, it would be good to see it back
> ported to Python 2.X stream.
>
> Anyway, not sure why you are holding this up as reason to stay with
> Python 2.5. Python 2.6 and 3.1 both have old GIL code still and Python
> 3.2 isn't even released yet, so this is a bug for an unreleased
> version.
>
> Graham

-- 
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: crud.read()

2010-02-16 Thread mdipierro
You get "admin  request  session  response " because you did not
define a view so you have a generic one. You need a view

{{extend 'layout.html'}}{{=form}}

On Feb 17, 12:17 am, Johann Spies  wrote:
> How do I use crud.read() without gettting the
>
> admin  request  session  response
>
> buttons at the bottom?
>
> Or should I use SQLFORM with readonly fields?
>
> I have
> Regards
> Johann

-- 
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: routes for subdomain

2010-02-16 Thread Thadeus Burgess
example.com/controllerA/function1 -> /init/controllerA/function1
example.com/controllerA/function2 -> /init/controllerA/function2
example.com/controllerB/function1 -> /init/controllerB/function1
example.com/controllerB/function2 -> /init/controllerB/function2
example.com/$anything -> /init/defaultController/$anything
dashboard.example.com/function1 -> /init/dashboard/function1
dashboard.example.com/function2 -> /init/dashboard/function2
dashboard.example.com/$anything -> /init/dashboard/$anything

Any of the above URLS should work.

You should NOT be able to do the following, dashboard controller
should only be accessed by this single subdomain.

!example.com/init/dashboard/function1

I don't care if I have to declare every controller in routes... I
would have to do that in django/werkzeug/ruby/php/etc. I'm ready for
web2py to get out of my way and let me do what I want to do.

When I said rewrite hostname I ment to redirect a single hostname to a
single web2py controller. This is the same concept as example1.com
goes to app1 and example2.com goes to app2, but on the controller
level instead of app level! (because the controllers share models)

Hopefully this gets my point across.

-Thadeus





On Wed, Feb 17, 2010 at 12:03 AM, Jonathan Lundell  wrote:
> On Feb 16, 2010, at 9:31 PM, Thadeus Burgess wrote:
>
>> Ok I have spent way to long on this, I can't get any configuration of
>> routes/mod_rewrite to rewrite the hostname.
>
> I think Massimo is right: you don't have any reason to rewrite the hostname.
>
>>
>>
>> -Thadeus
>>
>>
>>
>>
>>
>> On Tue, Feb 16, 2010 at 10:51 PM, mdipierro  wrote:
>>> No you just need routes in to rewrite the hostname. Routesout just
>>> need to delete dashboard from path.
>>>
>>> On Feb 16, 5:37 pm, Thadeus Burgess  wrote:
 I can't find any apache rewrite rules that work in this manner.

 Basically i am just trying to get

 dashboard.example.com to internally rewrite web2py's URL scheme so
 that it looks at /init/dashboard but the user is still staring at
 dashboard.example.com in their browser. This means web2py routes_out
 will have to rewrite to the domain schema as well.

 it is not looking like I can accomplish this with routes or mod_rewrite.

 Massimo you have said you can redirect to two different apps depending
 on http_host, isn't this a similar situation?

 By the way.

 routes_in containing

 ('.*:https://dashboard.example.com:GET/(?.*)', 
 '/init/dashboard/\g'),

 produces

 Traceback (most recent call last):
 [Tue Feb 16 16:14:58 2010] [error] [client   File
 "/home/servant/sites/themediapanel.com/public/web2py/wsgihandler.py",
 line 24, in 
 [Tue Feb 16 16:14:58 2010] [error] [client      import gluon.main
 [Tue Feb 16 16:14:58 2010] [error] [client ]   File "gluon/main.py",
 line 105, in 
 [Tue Feb 16 16:14:58 2010] [error] [client ]     rewrite.load()
 [Tue Feb 16 16:14:58 2010] [error] [client]   File "gluon/rewrite.py",
 line 65, in load
 [Tue Feb 16 16:14:58 2010] [error] [client
 params.routes_in.append((re.compile(k, re.DOTALL), v))
 [Tue Feb 16 16:14:58 2010] [error] [client]   File
 "/usr/lib/python2.6/re.py", line 190, in compile
 [Tue Feb 16 16:14:58 2010] [error] [client ]     return _compile(pattern, 
 flags)
 [Tue Feb 16 16:14:58 2010] [error] [client ]   File
 "/usr/lib/python2.6/re.py", line 245, in _compile
 [Tue Feb 16 16:14:58 2010] [error] [client ]     raise error, v #
 invalid expression
 [Tue Feb 16 16:14:58 2010] [error] [client] error: syntax error

 -Thadeus

 On Tue, Feb 16, 2010 at 5:06 PM, Thadeus Burgess  
 wrote:
> Can I do it for just one $c then, that is all I need. Every other
> controller will continue to function normally, this is only a special
> case controller.

> -Thadeus

> On Tue, Feb 16, 2010 at 4:35 PM, mdipierro  
> wrote:
>> This cannot be done with routes (at least not unless you list all
>> options for c).
>> You can do this with mod-rewrite in apache.

>> On Feb 16, 4:06 pm, Thadeus Burgess  wrote:
>>> No.

>>> example.com/$c/$f

>>> maps to

>>> /init/public/$c/$f

>>> and then

>>> dashboard.example.com/$f

>>> maps to

>>> /init/dashboard/$f

>>> I basically want

>>> $c.example.com/$f

>>> /init/$c/$f

>>> As I say this I kind of remember a post about this, search failing me.

>>> -Thadeus

>>> On Tue, Feb 16, 2010 at 4:02 PM, Wes James  wrote:
 forgot right bracket ]

 On Tue, Feb 16, 2010 at 2:59 PM, Wes James  wrote:
> On Tue, Feb 16, 2010 at 2:42 PM, Thadeus Burgess 
>  wrote:
>> I need to take the following with routes

>> controller.website.com/action/args

>> and convert it to


Re: [web2py] Re: they are copying us....

2010-02-16 Thread Thadeus Burgess
http://kodingen.com/

?? this seems more along the lines.

-Thadeus





On Tue, Feb 16, 2010 at 12:29 PM, mikech  wrote:
> To quote a saying:
> Imitation is the sincerest form of flattery.
>
> On Feb 16, 6:48 am, mdipierro  wrote:
>> sorry was a joke and I did not mean it in a negative ways. I meant to
>> indicate that if before we were taking inspirations from them now thay
>> are taking inspirations from us. I think that is a nice project and
>> perhaps we can learn from it too.
>>
>> On Feb 16, 3:25 am, pistacchio  wrote:
>>
>>
>>
>> > hi massimo,
>> > i really appreciate your work on web2py. the product is excellent,
>> > i've just launched my first site using it and other two are on the
>> > work. i like the new documentation (how it's shaping up) and the way
>> > you "rule" the community around web2py prove that your way is right. i
>> > mean, you do a lot of work and coordinate inputs.
>>
>> > one thing i really don't understand is your approach to the opensource
>> > philosophy. i already pointed it out weeks ago about the non free, pdf
>> > documentation that is something really sick in a opensource
>> > environment. fortunately i was not the only one thinking this way and,
>> > in the end, the online book is now there and shining.
>>
>> > now, i think this "copying us" is utterly out of place. as you stated
>> > somewhere, your sources of inspiration were initially django and
>> > rails. are you copying them? did you make the idea of "web framework"
>> > by yourself? were you the first one to come out with the mvc pattern?
>> > i don't think so, and this is perfect.
>>
>> > the opensource community, seen as a whole, not as a series of rival
>> > smaller communities that gather around isolated projects, drains its
>> > power from the openness of the ideas, from making them circulate and
>> > the word "copy", with the negative connotation of "plagiarize" hidden
>> > within it, has nothing to do with this.
>> > the guy may or may be not been inspired by web2py, but if he was, it
>> > is a good thing that web2py did something so valid that other people
>> > want to take inspiration from it. if he ends up writing a piece of
>> > software that is better than the current web2py's online editor, we
>> > can replace it with the new, better one and the circle will be
>> > completed as opening an idea would lead to end up with a better
>> > product. that's the whole point of opensource.
>>
>> > On Feb 16, 5:57 am, mdipierro  wrote:
>>
>> > >http://haineault.com/blog/125/
>>
>> > > P.S. Of course we have 3 years of head start and the web2py
>> > > architecture was designed for this, theirs isn't.
>
> --
> 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.



[web2py] Re: they are copying us....

2010-02-16 Thread mdipierro
This is a cool layout and editor. It uses jquery. no syntax
highlighting.

On Feb 17, 12:49 am, Thadeus Burgess  wrote:
> http://kodingen.com/
>
> ?? this seems more along the lines.
>
> -Thadeus
>
> On Tue, Feb 16, 2010 at 12:29 PM, mikech  wrote:
> > To quote a saying:
> > Imitation is the sincerest form of flattery.
>
> > On Feb 16, 6:48 am, mdipierro  wrote:
> >> sorry was a joke and I did not mean it in a negative ways. I meant to
> >> indicate that if before we were taking inspirations from them now thay
> >> are taking inspirations from us. I think that is a nice project and
> >> perhaps we can learn from it too.
>
> >> On Feb 16, 3:25 am, pistacchio  wrote:
>
> >> > hi massimo,
> >> > i really appreciate your work on web2py. the product is excellent,
> >> > i've just launched my first site using it and other two are on the
> >> > work. i like the new documentation (how it's shaping up) and the way
> >> > you "rule" the community around web2py prove that your way is right. i
> >> > mean, you do a lot of work and coordinate inputs.
>
> >> > one thing i really don't understand is your approach to the opensource
> >> > philosophy. i already pointed it out weeks ago about the non free, pdf
> >> > documentation that is something really sick in a opensource
> >> > environment. fortunately i was not the only one thinking this way and,
> >> > in the end, the online book is now there and shining.
>
> >> > now, i think this "copying us" is utterly out of place. as you stated
> >> > somewhere, your sources of inspiration were initially django and
> >> > rails. are you copying them? did you make the idea of "web framework"
> >> > by yourself? were you the first one to come out with the mvc pattern?
> >> > i don't think so, and this is perfect.
>
> >> > the opensource community, seen as a whole, not as a series of rival
> >> > smaller communities that gather around isolated projects, drains its
> >> > power from the openness of the ideas, from making them circulate and
> >> > the word "copy", with the negative connotation of "plagiarize" hidden
> >> > within it, has nothing to do with this.
> >> > the guy may or may be not been inspired by web2py, but if he was, it
> >> > is a good thing that web2py did something so valid that other people
> >> > want to take inspiration from it. if he ends up writing a piece of
> >> > software that is better than the current web2py's online editor, we
> >> > can replace it with the new, better one and the circle will be
> >> > completed as opening an idea would lead to end up with a better
> >> > product. that's the whole point of opensource.
>
> >> > On Feb 16, 5:57 am, mdipierro  wrote:
>
> >> > >http://haineault.com/blog/125/
>
> >> > > P.S. Of course we have 3 years of head start and the web2py
> >> > > architecture was designed for this, theirs isn't.
>
> > --
> > 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.

-- 
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.