Re: [web2py] Re: web2py.com down?

2011-11-02 Thread Michal Jursa

Website is back and running... YIPIIIEE

Michal

On 11/02/2011 01:01 PM, Anthony wrote:

Yes, looks like it's down: http://www.downforeveryoneorjustme.com/web2py.com





[web2py] web2py.com down?

2011-11-02 Thread Michal Jursa

Hi,
is there some problem with web2py site? I just started new project, 
returned to web2py and need a book for a while in the re-beginning..:D


Michal


[web2py] Example broken

2010-08-12 Thread Michal Jursa

Hi,
just returned back to web2py after some time and browsed examples to 
refresh my web2py skills and found some typo.


1.83.1
images_examples.py uses db.image, which is not present in models:

def index():
form = SQLFORM(db.image)
...

Nothing important, but some new users or beginners can get confused by that.

Michal



Re: [web2py] Decimal vs Float and Documentation

2010-06-01 Thread Michal Jursa

Hi,
decimal is not directly supported as it is not supported in some db 
engines, but you can use SQLCustomType. Example here:


http://www.web2py.com/examples/static/epydoc/web2py.gluon.sql.SQLCustomType-class.html

Michal

NetAdmin wrote:

1. What is the best field choice for currency calculations?

I can't find any documentation on the DECIMAL field-type
even though I saw  Field('totalsale', 'decimal(10,2)'),
while browsing google/groups.

2. Where should I look for the very latest documentation?

I defined a field as DOUBLE, but during an an
edit using SQLFORM, 40.00 shows as 40.0

3. How can I display 2 decimal places using SQLFORM?

I'll switch from sqlite to MySQL if needed.

Thanks!




[web2py:24428] Re: web2py 1.64.2 is OUT

2009-06-18 Thread Michal Jursa

Markus Gritsch wrote:
> On Thu, Jun 18, 2009 at 1:04 AM, mr.freeze wrote:
 New IS_COMPLEX validator, thanks Mr. Freeze
> 
> Well, IS_COMPLEX is not a good name since Python has a complex
> datatype: e.g. 3+5j and one could assume it is tested for this.
> 
> Markus

I did so, until explained. Really wondered why web2py needs complex 
numbers. :)

Actually I decided not to use web2py for my projects now, coz of lack of 
decimal support and too much of 'do it web2py way' functionality which 
sometimes stands in my way and which is going a bit Django like and it 
is wrong from my point of view. My requests are probably too complicated 
or just too different from simple web2py approach. But i'm still with 
the group and will monitor the future evolution and will use web2py for 
my smaller projects i think, but who knows :)

Michal


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



[web2py:22770] Re: Decimals again

2009-05-27 Thread Michal Jursa

MYSQL
spec: For DECIMAL(M,D), the maximum M is 65
create: CREATE TABLE foo( bar decimal(10,2) )

POSTGRESQL
spec: DECIMAL(M,D), exact, no limit
create: CREATE TABLE foo( bar decimal(10,2) )



DenesL napsal(a):
> Lets document the support for decimal type in the available DBs (my $.
> 02):
> 
> p=precision, s=scale, [means optional]
> 
> ---DB  -syntax-  --limits---  --dft--
> MSSQL2005  decimal[(p[,s])]  0<=s<=p<=38  18,0
> DB2/400  "   1<=s<=p<=31  5,0
> 
> 
> > 


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



[web2py:22744] Re: Decimals again

2009-05-27 Thread Michal Jursa

+1 !! exactly ;)

Kuba Kucharski wrote:
> Stay with web2py! I have the same problem. I've decided to wait.
> Decimal is a must. Web2py is not an enterprise framework until we have it ;)
> 

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



[web2py:22741] Re: Decimals again

2009-05-27 Thread Michal Jursa

Problem is I want to leave some logic also in db (triggers etc) and then 
i come to trouble if i need to do some calculations in db. STR + STR in 
db is not the right way to be done in SQL. I can handle these 
str<->decimal conversions in any program, but i also need fully 
functional database and it is not possible this way. This should be some 
finacial stuff and i really don't want to do it like having prices in 
cents or so. If this decimal trouble becomes a problem, i'll get 
cherrypy myself again and start over from scratch, but i'd really like 
to stay with web2py ..:)

Michal

mdipierro wrote:
> That is not what I said. I said that it is not possible to implement
> decimal in a way that behaves the same way with database backend
> systems that support decimal nativly and those that do not.
> 
> My suggestion is, for now, use 'string' but convert the values to
> decimal.Decimal() before using them in computations. This will give
> you the precision you want.
> 
> Massimo
> 
> On May 27, 7:56 am, Michal Jursa  wrote:
>> I know about trunk solution, but you've recently said you dont like to
>> implement decimals at all. Or may be I miunderstood you..:)
>>
>> You think it is fine to start with trunk version and one day it will
>> become stable? Coz thats the only thing that really holds me back from
>> using web2py in 'real' world..:)
>>
>> Michal
>>
>> mdipierro wrote:
>>> In trunk this is already implemented
>>> http://groups.google.com/group/web2py/browse_thread/thread/13d9e9fd73...
>>> But it is experimental.
>>> If you really want a date for a stable Decimal API in DAL, I can Say
>>> July 31 but it may be done sooner.
>>> Masssimo
>>> On May 27, 6:53 am, Michal Jursa  wrote:
>>>> Hi,
>>>> I know there were a lot of posts about pros and cons of implementing
>>>> DECIMAL type to DAL, but there is no result. As DECIMALs are really
>>>> important for me, I'd like to know if it will be included in DAL and if
>>>> yes, when ( i don't need exact date :) ). I can patch DAL to do it for
>>>> me on postgres now, but that's not solution for future and to say true,
>>>> I'm not happy with those solutions converting strings to decimals and
>>>> back etc. I think DECIMAL is standard type today and missing support in
>>>> sqlite should not be reason to stop implement it in DAL. If web2py aims
>>>> to be a real tool, then decimals are necessary. Noone makes real
>>>> projects on sqlite.
>>>> If I decide to stay with web2py, then I'd like to make this decision for
>>>> a bit longer term so I really need some info, coz i need to start
>>>> project :)
>>>> Michal
>>
> > 

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



[web2py:22736] Re: Decimals again

2009-05-27 Thread Michal Jursa

I know about trunk solution, but you've recently said you dont like to 
implement decimals at all. Or may be I miunderstood you..:)

You think it is fine to start with trunk version and one day it will 
become stable? Coz thats the only thing that really holds me back from 
using web2py in 'real' world..:)

Michal

mdipierro wrote:
> In trunk this is already implemented
> 
> http://groups.google.com/group/web2py/browse_thread/thread/13d9e9fd7334b679
> 
> But it is experimental.
> 
> If you really want a date for a stable Decimal API in DAL, I can Say
> July 31 but it may be done sooner.
> 
> Masssimo
> 
> On May 27, 6:53 am, Michal Jursa  wrote:
>> Hi,
>> I know there were a lot of posts about pros and cons of implementing
>> DECIMAL type to DAL, but there is no result. As DECIMALs are really
>> important for me, I'd like to know if it will be included in DAL and if
>> yes, when ( i don't need exact date :) ). I can patch DAL to do it for
>> me on postgres now, but that's not solution for future and to say true,
>> I'm not happy with those solutions converting strings to decimals and
>> back etc. I think DECIMAL is standard type today and missing support in
>> sqlite should not be reason to stop implement it in DAL. If web2py aims
>> to be a real tool, then decimals are necessary. Noone makes real
>> projects on sqlite.
>>
>> If I decide to stay with web2py, then I'd like to make this decision for
>> a bit longer term so I really need some info, coz i need to start
>> project :)
>>
>> Michal
> > 

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



[web2py:22725] Decimals again

2009-05-27 Thread Michal Jursa

Hi,
I know there were a lot of posts about pros and cons of implementing 
DECIMAL type to DAL, but there is no result. As DECIMALs are really 
important for me, I'd like to know if it will be included in DAL and if 
yes, when ( i don't need exact date :) ). I can patch DAL to do it for 
me on postgres now, but that's not solution for future and to say true, 
I'm not happy with those solutions converting strings to decimals and 
back etc. I think DECIMAL is standard type today and missing support in 
sqlite should not be reason to stop implement it in DAL. If web2py aims 
to be a real tool, then decimals are necessary. Noone makes real 
projects on sqlite.

If I decide to stay with web2py, then I'd like to make this decision for 
a bit longer term so I really need some info, coz i need to start 
project :)

Michal


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



[web2py:21357] Re: Table already exists problem [again]

2009-05-06 Thread Michal Jursa

Abbsolutely not, SHOW TABLES is MYSQL specific command. Postgres 
implements the same funcionality with SELECT * FROM 
pg_catalog.pg_tables, Oracle makes the same magic with SELECT TABLE_NAME 
FROM USER_TABLES etc etc...

Michal

mdipierro wrote:
> hmmm. This may be a good idea. Is SHOW standard SQL? I am not sure all
> backends support it.
> 
> 
> On May 6, 7:05 pm, TheDude  wrote:
>> Massimo, may I propose a solution here? It would require a lot of
>> work, but if it were done I think it'd destroy the competition of
>> other ORMs :P Anyways, have the ORM/DAL catch any errors presented
>> (not sure if this is possible with GAE). If it *does* catch an error,
>> see which number, have python look up what to do with tht number (e.g.
>> Is a table missing? A field? etc). then it will perform the necessary
>> query SHOW TABLES; SHOW FIELDS FROM [table]; etc. and then re-build
>> the .table file. So it'll constantly load locally until it finds an
>> error. Of course there should also be some kind of throttling
>> mechanism, where if it does see an error but can find a solution, then
>> it'll makr that in like a global.orm.table file so that the next time
>> the error is catched for the same table/field, it would execute any
>> SQL queries and it'll still submit the support ticket of course (may
>> be a support ticket for when DAL figures out the DB on its own as
>> well). I know I know, this is a very complicated system, but I mean,
>> if web2py can completely move the thought process of having to
>> constantly fight with the DB and the app, it would be an awesome
>> feature. :) I know that I'm just dreaming, but a boy can wish can't
>> hey? :'')
>>
>> On May 5, 4:10 pm, Yarko Tymciurak  wrote:
>>
>>> someone looked into this, tried some time back ... emulating the kinds of
>>> things that sqlalchamy does;  I think he had limited success; not sure I
>>> recall what the summary was.
>>> On Tue, May 5, 2009 at 2:50 PM, Hans >>> wrote:
 Symlinking the app/database folder would work in environments with up
 to one application server.
 Unfortunately also I don't know how to query the database table
 structure in all web2py supported databases. But, maybe, we have some
 experts for one or the other supported database on the forum and
 willing to contribute!?
 On May 5, 9:14 pm, mdipierro  wrote:
> I agree and it does not have to me. The current system does not limit
> that. It only limits the fact that one app should do migrations. If
> more than one app may do migrations just symlink the database folder.
> Massimo
> On May 5, 2:09 pm, Hans 
> wrote:
>> IMO one more thing to consider is that a database is not necessarily
>> exclusively owned by one application. I would even go further and say
>> default should be a database is NOT exclusively owned by one app and
>> also not by one framework.
>> Currently the problem arises if the .table files of one web2py app
>> (stored in app/database folder) get out of sync with the database.
>> To get the .table files of a web2py app out of sync with a central
>> database is easy. Just have a 2nd app create a table which is also
>> used by app #1. If app #1 does not set 'migrate=False', including
>> auth.define_table(migrate=False), this app will not work any more.
>> Same for app #3, #4, ... Those apps can also be non web2py apps which
>> automatically create non existing tables, like web2py does it by
>> default.
>> my 2 eurocents
>> Hans
>> I understand that throwing the default assumption 'the application
>> owns the database tab
>> On May 5, 6:13 pm, mdipierro  wrote:
>>> Yes or perhaps a repair.py script.
>>> Massimo
>>> On May 5, 10:24 am, Yarko Tymciurak  wrote:
 On Tue, May 5, 2009 at 9:25 AM, mdipierro 
 wrote:
 
> The only problems I can see would arise if:
> - You delete databases/*.table but the database is still there
> (updates do not cause this). Bad luck. One should not delete
 files, or
> at least make a backup.
 Maybe at some point we can address this w/ some mercurial checkin
 of such
 important files on a running system...
> > 


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



[web2py:20891] Re: Is this possible? How?

2009-04-30 Thread Michal Jursa

Well, you will definitely need javascript... :)
As i linked you before
http://www.w3schools.com/jsref/jsref_onunload.asp
that's the very begining of your solution.

M.

waTR napsal(a):
> Well, this is something that is not something that should require
> javascript. I am just looking to validate the page upon a link being
> clicked.
> 
> Lets say I have 3 menu items at the top of a page: Home, Add New, and
> Modify Current. Now lets say I am in the Modify Current page. I have
> made a few changes and now want to "Add New". However, I don't go and
> click on the "Save" button/link on the Modify Current page. I simply
> go and click on Add New. So I now need the page to understand that it
> still needs to update the DB with the values on the Modify Current
> page, even if no changes were made, before going to the "Add New"
> page.
> 
> In addition, how does one submit a form to web2py without using the
>  element. I want to just create a bunch of input spaces, and put
> a button somewhere at the top, or a link that should tell web2py to
> take the data from the input fields on that page and do something with
> them... How would that be done?
> 
> Cheers,
> 
> 
> 
> On Apr 30, 6:42 am, Jason Brower  wrote:
>> Look into jquery, it'll be easy. Have you used that before?
>>
>> On Thu, 2009-04-30 at 15:06 +0200, Michal Jursa wrote:
>>> http://www.w3schools.com/jsref/jsref_onunload.asp
>>> Jason Brower wrote:
>>>> Sounds like more of an html jquery thing.  What are you wanting to do in
>>>> particular?
>>>> Regards,
>>>> Jason
>>>> On Wed, 2009-04-29 at 21:41 -0700, waTR wrote:
>>>>> I have a form with a submit button. However, I need web2py to read the
>>>>> form and perform an action not only when the person clicks on the
>>>>> submit button, I also need it to perform the action when the user
>>>>> clicks on any other link on the page.
>>>>> How can I do this with web2py?
> > 


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



[web2py:20872] Re: Is this possible? How?

2009-04-30 Thread Michal Jursa

http://www.w3schools.com/jsref/jsref_onunload.asp

Jason Brower wrote:
> Sounds like more of an html jquery thing.  What are you wanting to do in
> particular?
> Regards,
> Jason
>
>
> On Wed, 2009-04-29 at 21:41 -0700, waTR wrote:
>   
>> I have a form with a submit button. However, I need web2py to read the
>> form and perform an action not only when the person clicks on the
>> submit button, I also need it to perform the action when the user
>> clicks on any other link on the page.
>>
>> How can I do this with web2py?
>> 
>
>
> >
>   

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



[web2py:20543] Re: psycopg2-2.0.10 install linux ,help me

2009-04-26 Thread Michal Jursa

Please report this to psycopg developers. I think there are mostly only 
psycopg users like me here and this has nothing to do with web2py.

Michal

wengfei2...@163.com wrote:
> I use python2.5 ,but the problem  exists then
> 
> [r...@localhost psycopg2-2.0.10]#  python setup.py install
> running install
> running build
> running build_py
> running build_ext
> Traceback (most recent call last):
>   File "setup.py", line 410, in 
> ext_modules=ext)
>   File "/usr/local/lib/python2.5/distutils/core.py", line 151, in
> setup
> dist.run_commands()
>   File "/usr/local/lib/python2.5/distutils/dist.py", line 974, in
> run_commands
> self.run_command(cmd)
>   File "/usr/local/lib/python2.5/distutils/dist.py", line 994, in
> run_command
> cmd_obj.run()
>   File "/usr/local/lib/python2.5/distutils/command/install.py", line
> 506, in run
> self.run_command('build')
>   File "/usr/local/lib/python2.5/distutils/cmd.py", line 333, in
> run_command
> self.distribution.run_command(command)
>   File "/usr/local/lib/python2.5/distutils/dist.py", line 994, in
> run_command
> cmd_obj.run()
>   File "/usr/local/lib/python2.5/distutils/command/build.py", line
> 112, in run
> self.run_command(cmd_name)
>   File "/usr/local/lib/python2.5/distutils/cmd.py", line 333, in
> run_command
> self.distribution.run_command(command)
>   File "/usr/local/lib/python2.5/distutils/dist.py", line 993, in
> run_command
> cmd_obj.ensure_finalized()
>   File "/usr/local/lib/python2.5/distutils/cmd.py", line 117, in
> ensure_finalized
> self.finalize_options()
>   File "setup.py", line 219, in finalize_options
> except(Warning, w):
> NameError: global name 'w' is not defined
> [r...@localhost psycopg2-2.0.10]# python -V
> Python 2.5.4
> 
> 
> 
> > 


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



[web2py:20240] Re: ENUM field

2009-04-22 Thread Michal Jursa

Just use:

SQLField('field_name', requires = IS_IN_SET(['val1', 'val2'])

Michal

Álvaro Justen [Turicas] wrote:
> Is there a way to create ENUM() fields in database or I have to create
> a string field and do some verification?
> 

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



[web2py:20242] Re: ENUM field

2009-04-22 Thread Michal Jursa

Validation is done by web2py and database field is string as you've 
said. This is so due to database compatibility i think. Not every 
database supported by web2py provides ENUM type.

Michal

Álvaro Justen [Turicas] wrote:
> On Wed, Apr 22, 2009 at 9:20 AM, Michal Jursa  wrote:
>> Just use:
>>
>> SQLField('field_name', requires = IS_IN_SET(['val1', 'val2'])
> 
> Ok, I'm doing this way, but my doubt is: how web2py will handle this?
> Will it be a 'string' field with validation made by web2py or will it
> be a ENUM() field (example, in MySQL)?
> 

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



[web2py:20168] Re: Compliments

2009-04-21 Thread Michal Jursa

SO SAY WE ALL!!! :

Michal

Pynthon wrote:
> Hello
> 
> Im Pynthon and I'm 14 years old, sorry for my bad English but I come
> from Holland. However, I started to learn Python 2/3 weeks ago for
> Django. When I started Django I had a lot of problems. Then I saw Grok
> some of the people said that hosting is a big problem so they
> recommend me Web2Py. First I was a little bit scared because I need to
> buy a book. I was scared that web2py was nothing and then I lost my 12
> dollar :P. However, I saw some free eBooks like the cutted version of
> the book. I was reading it and Web2Py is so simple! In Django I always
> was frustrated but in W2P everything is so amazing! I think that I'm
> gonne buy the real book this friday! I also saw that W2P is easy to
> install on hosts. Anyways, thanks for this fantastic framework! I did
> not use it yet but when I'm thinking about it I exactly know how to
> create my site with it!
> 
> Good job, goob job!
> 
> Pynthon
> 
> 
> > 

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



[web2py:20071] Re: Color picker?

2009-04-20 Thread Michal Jursa

In my point of view, this has nothing to do with web2py. Just use google 
and find free js color picker like:

http://www.mattkruse.com/javascript/colorpicker/
http://www.free-color-picker.com/color-picker-samples.php
etc, etc... 


Michal

weheh wrote:
> Is there a color picker that could be easily invoked to dump an RGB
> value into a field for me, just like the calendar tool that works with
> datetime fields?
> > 

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



[web2py:19934] Re: Host name in routes.py

2009-04-17 Thread Michal Jursa

Oh, i see, I misunderstood that part of route .. My fault, sorry...

Michal

mdipierro wrote:
> There is no port number in routes in because it would not make sense.
> If the server got the request the port matched already.
> 
> Massimo
> 
> On Apr 17, 6:10 am, Michal Jursa  wrote:
>> Correct me if i'm wrong, but port numbers are usually nubers so this
>> regexp cannot match i think as you have [a-z]+ after : in url. Isn't
>> this your trouble?
>>
>> routes_in = ('^.*?:https?://localhost:[a-z]+/$','/my_app/default/index'), )
>>
>> Michal
>>
>> Mladen Milankovic wrote:
>>> Hi.
>>> I'm testing things out and I think got a bug.
>>> I'm trying to get root on localhost to show /my_app/default/index page and 
>>> not
>>> the example, so I wrote:
>>> routes_in = (('^.*?:https?://localhost:[a-z]+ /$', 
>>> '/my_app/default/index'), )
>>> It didn't work, and I throw in some logging. I watched what will be the key
>>> before it's converted to regex. It gave:
>>> ^.*?:https?:https?://[^:/]+:[a-z]+ //localhost:[a-z]+ /$
>>> Problem is in
>>> line 45, in rewrite.py
>>> if k.find(':/') > 0:
>>> This line is determining if the definition is in the old format:
>>> '.*:/favicon.ico'.
>>> Problem is that in the new definition :/ can be found again, but it has a
>>> different meaning.
>>> It can be done in many different ways. I used this one:
>>> if k.find(':/') > 0 and not k.find('://'):
>>> This way it will match only the old definition and skip the new one.
>>> regards
>>> mmlado
>>> On Thursday 16 April 2009 19:57:47 mdipierro wrote:
>>>> A request comes in and you want to redirect it to a controller action
>>>> filtering by
>>>> - IP of client (for example 127.0.0.1)
>>>> - requested protocol (for example http or http "(http|https)""
>>>> - requested hostname (for examplewww.web2py.com)
>>>> - type of request (for example get or post "(get|post)")
>>>> - requested URL (for example "/test")
>>>> You would capture it with
>>>>   "^[client]:[protocol]://[hostname]:[method] [url]$"
>>>> in the example
>>>>   "^127.0.0.1:(http|https)://www.web2py.com:(get|post) /test"
>>>> Now you can map this into for example "/welcome/default/index" with
>>>> routes.py
>>>>   routes_in=(("^127.0.0.1:(http|https)://www.web2py.com:(get|post) /
>>>> test", "/welcome/default/index"),)
>>>> I can see writing an entire book in this only.
>>>> Can you figure out what this does?
>>>>   routes_in=(("^127.0.0.1:$a://www.web2py.com:(get|post) /test/$b", "/
>>>> welcome/default/$b?method=$a"),)
>>>> and this?
>>>>   routes_in=(("^127.0.0.1:$a://www.web2py.com:(get|post) /test/(?
>>>> P.*)", "/welcome/default/$b?method=$a"),)
>>>> I know it is ugly but 1) it works; 2) it very powerful when compared
>>>> with routes on rails and urls in Django; 3) is is backward compatible.
>>>> Does not anybody remember that I never wanted to add this to web2py?
>>>> Now you know why.
>>>> Massimo
> > 

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



[web2py:19930] Re: Host name in routes.py

2009-04-17 Thread Michal Jursa

Correct me if i'm wrong, but port numbers are usually nubers so this 
regexp cannot match i think as you have [a-z]+ after : in url. Isn't 
this your trouble?

routes_in = ('^.*?:https?://localhost:[a-z]+/$','/my_app/default/index'), )

Michal

Mladen Milankovic wrote:
> Hi.
> 
> I'm testing things out and I think got a bug.
> 
> I'm trying to get root on localhost to show /my_app/default/index page and 
> not 
> the example, so I wrote:
> 
> routes_in = (('^.*?:https?://localhost:[a-z]+ /$', '/my_app/default/index'), )
> 
> It didn't work, and I throw in some logging. I watched what will be the key 
> before it's converted to regex. It gave:
> ^.*?:https?:https?://[^:/]+:[a-z]+ //localhost:[a-z]+ /$
> 
> Problem is in 
> line 45, in rewrite.py
> 
> if k.find(':/') > 0:
> 
> This line is determining if the definition is in the old format: 
> '.*:/favicon.ico'.
> Problem is that in the new definition :/ can be found again, but it has a 
> different meaning.
> 
> It can be done in many different ways. I used this one:
> 
> if k.find(':/') > 0 and not k.find('://'):
> 
> This way it will match only the old definition and skip the new one.
> 
> regards
> mmlado
> 
> On Thursday 16 April 2009 19:57:47 mdipierro wrote:
>> A request comes in and you want to redirect it to a controller action
>> filtering by
>> - IP of client (for example 127.0.0.1)
>> - requested protocol (for example http or http "(http|https)""
>> - requested hostname (for example www.web2py.com)
>> - type of request (for example get or post "(get|post)")
>> - requested URL (for example "/test")
>>
>> You would capture it with
>>
>>   "^[client]:[protocol]://[hostname]:[method] [url]$"
>>
>> in the example
>>
>>   "^127.0.0.1:(http|https)://www.web2py.com:(get|post) /test"
>>
>> Now you can map this into for example "/welcome/default/index" with
>> routes.py
>>
>>   routes_in=(("^127.0.0.1:(http|https)://www.web2py.com:(get|post) /
>> test", "/welcome/default/index"),)
>>
>> I can see writing an entire book in this only.
>> Can you figure out what this does?
>>
>>   routes_in=(("^127.0.0.1:$a://www.web2py.com:(get|post) /test/$b", "/
>> welcome/default/$b?method=$a"),)
>>
>> and this?
>>
>>   routes_in=(("^127.0.0.1:$a://www.web2py.com:(get|post) /test/(?
>> P.*)", "/welcome/default/$b?method=$a"),)
>>
>> I know it is ugly but 1) it works; 2) it very powerful when compared
>> with routes on rails and urls in Django; 3) is is backward compatible.
>>
>> Does not anybody remember that I never wanted to add this to web2py?
>> Now you know why.
>>
>> Massimo
>>
> 
> 
> 
> > 

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



[web2py:19883] Hidden 'root' controller

2009-04-16 Thread Michal Jursa

Is is possible to make somethink like:

http://my_site/my_page ??

Where 'my_page' will be already request.args[0] for some controller? 
Trying to figure this, but no luck. Further i'd like to redirect to 
another controller if 'my_page' doesn't exist, but this i can solve i 
think.

Michal

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



[web2py:19859] Re: redirect and response.flash

2009-04-16 Thread Michal Jursa

Didn't test it, but i think response.flash will be lost with redirect(), 
but session.flash should be fine and pass everything. So if you need 
redirect, use session.flash then. All you have to do is handle the 
removal of session.flash after the redirect.

Michal

mdipierro wrote:
> I think that storing messages in the database is overkill and storing
> them in cookies is unsafe (unless we encrypt cookies and that is also
> overkill) and would not work when cookies are off.
> 
> What is so bad about the current way of doing it?
> 
> Massimo
> 
> On Apr 15, 10:21 pm, Italo Maia  wrote:
>> In django, they use a messaging system based in the database, and
>> relate messages from the user with his session. When the message is
>> fetched to the user, it is then removed immediatly. That makes it
>> possible for redirects to show messages for an user after a redirect,
>> tought it does not work for non-authenticated users. Maybe if you
>> could relate messages in the database to the user ip if he is not
>> logged, and to his session, if he is logged...that could do the
>> trick.
>>
>> For what i understand, you can't flash messages to an user after a
>> redirect because the flash message get's stored in the response for
>> the original request. After a redirect, a new request is made, and a
>> new response is created, so, the application has no way to remember
>> that a flash message was generated.
>>
>> Another way to store "flash" messages could be storing them in a
>> cookie before the redirect, and erase them after reading them.
>> Probably not a safe choice for some systems, and if cookies is turned
>> off in the browser, the messages would get lost.
>>
>> There's one more way that i can think of. You could, in the redirect,
>> specify a GET parameter like: &message_status=1. That could do the
>> trick, nice and dirty, tough you would have to filter messages
>> depending on user previlegies or something.
>>
>> On 15 abr, 21:07, mdipierro  wrote:
>>
>>> Because I cannot find a way to make it work. I do not believe it is
>>> possible. I may be wrong and if you find a way send me a patch.
>>> Massimo
>>> On Apr 15, 6:38 pm, ceej  wrote:
 Is there a reason response.flash doesn't work with redirect('/') ?
> > 


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



[web2py:19656] Re: Can't seem my web apps from other computers on the network.

2009-04-13 Thread Michal Jursa

By default web2py application binds only to local loopback device, so it 
is accessible only from local machine. Use -i 0.0.0.0 when starting 
application and it will be accessible on every network device in your 
computer.

Michal

Jason Brower wrote:
> I try to use my IP addy from another computer on the same network but it
> doesn't show up.
> Is there a setting somewhere that I need to change to make it accessable
> from outside the network?
> (I need it for browser testing.)
> Best Regards,
> Jason Brower
> 
> 
> 
> > 


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



[web2py:19655] Re: how to do autoindex for directories & serve static html files

2009-04-13 Thread Michal Jursa

I'd say, if you just need to serve direcotry indexes and static files, 
use separate http server for that part and not application server.

Michal

Yarko Tymciurak wrote:
> Note:  If you serve static files like this, you will run into 
> (potentially) one problem:
> 
> If (as is common) a link to someplace in the static place _assumes_ 
>  index.htm or index.html, and the link is only to a directory, it will 
> not work on web2py (it will work probably everyplace else in the web world).
> 
> We should fix this.
> 
> On Wed, Apr 8, 2009 at 10:27 AM, Timmie  > wrote:
> 
> 
>  > You can put your files in static and they will all be exposed.
>  >
>  > You can also create an action like
>  >
>  > def static_content():
>  >  import os
>  >  files=os.listdir(os.path.join(request.folder,'static'))
>  >  return HTML(BODY(*[TR(TD(A(f),_href=URL
>  > (r=request,c='static',f=f for f in files]))
>  >
>  > to list the content of the static folder.
> Thank you for this explanation!
> I will try this out.
> 
> 
> 
> > 


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



[web2py:19527] Re: Stability

2009-04-09 Thread Michal Jursa

Finally I placed my web2py application in inittab and init now watches 
it so if it crashes it is automatically respawned. Thats workaround but 
everything else failed..:(

Michal

Michal Jursa wrote:
> and bad news again...   Few minutes after optimistic mail Segmentation 
> fault came again... :( So 2.0.9. runs better, lasts longer, but crashes 
> too.
> 
> Anyone can tell me how to trace it? I'd like to send bug report to 
> psycopg developers?
> 
> Michal
> 
> Michal Jursa wrote:
>> Good news!
>>
>> psycopg2 2.0.9 up and running and looks stable. So upgrade from 2.0.7 to 
>> 2.0.9 solved the trouble i hope. Pfew..:) Just have to build my deb 
>> package for production use. 2.0.9 is already accepted in 'testing' 
>> branch but it sometimes takes months to get to 'stable'.
>>
>> Michal
>>
>> Michal Jursa wrote:
>>> Just some progress info..
>>>
>>> On my IBM notebook in same but 32bit environment looks everything stable 
>>> and fine with psycopg2 2.0.9. Will try 64bit version soon and will 
>>> report results. I just hope the bug was fixed in this minor version update.
>>>
>>> Michal
>>>
> 
> 
> > 


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



[web2py:19524] Re: Stability

2009-04-09 Thread Michal Jursa

and bad news again...   Few minutes after optimistic mail Segmentation 
fault came again... :( So 2.0.9. runs better, lasts longer, but crashes 
too.

Anyone can tell me how to trace it? I'd like to send bug report to 
psycopg developers?

Michal

Michal Jursa wrote:
> Good news!
> 
> psycopg2 2.0.9 up and running and looks stable. So upgrade from 2.0.7 to 
> 2.0.9 solved the trouble i hope. Pfew..:) Just have to build my deb 
> package for production use. 2.0.9 is already accepted in 'testing' 
> branch but it sometimes takes months to get to 'stable'.
> 
> Michal
> 
> Michal Jursa wrote:
>> Just some progress info..
>>
>> On my IBM notebook in same but 32bit environment looks everything stable 
>> and fine with psycopg2 2.0.9. Will try 64bit version soon and will 
>> report results. I just hope the bug was fixed in this minor version update.
>>
>> Michal
>>
> 
> > 


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



[web2py:19521] Re: Stability

2009-04-09 Thread Michal Jursa

Good news!

psycopg2 2.0.9 up and running and looks stable. So upgrade from 2.0.7 to 
2.0.9 solved the trouble i hope. Pfew..:) Just have to build my deb 
package for production use. 2.0.9 is already accepted in 'testing' 
branch but it sometimes takes months to get to 'stable'.

Michal

Michal Jursa wrote:
> Just some progress info..
> 
> On my IBM notebook in same but 32bit environment looks everything stable 
> and fine with psycopg2 2.0.9. Will try 64bit version soon and will 
> report results. I just hope the bug was fixed in this minor version update.
> 
> Michal
> 

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



[web2py:19518] Re: Stability

2009-04-09 Thread Michal Jursa

Just some progress info..

On my IBM notebook in same but 32bit environment looks everything stable 
and fine with psycopg2 2.0.9. Will try 64bit version soon and will 
report results. I just hope the bug was fixed in this minor version update.

Michal

Michal Jursa wrote:
> I used default Debian lenny version of psycopg 2.0.7-4  and read some 
> information about fixind something aroud 64bit stability in 2.0.8 and 
> 2.0.9 changelog, so will give it a try to install last psycopg from 
> sources and we will see...  Strange thing is i never had a trouble with 
> psycopg before, but i used Apache/mod_python so may be i missed some 
> occasional crashes which beacme fatal with web2py, coz it is not 
> relaunched automatically :)
> 
> Michal
> 
> 
> mdipierro wrote:
>> this is bad.
>>
>> On Apr 9, 4:00 am, Michal Jursa  wrote:
>>> Well,
>>> Step 4:
>>> stressing that little application on mysql as much as my CPU can, but no
>>> problem, no segfaults, just running and running
>>>
>>> I really like postgres and never had troubles before, but this is a
>>> trouble for me and i probably will have to consider database change. I
>>> think this is 64bit problem only but all my new servers are 64bit.
>>>
>>> Michal
>>>
>>> Michal Jursa wrote:
>>>
>>>> Going to stress this on mysql.
>>>> Michal
>>>> mdipierro wrote:
>>>>> This is the first time I hear about it. A bug in your app should not
>>>>> cause web2py to crash.
>>>>> is this related to traffic?
>>>>> What if you just run welcome?
>>>>> What if you just run welcome and establish connections to DB via
>>>>> psycopg2?
>>>>> I think it is necessary to isolate the cause of these crashes.
>>>>> Make sure you are running 1.60.
>>>>> Massimo
>>>>> On Apr 8, 7:00 pm, Michal Jursa  wrote:
>>>>>> Hi,
>>>>>> i finished my very first application done with web2py and i have a
>>>>>> little problem. I use it on Debian 64bit, python 2.5 with psycopg2 and
>>>>>> sometimes the application crashes without a word. As I publish this via
>>>>>> reverse proxy, then crash of the application means web service is down.
>>>>>> I will have to deploy my application via mod_python wrapper coz then new
>>>>>> service is started automatically i guess. But is there any stability
>>>>>> problem or is there something wrong in my application. I found there is
>>>>>> some trouble with psycopg2, but nothing exact.  Any idea?
>>>>>> Michal
> 
> > 

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



[web2py:19509] Re: Stability

2009-04-09 Thread Michal Jursa

I used default Debian lenny version of psycopg 2.0.7-4  and read some 
information about fixind something aroud 64bit stability in 2.0.8 and 
2.0.9 changelog, so will give it a try to install last psycopg from 
sources and we will see...  Strange thing is i never had a trouble with 
psycopg before, but i used Apache/mod_python so may be i missed some 
occasional crashes which beacme fatal with web2py, coz it is not 
relaunched automatically :)

Michal


mdipierro wrote:
> this is bad.
> 
> On Apr 9, 4:00 am, Michal Jursa  wrote:
>> Well,
>> Step 4:
>> stressing that little application on mysql as much as my CPU can, but no
>> problem, no segfaults, just running and running
>>
>> I really like postgres and never had troubles before, but this is a
>> trouble for me and i probably will have to consider database change. I
>> think this is 64bit problem only but all my new servers are 64bit.
>>
>> Michal
>>
>> Michal Jursa wrote:
>>
>>> Going to stress this on mysql.
>>> Michal
>>> mdipierro wrote:
>>>> This is the first time I hear about it. A bug in your app should not
>>>> cause web2py to crash.
>>>> is this related to traffic?
>>>> What if you just run welcome?
>>>> What if you just run welcome and establish connections to DB via
>>>> psycopg2?
>>>> I think it is necessary to isolate the cause of these crashes.
>>>> Make sure you are running 1.60.
>>>> Massimo
>>>> On Apr 8, 7:00 pm, Michal Jursa  wrote:
>>>>> Hi,
>>>>> i finished my very first application done with web2py and i have a
>>>>> little problem. I use it on Debian 64bit, python 2.5 with psycopg2 and
>>>>> sometimes the application crashes without a word. As I publish this via
>>>>> reverse proxy, then crash of the application means web service is down.
>>>>> I will have to deploy my application via mod_python wrapper coz then new
>>>>> service is started automatically i guess. But is there any stability
>>>>> problem or is there something wrong in my application. I found there is
>>>>> some trouble with psycopg2, but nothing exact.  Any idea?
>>>>> Michal
> > 

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



[web2py:19492] Re: Stability

2009-04-09 Thread Michal Jursa

Well,
Step 4:
stressing that little application on mysql as much as my CPU can, but no 
problem, no segfaults, just running and running

I really like postgres and never had troubles before, but this is a 
trouble for me and i probably will have to consider database change. I 
think this is 64bit problem only but all my new servers are 64bit.

Michal

Michal Jursa wrote:
> 
> Going to stress this on mysql.
> 
> Michal
> 
> mdipierro wrote:
>> This is the first time I hear about it. A bug in your app should not
>> cause web2py to crash.
>>
>> is this related to traffic?
>>
>> What if you just run welcome?
>>
>> What if you just run welcome and establish connections to DB via
>> psycopg2?
>>
>> I think it is necessary to isolate the cause of these crashes.
>>
>> Make sure you are running 1.60.
>>
>> Massimo
>>
>> On Apr 8, 7:00 pm, Michal Jursa  wrote:
>>> Hi,
>>> i finished my very first application done with web2py and i have a
>>> little problem. I use it on Debian 64bit, python 2.5 with psycopg2 and
>>> sometimes the application crashes without a word. As I publish this via
>>> reverse proxy, then crash of the application means web service is down.
>>> I will have to deploy my application via mod_python wrapper coz then new
>>> service is started automatically i guess. But is there any stability
>>> problem or is there something wrong in my application. I found there is
>>> some trouble with psycopg2, but nothing exact.  Any idea?
>>>
>>> Michal
>>>
> 
> 
> > 


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



[web2py:19490] Re: Stability

2009-04-09 Thread Michal Jursa

Step 1:
Simple welcome application works fine, and works fine even under heavy 
load.

Step 2:
Now tried to stress my application under 1.60 and the result is:
---8<-cut-here--
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2009
Version 1.60 (2009-04-08 12:50:44)
Database drivers available: SQLite3, MySQL, Postgre
choose a password:koko
please visit:
http://127.0.0.1:8000
use "kill -SIGTERM 4494" to shutdown the web2py server
Segmentation fault
---8<-cut-here--


Step 3:
Then i created a tiny little test app:
-/models/db.py---8<-cut-here
db = SQLDB('postgres://mole:x...@localhost/mole')
session.connect(request, response, db=db)

db.define_table('my_test_table',
   SQLField('field_str', length=256),
   SQLField('field_bool', 'boolean'),
   SQLField('field_int', 'integer'),
   SQLField('field_text','text'))
---8<-cut-here--

and a simple controller:
-/controllers/default.py---8<-cut-here--
def index():
 db.my_test_table.insert( field_str = "some blah blah",
  field_bool = True,
  field_int = 123456,
  field_text = "some longer blah blah")

 db().select(db.my_test_table.ALL)
 count = db(db.my_test_table.id>0).count()

 response.flash = T('Welcome to web2py')

 return dict(count = count , message=T('Hello World'))
---8<-cut-here--

Well and i stressed this application puppy and segmantation falut came 
again, so not surely, but i can say psycopg2 driver has some problem.

Going to stress this on mysql.

Michal

mdipierro wrote:
> This is the first time I hear about it. A bug in your app should not
> cause web2py to crash.
> 
> is this related to traffic?
> 
> What if you just run welcome?
> 
> What if you just run welcome and establish connections to DB via
> psycopg2?
> 
> I think it is necessary to isolate the cause of these crashes.
> 
> Make sure you are running 1.60.
> 
> Massimo
> 
> On Apr 8, 7:00 pm, Michal Jursa  wrote:
>> Hi,
>> i finished my very first application done with web2py and i have a
>> little problem. I use it on Debian 64bit, python 2.5 with psycopg2 and
>> sometimes the application crashes without a word. As I publish this via
>> reverse proxy, then crash of the application means web service is down.
>> I will have to deploy my application via mod_python wrapper coz then new
>> service is started automatically i guess. But is there any stability
>> problem or is there something wrong in my application. I found there is
>> some trouble with psycopg2, but nothing exact.  Any idea?
>>
>> Michal
> > 


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



[web2py:19474] Stability

2009-04-08 Thread Michal Jursa

Hi,
i finished my very first application done with web2py and i have a 
little problem. I use it on Debian 64bit, python 2.5 with psycopg2 and 
sometimes the application crashes without a word. As I publish this via 
reverse proxy, then crash of the application means web service is down. 
I will have to deploy my application via mod_python wrapper coz then new 
service is started automatically i guess. But is there any stability 
problem or is there something wrong in my application. I found there is 
some trouble with psycopg2, but nothing exact.  Any idea?

Michal

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



[web2py:19382] Re: make validator ignore empty string

2009-04-07 Thread Michal Jursa

Whops, sorry, didn't know that, won't do it any more.

Michal

AchipA wrote:
> 
> Discussion subject changed to "make validator ignore empty string" by
> Michal Jursa
> 
> You probably sent your message as a reply to an existing, instead of a
> typing a 'new' message. When you reply, the thread-id remains, so it
> will look funny (=harder to track) for people using threaded mail
> readers or those who follow the group through the web interface.
> 
> On Apr 7, 4:29 pm, Michal Jursa  wrote:
>> What? What have i done wrong?
>>
>> Michal
>>
>> DenesL wrote:
>>> @Michal,
>>> tsk... tsk... bad etiquette... hijacking other people's posts.
>>> You can always open a new post with your issue.
>>> On Apr 7, 9:47 am, Michal Jursa  wrote:
>>>> Hi,
>>>> i need to make a validation like 'nothing or email', but IS_EMAIL is
>>>> always complaining even on empty string. How to combine required
>>>> validators to do this EMPTY or EMAIL ?
>>>> Michal alias Plysak
> > 

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



[web2py:19380] Re: make validator ignore empty string

2009-04-07 Thread Michal Jursa

What? What have i done wrong?

Michal

DenesL wrote:
> @Michal,
> tsk... tsk... bad etiquette... hijacking other people's posts.
> You can always open a new post with your issue.
> 
> 
> On Apr 7, 9:47 am, Michal Jursa  wrote:
>> Hi,
>> i need to make a validation like 'nothing or email', but IS_EMAIL is
>> always complaining even on empty string. How to combine required
>> validators to do this EMPTY or EMAIL ?
>>
>> Michal alias Plysak
> > 

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



[web2py:19373] Re: make validator ignore empty string

2009-04-07 Thread Michal Jursa

ahh, thanks massimo i somehow missed this...

Michal alias Plysak

mdipierro wrote:
> IS_NULL_OR(IS_EMAIL())
> 
> On Apr 7, 8:47 am, Michal Jursa  wrote:
>> Hi,
>> i need to make a validation like 'nothing or email', but IS_EMAIL is
>> always complaining even on empty string. How to combine required
>> validators to do this EMPTY or EMAIL ?
>>
>> Michal alias Plysak
> > 

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



[web2py:19368] make validator ignore empty string

2009-04-07 Thread Michal Jursa

Hi,
i need to make a validation like 'nothing or email', but IS_EMAIL is 
always complaining even on empty string. How to combine required 
validators to do this EMPTY or EMAIL ?

Michal alias Plysak

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



[web2py:19340] Re: The official Web2py Book by Massimo....for free?

2009-04-06 Thread Michal Jursa

HEY PEOPLE!
Stop blaming Massimo for nonfree book!

He wrote the book, he is owner of all rights, copyrights etc. and it is 
absolutely on him if he will or will not let it go for free. He 
explained so many times it is not his job to sell the book but he has 
some reasons to do that and it is not only on him. Accept it or not, but 
let Massimo live and breath. He is doing GREAT job, spends a lot of time 
with you all, working on web2py, answering questions, fixing bugs etc 
etc. So stop blaming him for that silly 'problem' you can solve for $10. 
If you are really seriously interested in web2py then this is not price 
to stop you. I bought the book and i'm absolutely happy with it and i 
know i'm not alone.

Michal alias Plysak

Baron wrote:
>> you should know, that I have
>> contacted many publishers and I have been unable to find a publisher
>> that would allow me to publish the book and also allow me to release
>> it for free.
> 
> Massimo I'm confused. You say you were trying to find a publisher that
> would allow you to give away the soft copy (I assume then that
> arrangement still satisfies your academic requirements). But when I
> suggested that same arrangement you got quite defensive...
> 
> Did you approach Apress? The online Django book was published by
> Apress.
> 
> Baron
> 
> 
> On Apr 6, 3:22 pm, mdipierro  wrote:
>> First of all this question pops up almost weekly and I have responded
>> many times. Anyway, I am going to respond once more, but please first
>> ask yourself:
>>
>> How do you earn your leaving? Why don't you work for free?
>>
>> I do not make money from the book (just enough to pay for web2py
>> expenses, like the web2py pycon hats) but I make money as a professor
>> (in order to pay my mortgage and feed my family). In my job I get
>> evaluated yearly for my publications not for the open source code I
>> write. The printed book counts as a publication and partially accounts
>> for the time I spend on web2py.  Moreover a printed book gives web2py
>> a certain weight among professionals (who understands that not
>> everything comes for free). Finally, you should know, that I have
>> contacted many publishers and I have been unable to find a publisher
>> that would allow me to publish the book and also allow me to release
>> it for free. This is not a book written by the community and there are
>> books on Django, Rails, TG, etc, that do not have a free online
>> version. The creators of Django make money from software development
>> and consulting. For them the book is publicity.
>>
>> I find very odd that you ask me to justify why not everything I do is
>> free. I guess I could change the business model, give the book for
>> free, quit my job and charge you to answer your questions about
>> web2py.
>>
>> Massimo
>>
>> On Apr 5, 6:54 pm, Baron  wrote:
>>
 Massimo you should place some really deep and exact explanation about
>>> the book status and reasons why it is not free to the website..:)
>>> agreed - why does Massimo never weigh in on these threads?
> > 


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



[web2py:19327] Re: Uploads in subdirs

2009-04-06 Thread Michal Jursa

I do this by symlinks to 'static' directory and i understand this is not 
easy coz it is hard to find out what is controller and what is parameter 
etc... Finally the static workaround is not bad.

Michal alias Plysak

mdipierro wrote:
> There is not an easy way to do this. You can move the file after
> uploads but this can break downloads. Perhaps the best way is to build
> symlinks after upload.
> 
> On Apr 6, 4:39 pm, Michal Jursa  wrote:
>> Hi,
>> may be i'm missing something but is there a possibility to manage
>> uploads in subdirs? I'd like to organize the uploads a bit :)
>>
>> Michal alias Plysak
> > 


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



[web2py:19321] Uploads in subdirs

2009-04-06 Thread Michal Jursa

Hi,
may be i'm missing something but is there a possibility to manage 
uploads in subdirs? I'd like to organize the uploads a bit :)

Michal alias Plysak

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



[web2py:19160] Re: Sub query not registering accurately?

2009-04-05 Thread Michal Jursa

Repost from IRC conversation:

16:27:47  basically im getting a list of topics with a specific 
board_id
16:28:06  within the same query, I'm trying to retrieve the 
latest reply to each topic

Michal alias Plysak

mdipierro wrote:
> It is very hard for me (and everybody) to debug this without having a
> copy of the model and without understanding what this is supposed to
> do. Could you explain what you are trying to do?
> 
> Is the querly below in SQL the one that "you are trying to perform" or
> the one that you are actually performing and does not work?
> Is it the output of db(...)._select()?
> 
> Massimo
> 
> 
> 
> On Apr 5, 10:47 am, TheDude  wrote:
>> Thanks guys :) It's been really bogging down my productivity within
>> the website, but here is the query that I am trying to perform..
>>
>> SELECT mb_posts.id, mb_posts.title, mb_posts.message,
>> mb_posts.posted_by, mb_posts.date_posted, mb_posts.locked,
>> mb_posts.sticky, mb_posts.last_edited, mb_posts.board_id,
>> mb_posts.reply_to, mb_posts.views, auth_user.id, auth_user.first_name,
>> auth_user.last_name, auth_user.email, auth_user.password,
>> auth_user.registration_key, COUNT(mb_posts2.id), (SELECT mb_posts.id
>> FROM mb_posts AS mb_posts3 WHERE mb_posts3.reply_to=mb_posts.id ORDER
>> BY
>> mb_posts3.id DESC LIMIT 1) FROM mb_posts LEFT JOIN
>> auth_user ON auth_user.id=mb_posts.posted_by LEFT JOIN mb_posts AS
>> mb_posts2 ON mb_posts2.reply_to=mb_posts.id WHERE (mb_posts.board_id=1
>> AND mb_posts.reply_to IS NULL) GROUP BY mb_posts.id
>>
>> Hope that makes a bit more sense. :) Everything in the qery works fine
>> except for mb_posts3 info. I'm trying to select the latest reply
>> created to that thread.
>>
>> On Apr 5, 11:26 am, Michal Jursa  wrote:
>>
>>> I already tried that removement of the semicolon directly in the query
>>> and that still doesn't work. To say true i cannot get the sense of the
>>> query so i cannot clearly debug it coz i never used subselects in field
>>> list.
>>> Michal alias Plysak
>>> mdipierro wrote:
>>>> I see the problem.
>>>> The structure of that query is
>>>> db().select(...,db(...)._select(...),...) # wrong
>>>> The DAL is not designed to do this because it is not a good idea (as
>>>> Michal points out). You may be able to do it anyway
>>>> db().select(...,db(...)._select(...)[:-1],...) # wrong?
>>>> But it may still not work. nested selects should go in the query, not
>>>> in the list of fields to be selected. You may need to refactor your
>>>> select. Perhaps if you explain in words what you are trying to select
>>>> we can help more.
>>>> Massimo
>>>> On Apr 5, 9:27 am, Michal Jursa  wrote:
>>>>> I'm getting interested in this, coz that query is strange, but what that
>>>>> DAL call generates is:
>>>>> SELECT mb_posts.id, mb_posts.title, mb_posts.message,
>>>>> mb_posts.posted_by, mb_posts.date_posted, mb_posts.locked,
>>>>> mb_posts.sticky, mb_posts.last_edited, mb_posts.board_id,
>>>>> mb_posts.reply_to, mb_posts.views, auth_user.id, auth_user.first_name,
>>>>> auth_user.last_name, auth_user.email, auth_user.password,
>>>>> auth_user.registration_key, COUNT(mb_posts2.id), SELECT mb_posts3.id
>>>>> FROM mb_posts3, mb_posts WHERE mb_posts3.reply_to=mb_posts.id ORDER BY
>>>>> mb_posts3.id DESC LIMIT 1 OFFSET 0; FROM mb_posts, mb_posts3 LEFT JOIN
>>>>> auth_user ON auth_user.id=mb_posts.posted_by LEFT JOIN mb_posts AS
>>>>> mb_posts2 ON mb_posts2.reply_to=mb_posts.id WHERE (mb_posts.board_id=1
>>>>> AND mb_posts.reply_to IS NULL) GROUP BY mb_posts.id
>>>>> So the first thing is there is a ';' sighn after OFFSET statement in the
>>>>> middle of query and the second thing is that this is not the way
>>>>> subselects are supposed to be used. Try to examine it further, i'm
>>>>> getting a bit lost in it. I think it is terribly complicated for the
>>>>> functionality it should provide.
>>>>> Plysak
> > 


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



[web2py:19154] Re: Sub query not registering accurately?

2009-04-05 Thread Michal Jursa

I already tried that removement of the semicolon directly in the query 
and that still doesn't work. To say true i cannot get the sense of the 
query so i cannot clearly debug it coz i never used subselects in field 
list.

Michal alias Plysak

mdipierro wrote:
> I see the problem.
> 
> The structure of that query is
> 
> db().select(...,db(...)._select(...),...) # wrong
> 
> The DAL is not designed to do this because it is not a good idea (as
> Michal points out). You may be able to do it anyway
> 
> db().select(...,db(...)._select(...)[:-1],...) # wrong?
> 
> But it may still not work. nested selects should go in the query, not
> in the list of fields to be selected. You may need to refactor your
> select. Perhaps if you explain in words what you are trying to select
> we can help more.
> 
> Massimo
> 
> 
> On Apr 5, 9:27 am, Michal Jursa  wrote:
>> I'm getting interested in this, coz that query is strange, but what that
>> DAL call generates is:
>>
>> SELECT mb_posts.id, mb_posts.title, mb_posts.message,
>> mb_posts.posted_by, mb_posts.date_posted, mb_posts.locked,
>> mb_posts.sticky, mb_posts.last_edited, mb_posts.board_id,
>> mb_posts.reply_to, mb_posts.views, auth_user.id, auth_user.first_name,
>> auth_user.last_name, auth_user.email, auth_user.password,
>> auth_user.registration_key, COUNT(mb_posts2.id), SELECT mb_posts3.id
>> FROM mb_posts3, mb_posts WHERE mb_posts3.reply_to=mb_posts.id ORDER BY
>> mb_posts3.id DESC LIMIT 1 OFFSET 0; FROM mb_posts, mb_posts3 LEFT JOIN
>> auth_user ON auth_user.id=mb_posts.posted_by LEFT JOIN mb_posts AS
>> mb_posts2 ON mb_posts2.reply_to=mb_posts.id WHERE (mb_posts.board_id=1
>> AND mb_posts.reply_to IS NULL) GROUP BY mb_posts.id
>>
>> So the first thing is there is a ';' sighn after OFFSET statement in the
>> middle of query and the second thing is that this is not the way
>> subselects are supposed to be used. Try to examine it further, i'm
>> getting a bit lost in it. I think it is terribly complicated for the
>> functionality it should provide.
>>
>> Plysak
> > 


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



[web2py:19146] Re: Sub query not registering accurately?

2009-04-05 Thread Michal Jursa

I'm getting interested in this, coz that query is strange, but what that 
DAL call generates is:

SELECT mb_posts.id, mb_posts.title, mb_posts.message, 
mb_posts.posted_by, mb_posts.date_posted, mb_posts.locked, 
mb_posts.sticky, mb_posts.last_edited, mb_posts.board_id, 
mb_posts.reply_to, mb_posts.views, auth_user.id, auth_user.first_name, 
auth_user.last_name, auth_user.email, auth_user.password, 
auth_user.registration_key, COUNT(mb_posts2.id), SELECT mb_posts3.id 
FROM mb_posts3, mb_posts WHERE mb_posts3.reply_to=mb_posts.id ORDER BY 
mb_posts3.id DESC LIMIT 1 OFFSET 0; FROM mb_posts, mb_posts3 LEFT JOIN 
auth_user ON auth_user.id=mb_posts.posted_by LEFT JOIN mb_posts AS 
mb_posts2 ON mb_posts2.reply_to=mb_posts.id WHERE (mb_posts.board_id=1 
AND mb_posts.reply_to IS NULL) GROUP BY mb_posts.id


So the first thing is there is a ';' sighn after OFFSET statement in the 
middle of query and the second thing is that this is not the way 
subselects are supposed to be used. Try to examine it further, i'm 
getting a bit lost in it. I think it is terribly complicated for the 
functionality it should provide.

Plysak



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



[web2py:19128] Re: web2py and Python3

2009-04-05 Thread Michal Jursa

> 
> What feature of 3.0 do you consider so important to constraint you?
> 
> Massimo
> 

LOL, I wanted to ask the same question..:))
+1

Michal alias Plysak



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



[web2py:19071] Re: The official Web2py Book by Massimo....for free?

2009-04-04 Thread Michal Jursa

That's absolutely not about money and I understand the reasons only 
partially, but if you are seriously interested in web2py, $10 is not so 
much. I hope Massimo will clear this all on website soon :)

Michal alias Plysak

Pystar napsal(a):
> If Massimo is concerned about money (which isnt strange in the light
> of things), i feel that the expose and awareness that will be created
> by releasing the official web2py book as a free download will over
> compensate for anything else. Even more revenue will be made because
> people who read the ebook version might be willing to buy the printed
> version. The gains to web2py and the whole community would be massive.
> Over to you Massimo.
> 
> On Apr 4, 1:19 am, Pystar  wrote:
>> I had this weird idea today, in other to bring web2py which IMHO is
>> the best python framework out there, i would suggest that the official
>> web2py book be made a free download. i give my reasons below:
>> 1. Any newbie who wants to try out web2py might not be interested in
>> reading the source code, or might find the docs on the web2py site
>> sufficient, but if the web2py book is available as a free download,
>> this might arouse his/her interest more.
>> Just my 2 cents anyway
> > 


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



[web2py:19067] Re: The official Web2py Book by Massimo....for free?

2009-04-04 Thread Michal Jursa

And again

Massimo you should place some really deep and exact explanation about 
the book status and reasons why it is not free to the website..:)

Michal alias Plysak

Pystar napsal(a):
> I had this weird idea today, in other to bring web2py which IMHO is
> the best python framework out there, i would suggest that the official
> web2py book be made a free download. i give my reasons below:
> 1. Any newbie who wants to try out web2py might not be interested in
> reading the source code, or might find the docs on the web2py site
> sufficient, but if the web2py book is available as a free download,
> this might arouse his/her interest more.
> Just my 2 cents anyway
> > 


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



[web2py:18855] Re: problems with i18

2009-03-31 Thread Michal Jursa

Hi Marco,
you got mdifferent preffered language set in your browsers.
*** indicates application is using some language file and *** marks 
variables which were not translated yet.

So check language prefferences in your browsers and make translation in 
tour application administration. :)

Michal alias Plysak

Marco Prosperi wrote:
> hello everybody, I've created a little web2py application to manage
> customers and contacts in my company. I've put the application on a
> server and I've discovered some problems with rispect to i18n: for
> some PC over the network some dates and strings appear with *** in
> front of them but not if I connect to the server from my PC. What
> could I check/modify/move to solve this?
> 
> thanks in advance, Marco
> > 

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



[web2py:18840] Re: T2 login fails with internet explorer 7...

2009-03-31 Thread Michal Jursa

Hi Stefan,
the problem is not in IE but in your hostname. Hostname simply must NOT 
contain anything but letters, nubers and '-' character. Anything else is 
corretly assumed as malformed url and should not work.

So don't blame IE (even i don't like it neither), but this is not error, 
that's correct.

Michal alias Plysak

stefaan wrote:
> ...if the servername contains an underscore ("_").
> 
> I think it is a bug in internet explorer, so no need to change web2py
> for that.
> A workaround is to use the ip address instead of the servername.
> 
> Hopefully this post can prevent other people from spending half a day
> on this ;)
> 
> Best regards,
> Stefaan.
> 
> > 

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



[web2py:18778] Re: DAL Insert error

2009-03-30 Thread Michal Jursa

That's not problem of DAL. I just guess some of those inserts failed due 
to some constraints and that's why the transaction is aborted and 
rollback should be issued.

Michal alias Plysak

voltron wrote:
> Hi,
> 
> does anyone have an idea what could cause this error?
> 
> current transaction is aborted, commands ignored until end of
> transaction block
> 
> I am trying to make over 2000 inserts at a go, could that be a
> problem?
> 
> 
> Thanks
> > 


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



[web2py:18724] DAL feature request - index

2009-03-29 Thread Michal Jursa

Hi,
last night i found there is no possibility to force DAL to create an 
index on some column. Sometimes it is necessary to select records not 
only by primary key and in that case index built on some other column 
should do the work better than full scans on database.

So I suggest to implement new feature to SQLField like index = True, 
False is fine as default i think.

I will try to implement this myslef, but got no time this week, 
finishing some project. So take the time to discuss what do you thing 
about such option?

Michal alias Plysak

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



[web2py:18549] Re: Get stuck on incorrect view template

2009-03-24 Thread Michal Jursa

Sure, but that the TYPO what makes me unhappy.. i know it is always 
possible to pass controller itself or by the 'name' reference. Typo like 
  controller'  without the leading ' or somewhat unbalanced quotas makes 
whole application stuck.

Michal alias Plysak

Wes James wrote:
> According to the book (do you have it? - see page 67), you should be
> able to do this.  But the controller is also implied so if you are not
> using a different controller than where your page is already at, try:
> 
> URL=(r=request, f='function')
> 
> and see what happens.
> 
> -wj
> 
> On Tue, Mar 24, 2009 at 9:41 AM, Michal Jursa  wrote:
>> That's the exact spelling of the template which makes that problem
>> that's a typo i did and locked whole application. Tried to  repeat it a
>> few times and it hangs whole thing every time. I'm not sure if it is a
>> bug or my error, just trying to identify the problem.
>>
>> Micahl alias Plysak
>>
>> Wes James wrote:
>>> On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa  wrote:
>>>> Strange thing keeps happen to me:
>>>> If i save a template with syntax error like
>>>>
>>>> URL=(r=request,c=controller',f='function') <= missing quota at controller
>>> what is the ' after c=controller?
>>>
>>>
>>>> whole web2py gets stuck and has to be killed and restarted.
>>>> Running Debian 5.0, Python 2.5 and have no idea what's going on. If
>>>> templates are ok, everything works fine. What's even more strange that
>>>> it does not happen every time and i'm not able to say how it comes. Try
>>>> it please and let me know if i'm just a lamer or there is something
>>>> going wrong..:)
>>>>
>>>> Michal alias Plysak
>>>>
> 
> > 

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



[web2py:18537] Re: Get stuck on incorrect view template

2009-03-24 Thread Michal Jursa

That's the exact spelling of the template which makes that problem 
that's a typo i did and locked whole application. Tried to  repeat it a 
few times and it hangs whole thing every time. I'm not sure if it is a 
bug or my error, just trying to identify the problem.

Micahl alias Plysak

Wes James wrote:
> On Tue, Mar 24, 2009 at 8:35 AM, Michal Jursa  wrote:
>> Strange thing keeps happen to me:
>> If i save a template with syntax error like
>>
>> URL=(r=request,c=controller',f='function') <= missing quota at controller
> 
> what is the ' after c=controller?
> 
> 
>>
>> whole web2py gets stuck and has to be killed and restarted.
>> Running Debian 5.0, Python 2.5 and have no idea what's going on. If
>> templates are ok, everything works fine. What's even more strange that
>> it does not happen every time and i'm not able to say how it comes. Try
>> it please and let me know if i'm just a lamer or there is something
>> going wrong..:)
>>
>> Michal alias Plysak
>>
> 
> > 

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



[web2py:18532] Get stuck on incorrect view template

2009-03-24 Thread Michal Jursa

Strange thing keeps happen to me:
If i save a template with syntax error like

URL=(r=request,c=controller',f='function') <= missing quota at controller


whole web2py gets stuck and has to be killed and restarted.
Running Debian 5.0, Python 2.5 and have no idea what's going on. If 
templates are ok, everything works fine. What's even more strange that 
it does not happen every time and i'm not able to say how it comes. Try 
it please and let me know if i'm just a lamer or there is something 
going wrong..:)

Michal alias Plysak

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



[web2py:18521] Re: about buttons

2009-03-24 Thread Michal Jursa

Yes, coz it cannot be called like this. The problem is not in web2py but 
in your page. You have to use proper javascript call. So the result 
should look like:

Crea attività

Then i think this will work as you expected.

Michal alias Plysak :)

Marco Prosperi wrote:
> Sorry but with
> Crea attività button>
> the function 'add_records' is never called
> 
> while with
> crea attività
> then 'add_records' is called and works (I can see it because it
> creates a file)
> 
> maybe is this the wrong syntax?
> 
> Marco
> 
> 
> On 24 Mar, 10:12, Yarko Tymciurak  wrote:
>> On Tue, Mar 24, 2009 at 3:17 AM, Marco Prosperi
>> wrote:
>>
>>
>>
>>> hi all,
>>> I would like to put a button in one of my pages so that when the users
>>> clicks it, a computation on the database get started. I don't know the
>>> syntax I have to use. Probably something like:
>>> click me
>> ...
>>
>> but there may be a better way depending on what you are trying to do...
>>
>>
>>
>>> any hint? Or maybe there is a better approach?
>>> Marco
> > 

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



[web2py:18287] Re: Only allowing gif, png or jpeg images for upload?

2009-03-18 Thread Michal Jursa

So, massimo's way is pretty fine i think ..:)

Mike alias Plysak

Kacper Krupa wrote:
> yes, but it guesses by file extension :)
> 
> On 18 Mar, 16:00, AchipA  wrote:
>> Not web2py, but generic python:
>>
>> import mimetypes
>> mimetypes.guess_type(filename)
>>
>> On Mar 18, 9:05 am, Michal Jursa  wrote:
>>
>>> Is it possible to get mime-type of the uploaded object in some web2py
>>> manner? It would be better to work with mime-type then some letters in
>>> filename I think.
>>> Mike alias Plysak  :)
>>> mdipierro wrote:
>>>> class IS_GIF:
>>>> def __init__(self,em): self.em=em
>>>> def __call__(self,value):
>>>> if value and value.filename[-4:].lower()!='.gif':
>>>> return (value,self.em)
>>>> return (value,None)
>>>> db.table.field.requires=IS_GIF()
>>>> On Mar 17, 7:45 pm, TheDude  wrote:
>>>>> How would I only allow gif, png or jpeg images to be uploaded?
> > 

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



[web2py:18268] Re: new web2py video about Auth, Service

2009-03-18 Thread Michal Jursa

Absolutely not massimo, you are a star and your screencasts are great.

Mike alias Plysak :)

mdipierro wrote:
> I am not good at doing this. I do not type well and I hate my own
> voice.
> 
> If some of you have screenflow and are good at this, I am I happy to
> script more video tutorials and you do the typing, the recording and
> add voice.
> 
> Massimo
> 


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



[web2py:18267] Re: Only allowing gif, png or jpeg images for upload?

2009-03-18 Thread Michal Jursa

Is it possible to get mime-type of the uploaded object in some web2py 
manner? It would be better to work with mime-type then some letters in 
filename I think.

Mike alias Plysak  :)

mdipierro wrote:
> class IS_GIF:
> def __init__(self,em): self.em=em
> def __call__(self,value):
> if value and value.filename[-4:].lower()!='.gif':
> return (value,self.em)
> return (value,None)
> 
> db.table.field.requires=IS_GIF()
> 
> On Mar 17, 7:45 pm, TheDude  wrote:
>> How would I only allow gif, png or jpeg images to be uploaded?
> > 


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



[web2py:18198] Re: Qusestion about the book?

2009-03-17 Thread Michal Jursa

well, web2py book is online. You can buy it on lulu.com and download 
whole PDF as i did. $10 not so much and it is really good job from 
Massimo. Thanks for the framework and the book too.

Mike

Baron wrote:
> that is very unfortunate.
> The Django project is able to sell their book and put it online so why
> can't web2py?
> 
> 
> On Mar 17, 12:52 pm, Yarko Tymciurak  wrote:
>> that you even asked says all you need to know:  if in doubt, do nothing
>> without written permission.
>>
>> On Mon, Mar 16, 2009 at 6:56 PM, Baron  wrote:
>>
>>> Are we allowed to copy sections from the published book into the wiki?
>>> Or would that break copyright?
>>> On Mar 16, 10:47 am, mdipierro  wrote:
 This questions comes up once in a while. The reason for the published
 book is not that I make any money from it. the reason is that I need
 to justify to my employer the time I spend on web2py. In academia only
 publications count. A book on sale counts. A free book does not.
 Normally software does not count either.
 I do not oppose creating an alternative completely open documentation
 and actually I encourage it.
 (first attempt)http://mdp.cti.depaul.edu/AlterEgo
 (second attempt)https://mdp.cti.depaul.edu/web2py_wiki
 (third attempt)https://mdp.cti.depaul.edu/wiki
 Massimo
 On Mar 15, 4:58 pm, "ma...@rockiger.com" 
 wrote:
> The book is very well done, except of some typos.
> Is there any plan to make open book, like the djagobook?
> It is not because I am stingy, but because web2py is moving so fast.
> Thanks for web2py the most productive web-framework out there. (I only
> speak for myself)
> Rockin' Regards,
> Marco
> > 

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



[web2py:18089] cancel alarm, just newbie panic "validator error message not working"

2009-03-15 Thread Michal Jursa

Sorry everybody, just found the right place in form to change the 
language etc etc...:)  Sorry to bother around, but i was really getting 
down..:)

Mike.

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



[web2py:18088] validator error message not working (may be newbie fault)

2009-03-15 Thread Michal Jursa

Hi,
I'm brand new to web2py, trying to run my very first app and as I need 
to get translated apps i really wonder aroud this. I installed CAS to do 
  authentications for me and modified last but one row in models/db.py to:

db.cas_user.name.requires=IS_NOT_EMPTY(error_message = "nesmi byt prazdne")

Well and all the form warnings are still in default english. Did i get 
something wrong or missed something? I looked in validator.py and I 
thought it should work like this, but.. :)

Any kicks for newbie?

Thanks Mike.

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