[web2py] Suggested web2py layout for iPhone/iPad?

2010-11-20 Thread David Mitchell
Hello all,

Is there a suggested web2py layout for rendering on an iPhone or iPad?

Obviously the screen size is a significant constraint on the iPhone; is
there a layout that renders along the lines of the iWebkit (
http://iwebkit.net) framework, which is optimised for the iPhone?

Thanks in advance

Dave M.


[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread annet
I like the new admin interface, however, I had t re-open an older
version of web2py to figure out the meaning of the black and yellow
circle (test, my first association was 'beware toxic waste'). Maybe a
tooltip would solve this problem.

Furthermore I think edit/delete/test should all be buttons or all be
icons not a mixture as it is now. In my opinion the current X stands
out to much, just like the buttons in front of EDIT APPLICATION,
MODELS etc.

Personally, I like the icons webfaction is using, consistent styling
and a clear meaning.


Kind regards,

Annet.


[web2py] Error when using wizard to create a new application

2010-11-20 Thread Kenneth Lundström
I tried to create a new application with the wizard and when I pressed 
generate I got this error. When looking in the applictions folder all 
subfolders that should be under applications/appliction_name are in the 
applications folder. I created the folder and moved all subfolders into 
it, now that application works. When I tried again I couldn´t get the 
error, so I don´t know why this happened.



Kenneth


Version
web2py™ Version 1.89.4 (2010-11-19 02:50:05)
Python Python 2.6.5: /usr/bin/python
Traceback

Traceback (most recent call last):
File /data/domains/web2py/gluon/restricted.py, line 188, in restricted
exec ccode in environment
File 
/data/domains/web2py/applications/admin/views/wizard/generated.html, 
line 61, in module

File /data/domains/web2py/gluon/html.py, line 228, in _URL
return URL(*args, **kwargs)
File /data/domains/web2py/gluon/html.py, line 188, in URL
raise SyntaxError, 'not enough information to build the url'
SyntaxError: not enough information to build the url

Error snapshot help Detailed traceback description

type 'exceptions.SyntaxError'(not enough information to build the url)

inspect attributes
Exception instance attributes
__getslice__ method-wrapper '__getslice__' of exceptions.SyntaxError 
object

text None
__str__ method-wrapper '__str__' of exceptions.SyntaxError object
__getattribute__ method-wrapper '__getattribute__' of 
exceptions.SyntaxError object

__dict__ {}
__sizeof__ built-in method __sizeof__ of exceptions.SyntaxError object
__init__ method-wrapper '__init__' of exceptions.SyntaxError object
__setattr__ method-wrapper '__setattr__' of exceptions.SyntaxError object
__reduce_ex__ built-in method __reduce_ex__ of exceptions.SyntaxError 
object

__new__ built-in method __new__ of type object
__format__ built-in method __format__ of exceptions.SyntaxError object
__class__ type 'exceptions.SyntaxError'
filename None
lineno None
msg 'not enough information to build the url'
__doc__ 'Invalid syntax.'
__getitem__ method-wrapper '__getitem__' of exceptions.SyntaxError object
__setstate__ built-in method __setstate__ of exceptions.SyntaxError object
__reduce__ built-in method __reduce__ of exceptions.SyntaxError object
print_file_and_line None
args ('not enough information to build the url',)
__subclasshook__ built-in method __subclasshook__ of type object
offset None
__unicode__ built-in method __unicode__ of exceptions.SyntaxError object
__delattr__ method-wrapper '__delattr__' of exceptions.SyntaxError object
__repr__ method-wrapper '__repr__' of exceptions.SyntaxError object
__hash__ method-wrapper '__hash__' of exceptions.SyntaxError object
Frames

*

File /data/domains/web2py/gluon/restricted.py in restricted at line 188 
code arguments variables

Function argument list

(code='response.write(\'!doctype html\\nhtml xmlns=ht... /div\\n 
/body\\n/html\\n\', escape=False)', environment={'A': class 
'gluon.html.A', 'ALLOW_TOGGLE': 'true', 'B': class 'gluon.html.B', 
'BEAUTIFY': class 'gluon.html.BEAUTIFY', 'BODY': class 
'gluon.html.BODY', 'BR': class 'gluon.html.BR', 'CENTER': class 
'gluon.html.CENTER', 'CHECK_VERSION': True, 'CLEANUP': class 
'gluon.validators.CLEANUP', 'CODE': class 'gluon.html.CODE', ...}, 
layer='/data/domains/web2py/applications/admin/views/wizard/generated.html')

Code listing


if type(code) == types.CodeType:
ccode = code
else:
ccode = compile2(code,layer)

exec ccode in environment

except HTTP:
raise
except Exception:
# XXX Show exception in Wing IDE if running in debugger

Variables
environment {'A': class 'gluon.html.A', 'ALLOW_TOGGLE': 'true', 'B': 
class 'gluon.html.B', 'BEAUTIFY': class 'gluon.html.BEAUTIFY', 
'BODY': class 'gluon.html.BODY', 'BR': class 'gluon.html.BR', 
'CENTER': class 'gluon.html.CENTER', 'CHECK_VERSION': True, 'CLEANUP': 
class 'gluon.validators.CLEANUP', 'CODE': class 'gluon.html.CODE', ...}
ccode code object module at 0x2b9adfe78300, file 
/...tions/admin/views/wizard/generated.html, line 1

*

File /data/domains/web2py/applications/admin/views/wizard/generated.html 
in module at line 61 code arguments variables

Function argument list

()
Code listing

52.
53.
54.
55.
56.
57.
58.
59.
60.
61.

62.
63.
64.
65.
66.
67.
68.
69.
70.
71.



response.write('/li\n ', escape=False)
pass
response.write('\n /ul\n ', escape=False)
pass
response.write('\n /div\n div id=main\n div id=main_inner\n 
div class=flash', escape=False)

response.write(response.flash or '')
response.write('/div\n ', escape=False)
response.write('\n\n', escape=False)
response.write('\n\na class=button href=', escape=False)
response.write(URL(app,'default','index'))

response.write('Open new app in new window/a\na class=button 
href=', escape=False)

response.write(URL('step1'))
response.write('Back to wizard/a\na class=button href=', 
escape=False)

response.write(URL('default','design',args=app))
response.write('Admin design page/a\n', escape=False)
if have_mercurial:
response.write('\na class=button href=', escape=False)

[web2py] Admin comments

2010-11-20 Thread Kenneth Lundström
Admin first page, why is the edit button black when all the others are 
grey? It looks like the edit button is allready pressed.


On page /admin/wizard/step5/0:
Use the markmin syntax syntax to add text to your pages.

maybe one syntax is enough.

Am I doing something wrong when I´m create a new application with the 
wizard and select a layout from the drop down. A small picture of the 
layout is shown. After I have generated the application I go and look at 
it, but the layout I selected is not applied. Something wrong?


It would be nice if you could click on the small picture that show the 
layout to see a bigger picture.



Kenneth



[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread annet
I like the new admin interface, however, I had t re-open an older
version of web2py to figure out the meaning of the black and yellow
circle (test, my first association was 'beware toxic waste'). Maybe a
tooltip would solve this problem.

Furthermore I think edit/delete/test should all be buttons or all be
icons not a mixture as it is now. In my opinion the current X stands
out to much, just like the buttons in front of EDIT APPLICATION,
MODELS etc.

I also wonder about the size of the X icon, why 15x15 whereas 16x16 is
more common.

Personally, I like the icons webfaction is using, consistent styling
and a clear meaning.

These are not criticism, just thoughts that might help improve the
admin interface.

Kind regards,

Annet.


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
On Sat, Nov 20, 2010 at 3:22 AM, Anthony abasta...@gmail.com wrote:
 On Nov 19, 9:06 pm, Joel Clay ra3do...@gmail.com wrote:
 How about we turn the red X into a checkbox (think Gmail) You check the box
 and at the top there are links to perform actions (in this case delete). In
 my opinion, this kills two birds with one stone -- it increases ease of
 deletion of multiple files and gets rid of the red X.

 This would also decrease the chance of accidentally deleting a file
 with a rogue click.

You can't accidentally delete a file, since it requires you to
confirm. I've even ensured that you can't do anything too stupid on
the confirmation page, by labelling the buttons as Abort and
Delete.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
On Sat, Nov 20, 2010 at 9:45 AM, annet annet.verm...@gmail.com wrote:
 I like the new admin interface, however, I had t re-open an older
 version of web2py to figure out the meaning of the black and yellow
 circle (test, my first association was 'beware toxic waste'). Maybe a
 tooltip would solve this problem.

Yes, that would most definitely help. I'll think of a solution along
those lines.

 Furthermore I think edit/delete/test should all be buttons or all be
 icons not a mixture as it is now. In my opinion the current X stands

That's been discussed, and this solution is deliberate. I do think the
current solution is optimal. There was a pretty intuitive edit icon,
but icons are small, etc etc. I've already explained the rationale
behind this.

 I also wonder about the size of the X icon, why 15x15 whereas 16x16 is
 more common.

This is not a desktop environment where apps are providing their own
icons and icons need standardization. So we're free to use whatever
size fits the purpose. The icon sizes take into account the size of
the surrounding text, etc. The actual bitmaps are actually 22x22px,
padded to give some spacing between the adjacent icons and buttons.

 Personally, I like the icons webfaction is using, consistent styling
 and a clear meaning.

You could grab the webfaction icons (I don't use webfaction, so I
don't know what those look like, really) and replace the existing
admin icons with them. Grab a screenshot and show us what it looks
like. The existing icons are located here:

/path/to/web2py/applications/admin/static/images

Specifically, you're looking for files that end in ``_icon.png``.

 These are not criticism, just thoughts that might help improve the
 admin interface.

UI design is most like app design. You provide a 'test case' where a
specific bug prevents correct operation of the UI, and propose a
solution. Otherwise it's a feature request. At least that's how I view
things. I consider the following a bug:

1. Someone didn't understand what particular piece of UI does (and had
no way of finding out)
2. Someone thought a piece of UI did something, but in fact it did
something else
3. Someone managed to break the UI by doing X
4. UI doesn't display correctly for client X

Another set of minor bugs would be:

5. A piece of UI gives unnecessary cognitive noise
6. A piece of UI breaks the overall syle of the UI

Other cases are what Steve Krug calls 'canoe problem': you were
confused but you figured it out quickly enough and it didn't get in
the way by the time you've used it more than two or three times. This
is _not_ considered a problem with the UI.

To conclude:

* In annet's case, test icons fall under the first category of bugs,
so it will be addressed. The appearance of the delete button, and it's
functionality is not a bug, so it's a wontfix.

* The 'redness' of the X icon would fall into the 5th category, but
there is no good solution, so it's a wontfix, again. Proposed solution
all break 6 or are similar to the current solution.

* Personal preference does not get addressed (by me, not in general).
It's a Pandora's box, and I won't be the one to open it. You are all
free to modify the admin according to your own preferences.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Facebox problems

2010-11-20 Thread Bernardo
Hi all,

My question is, has anyone been able to place a working form inside a
facebox box?

Facebox is a jQuery plugin (http://chriswanstrath.com/facebox/). Well,
the form is shown perfectly, but when sumbit button is pressed nothing
happens. Has anyone dealt with this issue?

Thanks a lot to all, and kind regards,
Bernardo


[web2py] cron

2010-11-20 Thread leone
Hi,
what means WARNING:web2py.cron:WEB2PY CRON: Stale cron.master
detected?
My crontab:
#crontab
1 * * * * root *plugin_CRONTAB/test

(ubuntu os, last rel web2py)
Thanks in advance


[web2py] display IS_IN_SET, from a select in a form

2010-11-20 Thread puercoespin
Hello,

 I have a custom db.auth_user, with a boolean field



Field('profesional', 'boolean', default=False),
.
.
format='%(first_name)s',

)



and a table that references:

'''
db.define_table('comentario_vendedor',
  Field('vendedor_id', db.auth_user,),




I want to display in 'vendedor_id' only db.auth_user.profesional=True,
so:

'''
db.comentario_vendedor.vendedor_id.requires=IS_IN_SET(db(db.auth_user.profesional=='True').select(db.auth_user.first_name))
'''
But I display Row {'firs_name':'nombrevendedor1'} Row
{'firs_name':'nombrevendedor2'} etc.

Where's the error?

Thanks!



Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Joel Clay
On Sat, Nov 20, 2010 at 3:16 AM, Branko Vukelic bg.bra...@gmail.com wrote:

 On Sat, Nov 20, 2010 at 9:45 AM, annet annet.verm...@gmail.com wrote:
  I like the new admin interface, however, I had t re-open an older
  version of web2py to figure out the meaning of the black and yellow
  circle (test, my first association was 'beware toxic waste'). Maybe a
  tooltip would solve this problem.

 Yes, that would most definitely help. I'll think of a solution along
 those lines.

  Furthermore I think edit/delete/test should all be buttons or all be
  icons not a mixture as it is now. In my opinion the current X stands

 That's been discussed, and this solution is deliberate. I do think the
 current solution is optimal. There was a pretty intuitive edit icon,
 but icons are small, etc etc. I've already explained the rationale
 behind this.

  I also wonder about the size of the X icon, why 15x15 whereas 16x16 is
  more common.

 This is not a desktop environment where apps are providing their own
 icons and icons need standardization. So we're free to use whatever
 size fits the purpose. The icon sizes take into account the size of
 the surrounding text, etc. The actual bitmaps are actually 22x22px,
 padded to give some spacing between the adjacent icons and buttons.

  Personally, I like the icons webfaction is using, consistent styling
  and a clear meaning.

 You could grab the webfaction icons (I don't use webfaction, so I
 don't know what those look like, really) and replace the existing
 admin icons with them. Grab a screenshot and show us what it looks
 like. The existing icons are located here:

/path/to/web2py/applications/admin/static/images

 Specifically, you're looking for files that end in ``_icon.png``.

  These are not criticism, just thoughts that might help improve the
  admin interface.

 UI design is most like app design. You provide a 'test case' where a
 specific bug prevents correct operation of the UI, and propose a
 solution. Otherwise it's a feature request. At least that's how I view
 things. I consider the following a bug:

 1. Someone didn't understand what particular piece of UI does (and had
 no way of finding out)
 2. Someone thought a piece of UI did something, but in fact it did
 something else
 3. Someone managed to break the UI by doing X
 4. UI doesn't display correctly for client X

 Another set of minor bugs would be:

 5. A piece of UI gives unnecessary cognitive noise
 6. A piece of UI breaks the overall syle of the UI

 Other cases are what Steve Krug calls 'canoe problem': you were
 confused but you figured it out quickly enough and it didn't get in
 the way by the time you've used it more than two or three times. This
 is _not_ considered a problem with the UI.

 To conclude:

 * In annet's case, test icons fall under the first category of bugs,
 so it will be addressed. The appearance of the delete button, and it's
 functionality is not a bug, so it's a wontfix.

 * The 'redness' of the X icon would fall into the 5th category, but
 there is no good solution, so it's a wontfix, again. Proposed solution
 all break 6 or are similar to the current solution.

 What? Really. I've seen quite a number of good solutions run through this
topic. Obviously most of the community agrees that the X icon falls in the
5th category, so the problem is a shouldfix, not a wontfix.

I'll propose another solution. Lets think. How often do you need to delete a
file (if you are me, not very often) why don't we have the X's hidden, but
have a link at the top saying 'Delete files' which then exposes the X's.
iPhone uses a similar concept to delete files and it works great.


 * Personal preference does not get addressed (by me, not in general).
 It's a Pandora's box, and I won't be the one to open it. You are all
 free to modify the admin according to your own preferences.


 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group



Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Joel Clay


 * The 'redness' of the X icon would fall into the 5th category, but
 there is no good solution, so it's a wontfix, again. Proposed solution
 all break 6 or are similar to the current solution.


What? Really. I've seen quite a number of good solutions run through
this topic.
Obviously most of the community agrees that the X icon falls in the 5th
category, so the problem is a shouldfix, not a wontfix.

I'll propose another solution. Lets think. How often do you need to delete
a file? Why don't we have the X's hidden, but have a link at the top saying
'Delete files' which then exposes the X's. iPhone uses a similar concept to
delete files and it works great.


[web2py] Re: jquery file addition in web2py_ajax.html trunk has a problem

2010-11-20 Thread mdipierro
uploading fix to trunk

On Nov 20, 12:17 am, ron_m ron.mco...@gmail.com wrote:
 I use jQueryUI as well which is included in the view pages I create
 that need it. I found that using the current in trunk way to include
 jquery.js in web2py_ajax.html doesn't work:

 response.files.append(URL('static','js/jquery.js'))
 response.files.append(URL('static','css/calendar.css'))
 response.files.append(URL('static','js/calendar.js'))

 in the 1.88.X version the code used to be:

 response.files.insert(0,URL('static','js/jquery.js'))
 response.files.insert(1,URL('static','css/calendar.css'))
 response.files.insert(2,URL('static','js/calendar.js'))

 This forces the files in front of the other response.files items.

 Using this jQueryUI works again.

 Ron


[web2py] Re: Error when using wizard to create a new application

2010-11-20 Thread mdipierro
looks like you have an incomplete upgrade. admin was upgraded but the
libraries from gluon/* no

On Nov 20, 2:38 am, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
 I tried to create a new application with the wizard and when I pressed
 generate I got this error. When looking in the applictions folder all
 subfolders that should be under applications/appliction_name are in the
 applications folder. I created the folder and moved all subfolders into
 it, now that application works. When I tried again I couldn t get the
 error, so I don t know why this happened.

 Kenneth

 Version
 web2py Version 1.89.4 (2010-11-19 02:50:05)
 Python Python 2.6.5: /usr/bin/python
 Traceback

 Traceback (most recent call last):
 File /data/domains/web2py/gluon/restricted.py, line 188, in restricted
 exec ccode in environment
 File
 /data/domains/web2py/applications/admin/views/wizard/generated.html,
 line 61, in module
 File /data/domains/web2py/gluon/html.py, line 228, in _URL
 return URL(*args, **kwargs)
 File /data/domains/web2py/gluon/html.py, line 188, in URL
 raise SyntaxError, 'not enough information to build the url'
 SyntaxError: not enough information to build the url

 Error snapshot help Detailed traceback description

 type 'exceptions.SyntaxError'(not enough information to build the url)

 inspect attributes
 Exception instance attributes
 __getslice__ method-wrapper '__getslice__' of exceptions.SyntaxError
 object
 text None
 __str__ method-wrapper '__str__' of exceptions.SyntaxError object
 __getattribute__ method-wrapper '__getattribute__' of
 exceptions.SyntaxError object
 __dict__ {}
 __sizeof__ built-in method __sizeof__ of exceptions.SyntaxError object
 __init__ method-wrapper '__init__' of exceptions.SyntaxError object
 __setattr__ method-wrapper '__setattr__' of exceptions.SyntaxError object
 __reduce_ex__ built-in method __reduce_ex__ of exceptions.SyntaxError
 object
 __new__ built-in method __new__ of type object
 __format__ built-in method __format__ of exceptions.SyntaxError object
 __class__ type 'exceptions.SyntaxError'
 filename None
 lineno None
 msg 'not enough information to build the url'
 __doc__ 'Invalid syntax.'
 __getitem__ method-wrapper '__getitem__' of exceptions.SyntaxError object
 __setstate__ built-in method __setstate__ of exceptions.SyntaxError object
 __reduce__ built-in method __reduce__ of exceptions.SyntaxError object
 print_file_and_line None
 args ('not enough information to build the url',)
 __subclasshook__ built-in method __subclasshook__ of type object
 offset None
 __unicode__ built-in method __unicode__ of exceptions.SyntaxError object
 __delattr__ method-wrapper '__delattr__' of exceptions.SyntaxError object
 __repr__ method-wrapper '__repr__' of exceptions.SyntaxError object
 __hash__ method-wrapper '__hash__' of exceptions.SyntaxError object
 Frames

 *

 File /data/domains/web2py/gluon/restricted.py in restricted at line 188
 code arguments variables
 Function argument list

 (code='response.write(\'!doctype html\\nhtml xmlns=ht... /div\\n
 /body\\n/html\\n\', escape=False)', environment={'A': class
 'gluon.html.A', 'ALLOW_TOGGLE': 'true', 'B': class 'gluon.html.B',
 'BEAUTIFY': class 'gluon.html.BEAUTIFY', 'BODY': class
 'gluon.html.BODY', 'BR': class 'gluon.html.BR', 'CENTER': class
 'gluon.html.CENTER', 'CHECK_VERSION': True, 'CLEANUP': class
 'gluon.validators.CLEANUP', 'CODE': class 'gluon.html.CODE', ...},
 layer='/data/domains/web2py/applications/admin/views/wizard/generated.html')
 Code listing

 if type(code) == types.CodeType:
 ccode = code
 else:
 ccode = compile2(code,layer)

 exec ccode in environment

 except HTTP:
 raise
 except Exception:
 # XXX Show exception in Wing IDE if running in debugger

 Variables
 environment {'A': class 'gluon.html.A', 'ALLOW_TOGGLE': 'true', 'B':
 class 'gluon.html.B', 'BEAUTIFY': class 'gluon.html.BEAUTIFY',
 'BODY': class 'gluon.html.BODY', 'BR': class 'gluon.html.BR',
 'CENTER': class 'gluon.html.CENTER', 'CHECK_VERSION': True, 'CLEANUP':
 class 'gluon.validators.CLEANUP', 'CODE': class 'gluon.html.CODE', ...}
 ccode code object module at 0x2b9adfe78300, file
 /...tions/admin/views/wizard/generated.html, line 1
 *

 File /data/domains/web2py/applications/admin/views/wizard/generated.html
 in module at line 61 code arguments variables
 Function argument list

 ()
 Code listing

 52.
 53.
 54.
 55.
 56.
 57.
 58.
 59.
 60.
 61.

 62.
 63.
 64.
 65.
 66.
 67.
 68.
 69.
 70.
 71.

 response.write('/li\n ', escape=False)
 pass
 response.write('\n /ul\n ', escape=False)
 pass
 response.write('\n /div\n div id=main\n div id=main_inner\n
 div class=flash', escape=False)
 response.write(response.flash or '')
 response.write('/div\n ', escape=False)
 response.write('\n\n', escape=False)
 response.write('\n\na class=button href=', escape=False)
 response.write(URL(app,'default','index'))

 response.write('Open new app in new window/a\na class=button
 href=', escape=False)
 response.write(URL('step1'))
 

[web2py] Re: Admin comments

2010-11-20 Thread mdipierro
because edit is more important. Is it really confusing?
Fixed the typo, thanks.

On Nov 20, 2:41 am, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
 Admin first page, why is the edit button black when all the others are
 grey? It looks like the edit button is allready pressed.

 On page /admin/wizard/step5/0:
 Use the markmin syntax syntax to add text to your pages.

 maybe one syntax is enough.

 Am I doing something wrong when I m create a new application with the
 wizard and select a layout from the drop down. A small picture of the
 layout is shown. After I have generated the application I go and look at
 it, but the layout I selected is not applied. Something wrong?

 It would be nice if you could click on the small picture that show the
 layout to see a bigger picture.

 Kenneth


[web2py] Re: display IS_IN_SET, from a select in a form

2010-11-20 Thread mdipierro
This line

db.comentario_vendedor.vendedor_id.requires=IS_IN_SET(db(db.auth_user.profesional=='True').select(db.auth_user.first_name))

should be

db.comentario_vendedor.vendedor_id.requires=IS_IN_DB(db(db.auth_user.profesional=='True'),auth_user.first_name)




On Nov 20, 6:43 am, puercoespin jzaragoza.puercoes...@gmail.com
wrote:
 Hello,

  I have a custom db.auth_user, with a boolean field

 
 
 Field('profesional', 'boolean', default=False),
 .
 .
 format='%(first_name)s',

     )

 

 and a table that references:

 '''
 db.define_table('comentario_vendedor',
       Field('vendedor_id', db.auth_user,),
 

 

 I want to display in 'vendedor_id' only db.auth_user.profesional=True,
 so:

 '''
 db.comentario_vendedor.vendedor_id.requires=IS_IN_SET(db(db.auth_user.profesional=='True').select(db.auth_user.first_name))
 '''
 But I display Row {'firs_name':'nombrevendedor1'} Row
 {'firs_name':'nombrevendedor2'} etc.

 Where's the error?

 Thanks!


[web2py] Re: bug? SQLTABLE with null values for reference fields

2010-11-20 Thread richard.ree
I see.  I guess I just assumed that a validator like
IS_NULL_OR(IS_IN_DB(db, db.other.id)) would be assigned by default to
reference fields, since null values are allowed by default in other
types of fields.

Thanks,
-Rick


[web2py] Re: bug? SQLTABLE with null values for reference fields

2010-11-20 Thread mdipierro
They are assigned by default IF the referenced table has a format='%
(name)s' attribute else web2py does not know how to represent items in
the dropdown.

On Nov 20, 8:33 am, richard.ree richard.h@gmail.com wrote:
 I see.  I guess I just assumed that a validator like
 IS_NULL_OR(IS_IN_DB(db, db.other.id)) would be assigned by default to
 reference fields, since null values are allowed by default in other
 types of fields.

 Thanks,
 -Rick


[web2py] Re: cron

2010-11-20 Thread mdipierro
Not 100% sure but I think this means that a cron task did not complete
or exited abnormally.

On Nov 20, 6:04 am, leone handja...@gmail.com wrote:
 Hi,
 what means WARNING:web2py.cron:WEB2PY CRON: Stale cron.master
 detected?
 My crontab:
 #crontab
 1 * * * * root *plugin_CRONTAB/test

 (ubuntu os, last rel web2py)
 Thanks in advance


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
On Sat, Nov 20, 2010 at 1:58 PM, Joel Clay ra3do...@gmail.com wrote:
 What? Really. I've seen quite a number of good solutions run through this
 topic. Obviously most of the community agrees that the X icon falls in the

Interesting. This thread _is_ long, but I'm sure if you look at it
carefully, you won't see most of the community and quite a number
of solutions. In fact, you will see 2 solutions, and less than 10
members including yourself. So please don't try to force your opinion
by blowing things out of proportion.

Anyways, back to the topic. The two solutions mentioned were:

1. Make delete icon go away
2. Use a trash icon

The first solution actually addresses an non-existent problem of
accidental deletion. I echo Massimo on this: it's not a problem,
because you have to CONFIRM deletion. You cannot confirm deletion by
accident because the buttons are labelled Delete and Abort, and
not Yes and No like in previous versions.

Second solution is simply not doable at 15px with the current _style_.
It's a good idea to have something grey there, but a trash can doesn't
work for me (I dare you to claim I haven't given it a shot, too). Just
because there _are_ trash cans that are 15px doesn't mean they would
work for our admin interface. If you disagree, you're welcome to make
a patch and submit it yourself, and then laugh at me publicly.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: Admin comments

2010-11-20 Thread Kenneth Lundström

 because edit is more important. Is it really confusing?

Me first impression when I looked at admin was that Edit is active, but 
I pressed Edit anyhow when I couldn't find any other way to edit it and 
voilá I found the place. Not an big deal.


Any comments about the layout not showing?


Kenneth


Fixed the typo, thanks.

On Nov 20, 2:41 am, Kenneth Lundströmkenneth.t.lundst...@gmail.com
wrote:

Admin first page, why is the edit button black when all the others are
grey? It looks like the edit button is allready pressed.

On page /admin/wizard/step5/0:
Use the markmin syntax syntax to add text to your pages.

maybe one syntax is enough.

Am I doing something wrong when I m create a new application with the
wizard and select a layout from the drop down. A small picture of the
layout is shown. After I have generated the application I go and look at
it, but the layout I selected is not applied. Something wrong?

It would be nice if you could click on the small picture that show the
layout to see a bigger picture.

Kenneth




[web2py] Re: Admin comments

2010-11-20 Thread mdipierro
Is this for one particular layout?

On Nov 20, 8:53 am, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
   because edit is more important. Is it really confusing?

 Me first impression when I looked at admin was that Edit is active, but
 I pressed Edit anyhow when I couldn't find any other way to edit it and
 voil I found the place. Not an big deal.

 Any comments about the layout not showing?

 Kenneth

  Fixed the typo, thanks.

  On Nov 20, 2:41 am, Kenneth Lundstr mkenneth.t.lundst...@gmail.com
  wrote:
  Admin first page, why is the edit button black when all the others are
  grey? It looks like the edit button is allready pressed.

  On page /admin/wizard/step5/0:
  Use the markmin syntax syntax to add text to your pages.

  maybe one syntax is enough.

  Am I doing something wrong when I m create a new application with the
  wizard and select a layout from the drop down. A small picture of the
  layout is shown. After I have generated the application I go and look at
  it, but the layout I selected is not applied. Something wrong?

  It would be nice if you could click on the small picture that show the
  layout to see a bigger picture.

  Kenneth




[web2py] Re: display IS_IN_SET, from a select in a form

2010-11-20 Thread puercoespin
Thanks Max, but, with that line raise an error:

 
db.comentario_vendedor.vendedor_id.requires=IS_IN_DB(db(db.auth_user.profesional=='True'),auth_user.first_name)
NameError: name 'auth_user' is not defined

fixed with:

db.comentario_vendedor.vendedor_id.requires=IS_IN_DB(db(db.auth_user.profes­
ional=='True'),db.auth_user.first_name)




On 20 nov, 15:33, mdipierro mdipie...@cs.depaul.edu wrote:
 This line

 db.comentario_vendedor.vendedor_id.requires=IS_IN_SET(db(db.auth_user.profe­sional=='True').select(db.auth_user.first_name))

 should be

 db.comentario_vendedor.vendedor_id.requires=IS_IN_DB(db(db.auth_user.profes­ional=='True'),auth_user.first_name)

 On Nov 20, 6:43 am, puercoespin jzaragoza.puercoes...@gmail.com
 wrote:



  Hello,

   I have a custom db.auth_user, with a boolean field

  
  
  Field('profesional', 'boolean', default=False),
  .
  .
  format='%(first_name)s',

      )

  

  and a table that references:

  '''
  db.define_table('comentario_vendedor',
        Field('vendedor_id', db.auth_user,),
  

  

  I want to display in 'vendedor_id' only db.auth_user.profesional=True,
  so:

  '''
  db.comentario_vendedor.vendedor_id.requires=IS_IN_SET(db(db.auth_user.profe­sional=='True').select(db.auth_user.first_name))
  '''
  But I display Row {'firs_name':'nombrevendedor1'} Row
  {'firs_name':'nombrevendedor2'} etc.

  Where's the error?

  Thanks!- Ocultar texto de la cita -

 - Mostrar texto de la cita -


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Joel Clay
There are more than two solutions in this thread, I challenge you to read
through and prove me wrong.
Perhaps that was wrong of me to conclude that a majority agrees that the red
X is distracting. Perhaps we should hold a poll. Being the designer, you
have a bias towards your work and that is both understandable and
respectable, you do great work.

I started the original thread not because there was a problem with
accidental deletion, it was because seeing a whole page full of red X's is
distracting for many, it just isn't appealing. Don't get me wrong, I do like
the new admin design, I just think we could do something different with the
X's.

Once again, I suggest we HIDE the X's until they are needed. Not because of
accidental deletion(not the point of the topic), but because of the fact
that the red X's are redundant and should only be shown when needed--in my
opinion. I think this should seriously be considered.

All being said, I will continue to use my trashcan icon until a respectable
change has been made.


On Sat, Nov 20, 2010 at 8:49 AM, Branko Vukelic bg.bra...@gmail.com wrote:

 On Sat, Nov 20, 2010 at 1:58 PM, Joel Clay ra3do...@gmail.com wrote:
  What? Really. I've seen quite a number of good solutions run through this
  topic. Obviously most of the community agrees that the X icon falls in
 the

 Interesting. This thread _is_ long, but I'm sure if you look at it
 carefully, you won't see most of the community and quite a number
 of solutions. In fact, you will see 2 solutions, and less than 10
 members including yourself. So please don't try to force your opinion
 by blowing things out of proportion.

 Anyways, back to the topic. The two solutions mentioned were:

 1. Make delete icon go away
 2. Use a trash icon

 The first solution actually addresses an non-existent problem of
 accidental deletion. I echo Massimo on this: it's not a problem,
 because you have to CONFIRM deletion. You cannot confirm deletion by
 accident because the buttons are labelled Delete and Abort, and
 not Yes and No like in previous versions.

 Second solution is simply not doable at 15px with the current _style_.
 It's a good idea to have something grey there, but a trash can doesn't
 work for me (I dare you to claim I haven't given it a shot, too). Just
 because there _are_ trash cans that are 15px doesn't mean they would
 work for our admin interface. If you disagree, you're welcome to make
 a patch and submit it yourself, and then laugh at me publicly.


 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group



Re: [web2py] Re: cron

2010-11-20 Thread Jonathan Lundell
On Nov 20, 2010, at 6:43 AM, mdipierro wrote:
 
 Not 100% sure but I think this means that a cron task did not complete
 or exited abnormally.

Right: still running after 60+ seconds.

It's a little tricky to distinguish (in real time, anyway) between abnormal 
exits and long-running cron jobs, though in the former case you're likely to 
see other messages as well, I think.

If you see that message a lot, and you suspect that you might just have a 
long-running cron job, try scheduling it less frequently (every 5 or 10 
minutes, maybe) and see if it goes away.

Assuming you're running hardcron, you might also do a ps and see whether you've 
got a lot of web2py processes running; that would be a bad sign.

 
 On Nov 20, 6:04 am, leone handja...@gmail.com wrote:
 Hi,
 what means WARNING:web2py.cron:WEB2PY CRON: Stale cron.master
 detected?
 My crontab:
 #crontab
 1 * * * * root *plugin_CRONTAB/test
 
 (ubuntu os, last rel web2py)
 Thanks in advance




[web2py] Re: Catch IntegrityError

2010-11-20 Thread CesarBustios
Mmmm i don't have the application right now but i'll let you know as
soon as possible. I asume that its because of the IS_NOT_IN_DB()
requirement, i let the application rise the error on purpose so i can
catch it but i dont know how to do that

mdipierro ha escrito:
 Can you show us the traceback?

 On Nov 19, 5:52 pm, CesarBustios cesarbust...@gmail.com wrote:
  Hi! Please, how can i catch IntegrityError im trying with from pyodbc
  import IntegrityError but is not working.
 
  Thanks!


[web2py] Re: cron

2010-11-20 Thread leone
Thanks.
I discovered an error in script, as probable cause of that warning.
I will follow your suggests!
leone

On Nov 20, 5:12 pm, Jonathan Lundell jlund...@pobox.com wrote:
 On Nov 20, 2010, at 6:43 AM, mdipierro wrote:



  Not 100% sure but I think this means that a cron task did not complete
  or exited abnormally.

 Right: still running after 60+ seconds.

 It's a little tricky to distinguish (in real time, anyway) between abnormal 
 exits and long-running cron jobs, though in the former case you're likely to 
 see other messages as well, I think.

 If you see that message a lot, and you suspect that you might just have a 
 long-running cron job, try scheduling it less frequently (every 5 or 10 
 minutes, maybe) and see if it goes away.

 Assuming you're running hardcron, you might also do a ps and see whether 
 you've got a lot of web2py processes running; that would be a bad sign.









  On Nov 20, 6:04 am, leone handja...@gmail.com wrote:
  Hi,
  what means WARNING:web2py.cron:WEB2PY CRON: Stale cron.master
  detected?
  My crontab:
  #crontab
  1 * * * * root *plugin_CRONTAB/test

  (ubuntu os, last rel web2py)
  Thanks in advance


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
On Sat, Nov 20, 2010 at 5:03 PM, Joel Clay ra3do...@gmail.com wrote:
 There are more than two solutions in this thread, I challenge you to read
 through and prove me wrong.

I don't even need to look around. You had a trash can solution. And
another trash can solution. And a few more trash can solutions. It's
like a difference between a for loop and list comprehensions.

 I started the original thread not because there was a problem with
 accidental deletion, it was because seeing a whole page full of red X's is
 distracting for many, it just isn't appealing. Don't get me wrong, I do like

Did this problem prevent you from using the admin UI as it was intended?


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Model scope

2010-11-20 Thread Lorin Rivers
For some reason, a model in default/db.py wasn't loading, but after I copied 
over to another file in the models directory, it worked fine.

If I have a reports controller, a reports view, and a reports model, /reports/ 
is the only place that model will be available, right?

A model in defaults SHOULD be available globally, correct?

Also, what is the procedure for debugging a problem where a model won't load 
and the migrations don't take effect?

Thanks!
-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




Re: [web2py] Re: DAL to Qurey Multiple defined IDs?

2010-11-20 Thread Lorin Rivers
It is in the book:
http://web2py.com/book/default/chapter/06#Logical-Operators

On Nov 19, 2010, at 20:00 , Bruno Rocha wrote:

 Not mentioned in the book that you can get the NOT IN SQL expression
 
 my_list = [1,2,3,4]
 
 NOT IN LIST: db(~(db.product.id.belongs(my_list))).select()
 
 IN LIST: db(db.product.id.belongs(my_list)).select()
 
 
 2010/11/19 Bruno Rocha rochacbr...@gmail.com
 
 http://web2py.com/book/default/chapter/06#belongs
 
 
 
 2010/11/19 Phyo Arkar phyo.arkarl...@gmail.com
 
 GOT IT
 
 db.table.key.belongs
 
 
 I cant find it in web2py book is there is?
 
 
 On Sat, Nov 20, 2010 at 8:11 AM, Phyo Arkar phyo.arkarl...@gmail.comwrote:
 
 This can be done in Query easily as
 
 SELECT * FROM table WHERE table.id IN (1,2,4,5)
 
 Theres no DAL equvlient ?  i have to execute SQL?
 
 
 On Sat, Nov 20, 2010 at 8:00 AM, Phyo Arkar 
 phyo.arkarl...@gmail.comwrote:
 
 Eratta :
 
 
 
 
 to_get=[1,2,4,5]
 
 q= db.casedb.id in to_get # Guess this wont work?
 
 db(q).select(db.casedb.ALL)
 
 On Sat, Nov 20, 2010 at 7:54 AM, Phyo Arkar 
 phyo.arkarl...@gmail.comwrote:
 
 
 to_get=[1,2,4,5]
 
 q= db.casedb.id in toget
 db(q).select(db.casedb.ALL)
 
 
 
 
 
 
 
 --
 
 Bruno Rocha
 http://about.me/rochacbruno/bio
 
 
 
 
 -- 
 
 Bruno Rocha
 http://about.me/rochacbruno/bio

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




Re: [web2py] edit the book, get a free book

2010-11-20 Thread Lorin Rivers
You know, a comment feature would be really awesome for the online version of 
the book, like the PHP online docs have.

One thing (as I mentioned earlier) that I think would be super helpful would be 
more examples of SQL translated to DAL. I know SQL pretty well and often test 
what I want to achieve in web2py with SQL.

On Nov 18, 2010, at 20:32 , mdipierro wrote:

 If you have time to go over the last 1-2 months of emails and
 suggested book corrections and implement them in the book, I will send
 you a free printed version of the book.
 
 Please if you can do it, let us know in this thread to avoid
 duplication of work.
 
 The first responder gets the job.
 
 Massimo

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
And here's the tool-tip for the test icon (delete icon has a similar tooltip).

On Sat, Nov 20, 2010 at 6:09 PM, Branko Vukelic bg.bra...@gmail.com wrote:
 On Sat, Nov 20, 2010 at 9:31 AM, annet annet.verm...@gmail.com wrote:
 Personally, I like the icons webfaction is using, consistent styling
 and a clear meaning.

 I've taken a look at webfaction's screencast. This set of icons might
 be something along those lines.

 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group




-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group
attachment: test_tooltip.png

Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Luis Díaz
+1
-- 
Díaz Luis
TSU Analisis de Sistemas
Universidad de Carabobo

http://web2pyfacil.blogspot.com/
Facultad de 
Odontologíahttp://www.odontologia.uc.edu.ve/index.php?option=com_contentview=articleid=102Itemid=85


[web2py] Questions about sets

2010-11-20 Thread Lorin Rivers
Are delete,  update the only the only database modification methods in set?

Can I do something like compute a value from information in a record in a set 
and update a field in that set with that info?

For example, my records include a string field which stores a date string and I 
want to update a field with the datetime calculated from that string.

Set operations are so fast and rows, not nearly as. It would be awesome if I 
could do some of this stuff in the set.

Thanks!
-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




[web2py] Re: Questions about sets

2010-11-20 Thread mdipierro
something like this?

db(query).update(field1=db.table.field2+db.table.field3)

Massimo

On Nov 20, 11:27 am, Lorin Rivers lriv...@mosasaur.com wrote:
 Are delete,  update the only the only database modification methods in set?

 Can I do something like compute a value from information in a record in a set 
 and update a field in that set with that info?

 For example, my records include a string field which stores a date string and 
 I want to update a field with the datetime calculated from that string.

 Set operations are so fast and rows, not nearly as. It would be awesome if I 
 could do some of this stuff in the set.

 Thanks!
 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)


[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Anthony
+1. Very nice.

On Nov 20, 12:09 pm, Branko Vukelic bg.bra...@gmail.com wrote:
 On Sat, Nov 20, 2010 at 9:31 AM, annet annet.verm...@gmail.com wrote:
  Personally, I like the icons webfaction is using, consistent styling
  and a clear meaning.

 I've taken a look at webfaction's screencast. This set of icons might
 be something along those lines.

 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog:http://www.brankovukelic.com/
 Check out my portfolio:http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca:http://identi.ca/foxbunny

 Gimp Brushmakers Guildhttp://bit.ly/gbg-group

  icon_test.png
 188KViewDownload


[web2py] Re: edit the book, get a free book

2010-11-20 Thread Anthony
On Nov 20, 12:07 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 You know, a comment feature would be really awesome for the online version of 
 the book, like the PHP online docs have.

Note, there is a comment feature in the online book -- but you have to
login for it to show up. The comment box is also way down at the
bottom of the page (that worked better when each chapter was divided
into multiple shorter web pages, so comments were more easily noticed
and applied only to a specific section within a chapter).


[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread annet
Hi Branko,

Indeed very nice. What about replacing the edit button with a similar
icon? One with a pencil perhaps?? That would give the three options a
more consistent look and feel.


Regards,

Annet


[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread mdipierro
I have objected to that in the past since the edit functionality is
the most important and visible to new users.

On Nov 20, 12:15 pm, annet annet.verm...@gmail.com wrote:
 Hi Branko,

 Indeed very nice. What about replacing the edit button with a similar
 icon? One with a pencil perhaps?? That would give the three options a
 more consistent look and feel.

 Regards,

 Annet


Re: [web2py] Re: Questions about sets

2010-11-20 Thread Lorin Rivers
What about using a function? I need run db.table.field through split (the time 
part has too many decimal places) and then convert from string to time

Here's what I tried:
db4((db4.data_table.ReqTime =2010-11-08T22:09:00)  (db4.data_table.ReqTime 
 2010-11-08T22:09:10)  (db4.data_table.MacAddr == 
00DF)).update(db4.data_table.FreezeTime=datetime.strptime(db4.data_table.ReqTime.split(.)[0],
 %Y-%m-%dT%H:%M:%S))

and got:
AttributeError: 'Field' object has no attribute 'split'

On Nov 20, 2010, at 11:40 , mdipierro wrote:

 something like this?
 
 db(query).update(field1=db.table.field2+db.table.field3)
 
 Massimo
 

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread António Ramos
Hello, i suggest to keep the admin interface quest open because for someone
entering web2py for the first time its the most important thing.
Maybe a contest for the best admin interface? and a price for the winner
too.
The framework is fantastic, i discovered python and i love it. So i went
looking for web frameworks and naturally django. It happens that i hated
django, so many typing seemed pre historic. How can someone love that? Even
Rails seemed to be more interesting. Hu :P

So for the people who are involved in web2py all my best wishes for the
inovation. Good work guys!!

For the admin part i think its a great job and for my experience i have only
this to point:

I hate having to scroll down the page. The models, views and controllers
should be, maybe disposed horizontally or when you open for ex the tab
controllers the others close so you dont have to scroll down and
everything is in the same page. Like the jquery accordeon.
This way welcome app for example would fit all in your screen.

What do you think?
PS. the delete icon problem is also the edit icon problem, soo many
repititions in the screen is not visually nice.
You should solve this in a simple way whatever that be

What about a right click menu over the files with
delete,install,uninstall,etc as a sub menu. The page would look a lot more
simple.

I´m nobody but a fan of web2py so dont take me wrong.


António


2010/11/20 mdipierro mdipie...@cs.depaul.edu

 I have objected to that in the past since the edit functionality is
 the most important and visible to new users.

 On Nov 20, 12:15 pm, annet annet.verm...@gmail.com wrote:
  Hi Branko,
 
  Indeed very nice. What about replacing the edit button with a similar
  icon? One with a pencil perhaps?? That would give the three options a
  more consistent look and feel.
 
  Regards,
 
  Annet



[web2py] Re: edit the book, get a free book

2010-11-20 Thread GoldenTiger
 Note, there is a comment feature in the online book -- but you have to

Yes, but if you read User Agreement at login :
Please read agreement below. By logging you accept the agreement.

THIS IS NOT A PLACE TO ASK QUESTIONS, SUBMIT BUGS OR COMPLAINTS. If
you have a quesiton ask on the Google Group. Bug reports should be
submitted to Google code. For complaints email the author. If you open
here a wiki page or a thread discussion with a question or a complaint
you will be banned. 


[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Anthony
On Nov 20, 1:44 pm, António Ramos ramstei...@gmail.com wrote:
 I hate having to scroll down the page. The models, views and controllers
 should be, maybe disposed horizontally or when you open for ex the tab
 controllers the others close so you dont have to scroll down and
 everything is in the same page. Like the jquery accordeon.
 This way welcome app for example would fit all in your screen.

The collapse/expand all button should be adequate to quickly hide
everything -- then you can reveal just what you want. The current
system is flexible because it allows you to have two or more sections
revealed at once, which can be useful sometimes. I think what you're
suggesting is that only one section could ever be viewed at a time,
but that seems overly rigid.

 PS. the delete icon problem is also the edit icon problem, soo many
 repititions in the screen is not visually nice.
 You should solve this in a simple way whatever that be

 What about a right click menu over the files with
 delete,install,uninstall,etc as a sub menu. The page would look a lot more
 simple.

We're probably mostly editing files, so it's nice to have a single
click to start editing (i.e., like the current edit button) rather
than having to right-click first.

Anthony


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread António Ramos
no, what i meant was that the edit should be the url itself or the button,
other options should be in the right click because they are less important

Best regards
António

2010/11/20 Anthony abasta...@gmail.com

 On Nov 20, 1:44 pm, António Ramos ramstei...@gmail.com wrote:
  I hate having to scroll down the page. The models, views and controllers
  should be, maybe disposed horizontally or when you open for ex the tab
  controllers the others close so you dont have to scroll down and
  everything is in the same page. Like the jquery accordeon.
  This way welcome app for example would fit all in your screen.

 The collapse/expand all button should be adequate to quickly hide
 everything -- then you can reveal just what you want. The current
 system is flexible because it allows you to have two or more sections
 revealed at once, which can be useful sometimes. I think what you're
 suggesting is that only one section could ever be viewed at a time,
 but that seems overly rigid.

  PS. the delete icon problem is also the edit icon problem, soo many
  repititions in the screen is not visually nice.
  You should solve this in a simple way whatever that be
 
  What about a right click menu over the files with
  delete,install,uninstall,etc as a sub menu. The page would look a lot
 more
  simple.

 We're probably mostly editing files, so it's nice to have a single
 click to start editing (i.e., like the current edit button) rather
 than having to right-click first.

 Anthony


Re: [web2py] Re: Questions about sets

2010-11-20 Thread CesarBustios
Did you try converting the Field to string?

str(db4.data_table.ReqTime).split(.)[0]

Lorin Rivers ha escrito:
 What about using a function? I need run db.table.field through split (the 
 time part has too many decimal places) and then convert from string to time

 Here's what I tried:
 db4((db4.data_table.ReqTime =2010-11-08T22:09:00)  
 (db4.data_table.ReqTime  2010-11-08T22:09:10)  (db4.data_table.MacAddr == 
 00DF)).update(db4.data_table.FreezeTime=datetime.strptime(db4.data_table.ReqTime.split(.)[0],
  %Y-%m-%dT%H:%M:%S))

 and got:
 AttributeError: 'Field' object has no attribute 'split'

 On Nov 20, 2010, at 11:40 , mdipierro wrote:

  something like this?
 
  db(query).update(field1=db.table.field2+db.table.field3)
 
  Massimo
 

 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)


[web2py] Re: edit the book, get a free book

2010-11-20 Thread Anthony
On Nov 20, 2:23 pm, GoldenTiger goldenboy...@gmail.com wrote:
  Note, there is a comment feature in the online book -- but you have to

 Yes, but if you read User Agreement at login :
 Please read agreement below. By logging you accept the agreement.

 THIS IS NOT A PLACE TO ASK QUESTIONS, SUBMIT BUGS OR COMPLAINTS. If
 you have a quesiton ask on the Google Group. Bug reports should be
 submitted to Google code. For complaints email the author. If you open
 here a wiki page or a thread discussion with a question or a complaint
 you will be banned. 

Yes, good point. The current comment feature is not intended for some
of the uses we've been discussing in this thread, such as reporting
errors in the book. I think it would be OK for a comment to (a)
correct something in the text or (b) add to the documentation (neither
of those is a question, bug report, or complaint) -- but the problem
is that there is currently no process for using those comments to
prompt revisions in the main text (i.e., the book editors may not be
aware of a given comment and therefore may not do anything about it).
We need a better system for that (as already discussed in this
thread).

Anthony


Re: [web2py] Re: Questions about sets

2010-11-20 Thread Lorin Rivers
What do you mean? The field ReqTime is defined as a string:

 db4.data_table[78978]
Row {'MacAddr': '00D1', 'update_record': function lambda at 
0x101cc9a28, 'Vi': 34.88671875, 'StringID': 'S0003', 'Vstring': 24.0, 
'Vo': 36.41015625, 'Ii': 1.61328125, 'Io': 1.4921875, 'RollupId': None, 'Po': 
54.330780029296903, 'ResTime': '2010-11-08T22:09:00.382999897', 'Pi': 
56.282089233398402, 'ReqTime': '2010-11-08T22:09:00.28292', 'id': 78978, 
'delete_record': function lambda at 0x101cc9b90, 'FreezeTime': None}
 type(row.ReqTime)
type 'str'


On Nov 20, 2010, at 13:36 , CesarBustios wrote:

 Did you try converting the Field to string?
 
 str(db4.data_table.ReqTime).split(.)[0]
 
 Lorin Rivers ha escrito:
 What about using a function? I need run db.table.field through split (the 
 time part has too many decimal places) and then convert from string to time
 
 Here's what I tried:
 db4((db4.data_table.ReqTime =2010-11-08T22:09:00)  
 (db4.data_table.ReqTime  2010-11-08T22:09:10)  (db4.data_table.MacAddr 
 == 
 00DF)).update(db4.data_table.FreezeTime=datetime.strptime(db4.data_table.ReqTime.split(.)[0],
  %Y-%m-%dT%H:%M:%S))
 
 and got:
 AttributeError: 'Field' object has no attribute 'split'
 
 On Nov 20, 2010, at 11:40 , mdipierro wrote:
 
 something like this?
 
 db(query).update(field1=db.table.field2+db.table.field3)
 
 Massimo
 
 
 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




[web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Anthony
On Nov 20, 2:34 pm, António Ramos ramstei...@gmail.com wrote:
 no, what i meant was that the edit should be the url itself or the button,
 other options should be in the right click because they are less important

That makes sense, though we'd want to make sure it's very clear that
there are some right-click options available, as that may not be
obvious. I suppose an alternative might be a file icon that you left
click and get options to read, edit, test, delete (in addition,
clicking the filename itself would go right into editing, as you
suggest).

Anthony


Re: [web2py] ERP projects

2010-11-20 Thread Michele Comitini
Mariano,

+1

This project can be very important to make web2py look even more
appealing to the business world.
I would like to help.

mic


2010/11/19 Mariano Reingart reing...@gmail.com:
 Yes, I agree, development will be done in english, look at this
 facturalibre branch:

 http://code.google.com/p/gestionlibre/source/browse/?r=2ecd5bfdd8378bedf65737d3b99863a77275edcf

 The default branch is a early version migrated from a current
 database without translation, just to get something to start with and
 to see the whole model, it even doesn't compile.

 Anyway, there are terms that doesn't have an exact translation to
 english, I'm using whose  have the closest meaning, and help from
 anglosaxon accountants (and from other countries too) will be very
 useful.

 Best regards,

 Mariano Reingart
 http://www.sistemasagiles.com.ar
 http://reingart.blogspot.com

 On Fri, Nov 19, 2010 at 12:41 PM, Bruno Rocha rochacbr...@gmail.com wrote:
 Nice! I think I can contribute.
 But, One problem I found in your models, is the tables and fields being
 named in Spanish.  As English is an IT Universal Language, I guess some
 people will find difficult to mantain, contribute and extend the system
 because of Spanish models.
 I started a Scrum Management System, and when the project was almost done, I
 figured out that my table names and even function names was in Portuguese,
 so I started the translation to English.
 Think about it.
 2010/11/19 Mariano Reingart reing...@gmail.com

 We are making an ERP-like system too:
 http://code.google.com/p/gestionlibre/source/browse/ABOUT

 Initial model is almost done, now I'm focused on basic controllers to
 register invoices, receipts and so on (sales)

 This ERP is based on a previous system done in VisualBasic (following
 double-entry bookkeeping accounting standards), with a past experience
 of more than 10 years and around a hundred of clients.

 We are looking for interested people, and mainly, we need some funding
 to develop this app, altought we have the design and prototypes
 working, the development is a big effort.

 If anyone else is working in similar projects, maybe we can join or
 share experiences,

 Best regards

 Mariano Reingart
 http://www.sistemasagiles.com.ar
 http://reingart.blogspot.com



 On Fri, Nov 19, 2010 at 2:27 AM, mdipierro mdipie...@cs.depaul.edu
 wrote:
  am I?
 
  I want to know more about the ERP? Looks like we are going to have 3
  ERPs!
 
  On Nov 18, 9:53 pm, yamandu yamandu.co...@gmail.com wrote:
  Massimo, you are funny (Yes, you!).
 
  Should I list the ERP I have started as project?
 



 --

 Bruno Rocha
 http://about.me/rochacbruno/bio




Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Michele Comitini
2010/11/19 Niphlod niph...@gmail.com:
 the only thing on multiprocessing's queue that I don't like (it's not
 its fault, but psycopg's one) is that I have to create multiple
 connections (one for every process) to the database.
Not a psycopg fault, it is the way PostgreSQL work, and it is very well thought.

http://www.postgresql.org/docs/9.0/static/connect-estab.html reads:

PostgreSQL is implemented using a simple process per user
client/server model.


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
On Sat, Nov 20, 2010 at 8:29 PM, Anthony abasta...@gmail.com wrote:
 What about a right click menu over the files with
 delete,install,uninstall,etc as a sub menu. The page would look a lot more
 simple.

 We're probably mostly editing files, so it's nice to have a single
 click to start editing (i.e., like the current edit button) rather
 than having to right-click first.

There's another solution, and that's to display a toolbar when you
hover over the file name. This would probably work better if the files
looked like icons, as that would suggest the need for mouse
interaction. Since the three controls (edit, delete, test) are all in
a common block level element, this is very cheap to implement. The
only concern I have is whether this would prolong discovery of the
features.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] better keywords comics

2010-11-20 Thread Michele Comitini
+1

Terrific! I contains such a huge number of concepts in just one page!

;-) If I were new to web2py it would scare me!  Now it just caused me
a headache ;-)

2010/11/20 mdipierro mdipie...@cs.depaul.edu:
 http://web2py.com/examples/static/web2py_keywords_comics.png


[web2py] Re: Questions about sets

2010-11-20 Thread mdipierro
no no no.

db(query).update(field=expression)

expression is not a python expression but an DAL expression that gets
translated into SQL.

This is wrong

 
db4.data_table.FreezeTime=datetime.strptime(db4.data_table.ReqTime.split(.)
[0], %Y-%m-%dT%H:%M:%S)

because it assumes it gets evaluated by Python and not by the
database.

The only operators that web2py DAL can stranlated into SQL are those
supported by SQL:

a=b+c
a=b-c
a=b*c
a=b/c
a=b[c:d]
a=b.year()
a=b.day()
a=b.month()
a=b.hour()
a=b.minutes()
a=b.seconds()

and combinations therefore.

You can also do

from gluon.sql import Expression
db(...).update(field=Expression('...sql expression..')

and you can use any sql expression.

This is documented in the book.





On Nov 20, 12:43 pm, Lorin Rivers lriv...@mosasaur.com wrote:
 What about using a function? I need run db.table.field through split (the 
 time part has too many decimal places) and then convert from string to time

 Here's what I tried:
 db4((db4.data_table.ReqTime =2010-11-08T22:09:00)  
 (db4.data_table.ReqTime  2010-11-08T22:09:10)  (db4.data_table.MacAddr == 
 00DF)).update(db4.data_table.FreezeTime=datetime.strptime(db4.data_table.ReqTime.split(.)[0],
  %Y-%m-%dT%H:%M:%S))

 and got:
 AttributeError: 'Field' object has no attribute 'split'

 On Nov 20, 2010, at 11:40 , mdipierro wrote:

  something like this?

  db(query).update(field1=db.table.field2+db.table.field3)

  Massimo

 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)


Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
Yes massimo

Here is my current implementation , please note i use it outside of
web2py and call it via subprocess . And it is quite crude and dirty ,
need to modify for using outside of my script.

What it does : it accepts a list of files (file_list) and the function
object (toprocess)  , and according to sweetspot i found in the
maching (best number of process to run) i modify number of splits to
distribute workload across.

I have not tried inside web2py as one wierdness of multiprocessing requires
 if __name__=__main__


def task_splitter( files_list ,toprocess ):
from multiprocessing import Process, Queue
if len(files_list)=16*16:
splits = 16
elif len(files_list)=64:
splits =8
elif len(files_list)=16:
splits =4
elif len(files_list)16:
splits=1
n = len( files_list ) / splits
processes = []
ql = []

for i in range( 0, splits ):
que = Queue()
if i == splits - 1:
# len( files_list )
processes.append( [Process( target = toprocess, args = (
files_list, que) ), que] )
else:
# len( files_list )
processes.append( [Process( target = toprocess, args = (
files_list[0:n], que ) ), que] )
files_list = files_list[n:]
processes[i][0].start()

for p in processes:
ql.append( p[1].get() )
p[0].join()

flat_q = []
for q in ql:
flat_q += q


# End , Returning

return flat_q


On 11/19/10, mdipierro mdipie...@cs.depaul.edu wrote:
 Do you have an example...?



 On Nov 18, 9:16 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
 i use Multiprocessing's Queue across processess which works to parse
 huge list of files and communicate back with database. they work
 great.

 On 11/19/10, Pystar aitoehi...@gmail.com wrote:

  I would like to know if any one here has used any message queue? and
  which one comes recommended?




Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
Wow

celery is freaking awesome!

http://pypi.python.org/pypi/celery/2.1.3#example

I think we need it in web2py!. all other web frameworks have it now!.

On 11/19/10, Niphlod niph...@gmail.com wrote:
 the only thing on multiprocessing's queue that I don't like (it's not
 its fault, but psycopg's one) is that I have to create multiple
 connections (one for every process) to the database.

 Multiprocessing's queue, threading one, deque are where you end up
 with your hands dirty 
 if you need persistence and security usually you need to :
 - take the message and store somewhere (table called queued ? )
 - give it an uuid
 - prepare a field in result store (usually a table, uuid and blob
 columns)
 - someone reading the queued shot an update to that result store
 when it has the result
 - retrieve results, send it away and/or delete it from pool comparing
 with the queued tables as soon as possible

 If you are not a persistent maniac, you can always store the message
 in a deque, pop() it and you're done!

 I found myself in one or two cases facing some issues and for the next
 time I'm going to have a look to pyres seems nice, simple, and stable,
 and ultimately nicer to hack in the code, said a friend of mine) and
 if I don't make it I'm going to learn celery one time for all (seems
 the best implementation out there) .



 On 19 Nov, 04:26, mdipierro mdipie...@cs.depaul.edu wrote:
 Do you have an example...?

 On Nov 18, 9:16 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:



  i use Multiprocessing's Queue across processess which works to parse
  huge list of files and communicate back with database. they work
  great.

  On 11/19/10, Pystar aitoehi...@gmail.com wrote:

   I would like to know if any one here has used any message queue? and
   which one comes recommended?- Nascondi testo citato

 - Mostra testo citato -


[web2py] Re: better keywords comics

2010-11-20 Thread Christopher Steel
I like

C.

On Nov 19, 10:42 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 http://web2py.com/examples/static/web2py_keywords_comics.png


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread António Ramos
i got for that one.

A much cleaner workspace is better for future evolution .
Also the discovery of features is a natural process of web apps and only
hurts the first time. After that everybody will say:
That is nice, a lot better than before.
Its like a loop where you use ony one variable instead of copying and paste
several times and have to use  many variables.
Simple is Better!



Regards

António


2010/11/20 Branko Vukelic bg.bra...@gmail.com

 On Sat, Nov 20, 2010 at 8:29 PM, Anthony abasta...@gmail.com wrote:
  What about a right click menu over the files with
  delete,install,uninstall,etc as a sub menu. The page would look a lot
 more
  simple.
 
  We're probably mostly editing files, so it's nice to have a single
  click to start editing (i.e., like the current edit button) rather
  than having to right-click first.

 There's another solution, and that's to display a toolbar when you
 hover over the file name. This would probably work better if the files
 looked like icons, as that would suggest the need for mouse
 interaction. Since the three controls (edit, delete, test) are all in
 a common block level element, this is very cheap to implement. The
 only concern I have is whether this would prolong discovery of the
 features.

 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group



[web2py] graph node python

2010-11-20 Thread Luis Díaz
+1

http://nodebox.net/code/index.php/Boost_Graph


-- 
Díaz Luis
TSU Analisis de Sistemas
Universidad de Carabobo

http://web2pyfacil.blogspot.com/
Facultad de 
Odontologíahttp://www.odontologia.uc.edu.ve/index.php?option=com_contentview=articleid=102Itemid=85


Re: [web2py] Re: New Admin Design: Suggested Improvement

2010-11-20 Thread Branko Vukelic
2010/11/20 António Ramos ramstei...@gmail.com:
 hurts the first time. After that everybody will say:
 That is nice, a lot better than before.

... or they might say I couldn't figure this out the very first time
I've tried. Could you please completely change it to fit my way of
thinking? as it happens sometimes. :)

I'll open a new topic for further admin UI development, though. So
join me there.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Michele Comitini
+1



2010/11/20 Phyo Arkar phyo.arkarl...@gmail.com:
 Wow

 celery is freaking awesome!

 http://pypi.python.org/pypi/celery/2.1.3#example

 I think we need it in web2py!. all other web frameworks have it now!.

 On 11/19/10, Niphlod niph...@gmail.com wrote:
 the only thing on multiprocessing's queue that I don't like (it's not
 its fault, but psycopg's one) is that I have to create multiple
 connections (one for every process) to the database.

 Multiprocessing's queue, threading one, deque are where you end up
 with your hands dirty 
 if you need persistence and security usually you need to :
 - take the message and store somewhere (table called queued ? )
 - give it an uuid
 - prepare a field in result store (usually a table, uuid and blob
 columns)
 - someone reading the queued shot an update to that result store
 when it has the result
 - retrieve results, send it away and/or delete it from pool comparing
 with the queued tables as soon as possible

 If you are not a persistent maniac, you can always store the message
 in a deque, pop() it and you're done!

 I found myself in one or two cases facing some issues and for the next
 time I'm going to have a look to pyres seems nice, simple, and stable,
 and ultimately nicer to hack in the code, said a friend of mine) and
 if I don't make it I'm going to learn celery one time for all (seems
 the best implementation out there) .



 On 19 Nov, 04:26, mdipierro mdipie...@cs.depaul.edu wrote:
 Do you have an example...?

 On Nov 18, 9:16 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:



  i use Multiprocessing's Queue across processess which works to parse
  huge list of files and communicate back with database. they work
  great.

  On 11/19/10, Pystar aitoehi...@gmail.com wrote:

   I would like to know if any one here has used any message queue? and
   which one comes recommended?- Nascondi testo citato

 - Mostra testo citato -



Re: [web2py] graph node python

2010-11-20 Thread António Ramos
Only for mac :(

Go for
http://www.graphviz.org/Gallery.php


2010/11/20 Luis Díaz diazluis2...@gmail.com

 +1

 http://nodebox.net/code/index.php/Boost_Graph


 --
 Díaz Luis
 TSU Analisis de Sistemas
 Universidad de Carabobo

 http://web2pyfacil.blogspot.com/
 Facultad de 
 Odontologíahttp://www.odontologia.uc.edu.ve/index.php?option=com_contentview=articleid=102Itemid=85




Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
One thing i am not clear about celery

It needs a MQ Backend to installed and configured right? (RabbitMQ,Redis)
etc ?
They are whole new thing for me and they are Java/C  , so much dependencies.

Please  Celerify lol :D

On Sun, Nov 21, 2010 at 4:17 AM, Michele Comitini 
michele.comit...@gmail.com wrote:

 +1



 2010/11/20 Phyo Arkar phyo.arkarl...@gmail.com:
  Wow
 
  celery is freaking awesome!
 
  http://pypi.python.org/pypi/celery/2.1.3#example
 
  I think we need it in web2py!. all other web frameworks have it now!.
 
  On 11/19/10, Niphlod niph...@gmail.com wrote:
  the only thing on multiprocessing's queue that I don't like (it's not
  its fault, but psycopg's one) is that I have to create multiple
  connections (one for every process) to the database.
 
  Multiprocessing's queue, threading one, deque are where you end up
  with your hands dirty 
  if you need persistence and security usually you need to :
  - take the message and store somewhere (table called queued ? )
  - give it an uuid
  - prepare a field in result store (usually a table, uuid and blob
  columns)
  - someone reading the queued shot an update to that result store
  when it has the result
  - retrieve results, send it away and/or delete it from pool comparing
  with the queued tables as soon as possible
 
  If you are not a persistent maniac, you can always store the message
  in a deque, pop() it and you're done!
 
  I found myself in one or two cases facing some issues and for the next
  time I'm going to have a look to pyres seems nice, simple, and stable,
  and ultimately nicer to hack in the code, said a friend of mine) and
  if I don't make it I'm going to learn celery one time for all (seems
  the best implementation out there) .
 
 
 
  On 19 Nov, 04:26, mdipierro mdipie...@cs.depaul.edu wrote:
  Do you have an example...?
 
  On Nov 18, 9:16 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
 
 
 
   i use Multiprocessing's Queue across processess which works to parse
   huge list of files and communicate back with database. they work
   great.
 
   On 11/19/10, Pystar aitoehi...@gmail.com wrote:
 
I would like to know if any one here has used any message queue?
 and
which one comes recommended?- Nascondi testo citato
 
  - Mostra testo citato -
 



Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Michele Comitini
RabbitMQ seems Erlang a good sign, but add too many dependecies.
Redis is C

If it would be possible to replace sqlalchemy with DAL easily then we
could integrate it,
who is going to investigate?



2010/11/20 Phyo Arkar phyo.arkarl...@gmail.com:
 One thing i am not clear about celery

 It needs a MQ Backend to installed and configured right? (RabbitMQ,Redis)
 etc ?
 They are whole new thing for me and they are Java/C  , so much dependencies.

 Please  Celerify lol :D

 On Sun, Nov 21, 2010 at 4:17 AM, Michele Comitini
 michele.comit...@gmail.com wrote:

 +1



 2010/11/20 Phyo Arkar phyo.arkarl...@gmail.com:
  Wow
 
  celery is freaking awesome!
 
  http://pypi.python.org/pypi/celery/2.1.3#example
 
  I think we need it in web2py!. all other web frameworks have it now!.
 
  On 11/19/10, Niphlod niph...@gmail.com wrote:
  the only thing on multiprocessing's queue that I don't like (it's not
  its fault, but psycopg's one) is that I have to create multiple
  connections (one for every process) to the database.
 
  Multiprocessing's queue, threading one, deque are where you end up
  with your hands dirty 
  if you need persistence and security usually you need to :
  - take the message and store somewhere (table called queued ? )
  - give it an uuid
  - prepare a field in result store (usually a table, uuid and blob
  columns)
  - someone reading the queued shot an update to that result store
  when it has the result
  - retrieve results, send it away and/or delete it from pool comparing
  with the queued tables as soon as possible
 
  If you are not a persistent maniac, you can always store the message
  in a deque, pop() it and you're done!
 
  I found myself in one or two cases facing some issues and for the next
  time I'm going to have a look to pyres seems nice, simple, and stable,
  and ultimately nicer to hack in the code, said a friend of mine) and
  if I don't make it I'm going to learn celery one time for all (seems
  the best implementation out there) .
 
 
 
  On 19 Nov, 04:26, mdipierro mdipie...@cs.depaul.edu wrote:
  Do you have an example...?
 
  On Nov 18, 9:16 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
 
 
 
   i use Multiprocessing's Queue across processess which works to parse
   huge list of files and communicate back with database. they work
   great.
 
   On 11/19/10, Pystar aitoehi...@gmail.com wrote:
 
I would like to know if any one here has used any message queue?
and
which one comes recommended?- Nascondi testo citato
 
  - Mostra testo citato -
 




[web2py] web2py admin 2.0

2010-11-20 Thread Branko Vukelic
This topic is for brainstorming future development of the admin UI.
Please do not report bugs with the current one in this topic, since
its purpose is not fixing the current admin.

Here are a few ideas.

1. Sites section

1.1 Workbench

The workbench would be the space below the current top panel. It would
occupy the entire space below the panel and would contain icons
representing apps, as well as some miscellanous features such as
twitter feed. The admin would be expandable via plugins, and plugins
would provide workbench icons that would appear on the... err...
workbench. :)

1.2 Admin bar

The admin bar would be an extension to the current panel at the top.
It would contain menu items that open modal dialogs containing the
functionality of the items in the current sidebar (web2py update,
creation of new apps, deployment on GAE, etc). The functionality that
is already in the top panel would become part of the admin bar with
the same status (importance) as the ones currently on the sidebar.

1.3 Twitter feed

The twitter feed would be presented as a separate non-modal window
which can be closed (minimized to an icon). This feature will
represent an example of the admin plugin as well, and it should be
developed separately but included by default.

1.4 App icons

The workbench app icons should behave more or less like desktop icons.
Clicking on them opens the design view, and hovering over the icons
opens a toolbar with less commonly used features like packaging and
testing. All apps can have custom 128x128px icons in png format. The
icon can be placed into the app directory as ``appicon.png``. The icon
can also be uploaded at (a) app creation time via the admin bar, or
(b) later via design view, or (c) during creation via the wizard.

2.0 Design window

The design window will be a non-modal window expandable to 100% space
of the workbench. It is has the functionality currently offered by the
design view. The design window will behave much like a desktop IDE. It
will have tabbed edit space, and a file list on the left. The file
list will be a panel that is separated horizontally into two boxes.
The top box (top panel) contains the project tree, and the bottom
panel will contain various information about the file (what method it
exposes, etc). The specific advantage of having a non-modal design
window would be the ability to open multiple design windows at once,
enabling copying of code between projects, etc.

 2.1 Project tree

Project tree is a expandable node system. Multiple root nodes
correspond to current design view subsections (Models, Controllers,
etc). Child nodes correspond to the directory/file hierarchy. Clicking
on the root node expands it or collapses it. Right-clicking the root
node offers options like Expand all children, Collapse, Collapse
all sections, etc. By default, all root nodes are expanded. Child
nodes can be either file nodes or directory nodes. Dir node behaves
the same way as root node. File nodes have a context menu that offers
functionality such as testing, editing, or deletion. Clicking on a
file node updates the info panel (bottom panel). Double clicking the
file node opens it in the editor in the edit panel (right panel).

It would be interesting to see revision control integrated with the
file panel as well.

2.2 Editor panel

The editor panel (edit space) on the right is a tabbed interface
containing the editor of choice. It enables editing of multiple files
and switching between them using the tabs. A tab has an X mark that
allows closing it.

2.3 Design bar

The design bar has the appearance similar to admin bar, but with
options specific to design view. It doesn't replace the admin bar, but
it appears attached to the design window. All design bar functionality
should open non-modal windows of their own. This allows you to, for
example, view the code and the ticket(s) side-by-side, etc. This
philosophy extends to pluigin view as well, so plugin view opens a new
non-modal design window containing the plugin-related functionality.


That's it for now. I'll keep adding things as I think of them.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] graph node python

2010-11-20 Thread Michele Comitini
http://www.rdflib.net/

pure python and very strong for graphs (and fast enough).


2010/11/20 António Ramos ramstei...@gmail.com:
 Only for mac :(

 Go for
 http://www.graphviz.org/Gallery.php

 2010/11/20 Luis Díaz diazluis2...@gmail.com

 +1
 http://nodebox.net/code/index.php/Boost_Graph

 --
 Díaz Luis
 TSU Analisis de Sistemas
 Universidad de Carabobo
 http://web2pyfacil.blogspot.com/
 Facultad de Odontología




[web2py] Re: better keywords comics

2010-11-20 Thread ma...@rockiger.com
Cool stuff.

On 20 Nov., 04:42, mdipierro mdipie...@cs.depaul.edu wrote:
 http://web2py.com/examples/static/web2py_keywords_comics.png


[web2py] Re: web2py admin 2.0

2010-11-20 Thread Branko Vukelic
On Sat, Nov 20, 2010 at 11:12 PM, Branko Vukelic bg.bra...@gmail.com wrote:
 1. Sites section

1.5 Workbench wallpaper

A cosmetic thing, really, but would make it more desktop-like. :)

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
Here is what i found from : http://celeryq.org/docs/configuration.html


By default it dont need any MQ Brokers , works via database backend which is
supported by SQLAlchemy. ALso can use memcache .


   - database (default)

   Use a relational database supported by SQLAlchemyhttp://sqlalchemy.org/.
   See *Database backend
settings*http://celeryq.org/docs/configuration.html#conf-database-result-backend
   .
- cache

   Use memcached http://memcached.org/ to store the results. See *Cache
   backend 
settings*http://celeryq.org/docs/configuration.html#conf-cache-result-backend
   .


We can easily make it work as it from memcached i think , and DAL wont be
hard!

On Sun, Nov 21, 2010 at 4:40 AM, Michele Comitini 
michele.comit...@gmail.com wrote:

 RabbitMQ seems Erlang a good sign, but add too many dependecies.
 Redis is C

 If it would be possible to replace sqlalchemy with DAL easily then we
 could integrate it,
 who is going to investigate?



 2010/11/20 Phyo Arkar phyo.arkarl...@gmail.com:
  One thing i am not clear about celery
 
  It needs a MQ Backend to installed and configured right? (RabbitMQ,Redis)
  etc ?
  They are whole new thing for me and they are Java/C  , so much
 dependencies.
 
  Please  Celerify lol :D
 
  On Sun, Nov 21, 2010 at 4:17 AM, Michele Comitini
  michele.comit...@gmail.com wrote:
 
  +1
 
 
 
  2010/11/20 Phyo Arkar phyo.arkarl...@gmail.com:
   Wow
  
   celery is freaking awesome!
  
   http://pypi.python.org/pypi/celery/2.1.3#example
  
   I think we need it in web2py!. all other web frameworks have it now!.
  
   On 11/19/10, Niphlod niph...@gmail.com wrote:
   the only thing on multiprocessing's queue that I don't like (it's not
   its fault, but psycopg's one) is that I have to create multiple
   connections (one for every process) to the database.
  
   Multiprocessing's queue, threading one, deque are where you end up
   with your hands dirty 
   if you need persistence and security usually you need to :
   - take the message and store somewhere (table called queued ? )
   - give it an uuid
   - prepare a field in result store (usually a table, uuid and blob
   columns)
   - someone reading the queued shot an update to that result store
   when it has the result
   - retrieve results, send it away and/or delete it from pool comparing
   with the queued tables as soon as possible
  
   If you are not a persistent maniac, you can always store the
 message
   in a deque, pop() it and you're done!
  
   I found myself in one or two cases facing some issues and for the
 next
   time I'm going to have a look to pyres seems nice, simple, and
 stable,
   and ultimately nicer to hack in the code, said a friend of mine)
 and
   if I don't make it I'm going to learn celery one time for all (seems
   the best implementation out there) .
  
  
  
   On 19 Nov, 04:26, mdipierro mdipie...@cs.depaul.edu wrote:
   Do you have an example...?
  
   On Nov 18, 9:16 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
  
  
  
i use Multiprocessing's Queue across processess which works to
 parse
huge list of files and communicate back with database. they work
great.
  
On 11/19/10, Pystar aitoehi...@gmail.com wrote:
  
 I would like to know if any one here has used any message queue?
 and
 which one comes recommended?- Nascondi testo citato
  
   - Mostra testo citato -
  
 
 



Re: [web2py] Re: better keywords comics

2010-11-20 Thread Phyo Arkar
+1

Nice!

On Sun, Nov 21, 2010 at 4:44 AM, ma...@rockiger.com rocki...@googlemail.com
 wrote:

 Cool stuff.

 On 20 Nov., 04:42, mdipierro mdipie...@cs.depaul.edu wrote:
  http://web2py.com/examples/static/web2py_keywords_comics.png



Re: [web2py] Re: DAL to Qurey Multiple defined IDs?

2010-11-20 Thread Phyo Arkar
Yeah a day of not sleeping well make my eyes skip it lol!

On Sat, Nov 20, 2010 at 11:34 PM, Lorin Rivers lriv...@mosasaur.com wrote:

 It is in the book:
 http://web2py.com/book/default/chapter/06#Logical-Operators

 On Nov 19, 2010, at 20:00 , Bruno Rocha wrote:

  Not mentioned in the book that you can get the NOT IN SQL expression
 
  my_list = [1,2,3,4]
 
  NOT IN LIST: db(~(db.product.id.belongs(my_list))).select()
 
  IN LIST: db(db.product.id.belongs(my_list)).select()
 
 
  2010/11/19 Bruno Rocha rochacbr...@gmail.com
 
  http://web2py.com/book/default/chapter/06#belongs
 
 
 
  2010/11/19 Phyo Arkar phyo.arkarl...@gmail.com
 
  GOT IT
 
  db.table.key.belongs
 
 
  I cant find it in web2py book is there is?
 
 
  On Sat, Nov 20, 2010 at 8:11 AM, Phyo Arkar phyo.arkarl...@gmail.com
 wrote:
 
  This can be done in Query easily as
 
  SELECT * FROM table WHERE table.id IN (1,2,4,5)
 
  Theres no DAL equvlient ?  i have to execute SQL?
 
 
  On Sat, Nov 20, 2010 at 8:00 AM, Phyo Arkar phyo.arkarl...@gmail.com
 wrote:
 
  Eratta :
 
 
 
 
  to_get=[1,2,4,5]
 
  q= db.casedb.id in to_get # Guess this wont work?
 
  db(q).select(db.casedb.ALL)
 
  On Sat, Nov 20, 2010 at 7:54 AM, Phyo Arkar 
 phyo.arkarl...@gmail.comwrote:
 
 
  to_get=[1,2,4,5]
 
  q= db.casedb.id in toget
  db(q).select(db.casedb.ALL)
 
 
 
 
 
 
 
  --
 
  Bruno Rocha
  http://about.me/rochacbruno/bio
 
 
 
 
  --
 
  Bruno Rocha
  http://about.me/rochacbruno/bio

 --
 Lorin Rivers
 Mosasaur: Killer Technical Marketing http://www.mosasaur.com
 mailto:lriv...@mosasaur.com
 512/203.3198 (m)





[web2py] Re: web2py admin 2.0

2010-11-20 Thread Branko Vukelic
Here are some wireframes:

Workbench:
http://www.flickr.com/photos/foxbunny/5192808829/sizes/o/

Design window:
http://www.flickr.com/photos/foxbunny/5193406424/sizes/o/

On Sat, Nov 20, 2010 at 11:16 PM, Branko Vukelic bg.bra...@gmail.com wrote:
 On Sat, Nov 20, 2010 at 11:12 PM, Branko Vukelic bg.bra...@gmail.com wrote:
 1. Sites section

 1.5 Workbench wallpaper

 A cosmetic thing, really, but would make it more desktop-like. :)

 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group




-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: Facebox problems

2010-11-20 Thread ma...@rockiger.com
I use facebox, too. It works very well.

Is the form in an iframe?

On 20 Nov., 10:27, Bernardo estem...@gmail.com wrote:
 Hi all,

 My question is, has anyone been able to place a working form inside a
 facebox box?

 Facebox is a jQuery plugin (http://chriswanstrath.com/facebox/). Well,
 the form is shown perfectly, but when sumbit button is pressed nothing
 happens. Has anyone dealt with this issue?

 Thanks a lot to all, and kind regards,
 Bernardo


[web2py] Re: web2py admin 2.0

2010-11-20 Thread Anthony
This is awesome! Now, about those red X's...

On Nov 20, 6:04 pm, Branko Vukelic bg.bra...@gmail.com wrote:
 Here are some wireframes:

 Workbench:http://www.flickr.com/photos/foxbunny/5192808829/sizes/o/

 Design window:http://www.flickr.com/photos/foxbunny/5193406424/sizes/o/





 On Sat, Nov 20, 2010 at 11:16 PM, Branko Vukelic bg.bra...@gmail.com wrote:
  On Sat, Nov 20, 2010 at 11:12 PM, Branko Vukelic bg.bra...@gmail.com 
  wrote:
  1. Sites section

  1.5 Workbench wallpaper

  A cosmetic thing, really, but would make it more desktop-like. :)

  --
  Branko Vukelić

  bg.bra...@gmail.com
  stu...@brankovukelic.com

  Check out my blog:http://www.brankovukelic.com/
  Check out my portfolio:http://www.flickr.com/photos/foxbunny/
  Registered Linux user #438078 (http://counter.li.org/)
  I hang out on identi.ca:http://identi.ca/foxbunny

  Gimp Brushmakers Guild
 http://bit.ly/gbg-group

 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog:http://www.brankovukelic.com/
 Check out my portfolio:http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca:http://identi.ca/foxbunny

 Gimp Brushmakers Guildhttp://bit.ly/gbg-group- Hide quoted text -

 - Show quoted text -


[web2py] Re: web2py admin 2.0

2010-11-20 Thread mdipierro
Notice that admin is an app and it can be replaced.

I am not sure I want to replace admin with something too ajaxy (scares
new users and it is less portable) but it would be nice to have
options.

Massimo

On Nov 20, 5:26 pm, Anthony abasta...@gmail.com wrote:
 This is awesome! Now, about those red X's...

 On Nov 20, 6:04 pm, Branko Vukelic bg.bra...@gmail.com wrote:

  Here are some wireframes:

  Workbench:http://www.flickr.com/photos/foxbunny/5192808829/sizes/o/

  Design window:http://www.flickr.com/photos/foxbunny/5193406424/sizes/o/

  On Sat, Nov 20, 2010 at 11:16 PM, Branko Vukelic bg.bra...@gmail.com 
  wrote:
   On Sat, Nov 20, 2010 at 11:12 PM, Branko Vukelic bg.bra...@gmail.com 
   wrote:
   1. Sites section

   1.5 Workbench wallpaper

   A cosmetic thing, really, but would make it more desktop-like. :)

   --
   Branko Vukelić

   bg.bra...@gmail.com
   stu...@brankovukelic.com

   Check out my blog:http://www.brankovukelic.com/
   Check out my portfolio:http://www.flickr.com/photos/foxbunny/
   Registered Linux user #438078 (http://counter.li.org/)
   I hang out on identi.ca:http://identi.ca/foxbunny

   Gimp Brushmakers Guild
  http://bit.ly/gbg-group

  --
  Branko Vukelić

  bg.bra...@gmail.com
  stu...@brankovukelic.com

  Check out my blog:http://www.brankovukelic.com/
  Check out my portfolio:http://www.flickr.com/photos/foxbunny/
  Registered Linux user #438078 (http://counter.li.org/)
  I hang out on identi.ca:http://identi.ca/foxbunny

  Gimp Brushmakers Guildhttp://bit.ly/gbg-group-Hide quoted text -

  - Show quoted text -




[web2py] Re: Python Message Queue

2010-11-20 Thread mdipierro
If we here to integrate a queue functionality in web2py what features
would you consider most valuable?

I can three different applications:
1) a message queue (one app sends a message, another one receives it)
2) a task queue (an app can submit a task to be executed later): task
is executed by a remote process (or cloud)
3) a task queue: task is executed by the app itself (in a separate
thread) but triggered by a queue callback.

There is some overlap but they are subject to different optimizations.
2) could be a compatibility layer on top of google's task queue.


Re: [web2py] Re: web2py admin 2.0

2010-11-20 Thread António Ramos
All of that in the browser is outstanding

I cant wait to use it.
Just one detail that would be also important.

Is it possible to add bellow the editarea a frame with the python shell?

Also as a lotus notes programmer as i said previously where we have a
workspace also with icons, we change the icon with a tool like this


http://www.rw-designer.com/online_icon_maker.php

Just an idea for 2.1 :)

Best regards
António

2010/11/20 Branko Vukelic bg.bra...@gmail.com

 Here are some wireframes:

 Workbench:
 http://www.flickr.com/photos/foxbunny/5192808829/sizes/o/

 Design window:
 http://www.flickr.com/photos/foxbunny/5193406424/sizes/o/

 On Sat, Nov 20, 2010 at 11:16 PM, Branko Vukelic bg.bra...@gmail.com
 wrote:
  On Sat, Nov 20, 2010 at 11:12 PM, Branko Vukelic bg.bra...@gmail.com
 wrote:
  1. Sites section
 
  1.5 Workbench wallpaper
 
  A cosmetic thing, really, but would make it more desktop-like. :)
 
  --
  Branko Vukelić
 
  bg.bra...@gmail.com
  stu...@brankovukelic.com
 
  Check out my blog: http://www.brankovukelic.com/
  Check out my portfolio: http://www.flickr.com/photos/foxbunny/
  Registered Linux user #438078 (http://counter.li.org/)
  I hang out on identi.ca: http://identi.ca/foxbunny
 
  Gimp Brushmakers Guild
  http://bit.ly/gbg-group
 



 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group



[web2py] Re: web2py 1.89.2 is OUT

2010-11-20 Thread JoeCodeswell
I tried [twice] to upgrade using the upgrade now button in the
site page of the administrative interface:

from: Version 1.81.5 (2010-07-22 23:56:21)
to:   Version 1.89.4 (2010-11-19 02:50:05)
on:   Windows 2000
result:   unable to upgrade because
  [Errno 13] Permission denied: 'C:\\web2py/MSVCR71.dll'

On Nov 16, 12:22 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 There was a missing file.

 Try 1.89.3

 On Nov 16, 2:20 pm, Matias matiassu...@gmail.com wrote: El 16/11/10 20:04, 
 mdipierro escribi :

   Please check it.

   It is almost minor bug fixes.

  I've downloaded and overwritten the previous version on osx and I'm
  getting a crash when running it:

  Process:         web2py [10135]
  Path:            /Applications/web2py.app/Contents/MacOS/web2py
  Identifier:      org.pythonmac.unspecified.web2py
  Version:         web2py_version (1.89.2)
  Code Type:       X86 (Native)
  Parent Process:  launchd [194]

  Date/Time:       2010-11-16 21:18:48.933 +0100
  OS Version:      Mac OS X 10.6.5 (10H574)
  Report Version:  6

  Interval Since Last Report:          112877 sec
  Crashes Since Last Report:           6
  Per-App Interval Since Last Report:  16 sec
  Per-App Crashes Since Last Report:   4
  Anonymous UUID:                      16007E1A-1AEF-4C50-9BCF-57F1CE2519E7

  Exception Type:  EXC_BAD_ACCESS (SIGBUS)
  Exception Codes: KERN_PROTECTION_FAILURE at 0x00e8
  Crashed Thread:  0  Dispatch queue: com.apple.main-thread

  Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
  0   com.apple.CoreFoundation            0x91cd09a3 _CFDoExceptionOperation 
  + 531
  1   com.apple.Foundation                0x90e95083
  _NSAddExceptionHandlerForLock + 33
  2   com.apple.AppKit                    0x979701ed -[NSViewHierarchyLock
  _lockForWriting:handler:] + 690
  3   com.apple.AppKit                    0x9796ff35 -[NSViewHierarchyLock
  lockForWritingWithExceptionHandler:] + 50
  4   com.apple.AppKit                    0x979b19e3 -[NSView
  removeFromSuperview] + 53
  5   com.apple.AppKit                    0x9796be8f -[NSWindow
  setContentView:] + 77
  6   com.apple.AppKit                    0x979df9c2 -[NSWindowTemplate
  nibInstantiate] + 972
  7   com.apple.AppKit                    0x97950a49 -[NSIBObjectData
  instantiateObject:] + 253
  8   com.apple.AppKit                    0x9794fd4e -[NSIBObjectData
  nibInstantiateWithOwner:topLevelObjects:] + 336
  9   com.apple.AppKit                    0x9794e1f4 loadNib + 257
  10  com.apple.AppKit                    0x9794d848 +[NSBundle(NSNibLoading)
  _loadNibFile:nameTable:withZone:ownerBundle:] + 831
  11  com.apple.AppKit                    0x9794d4fe +[NSBundle(NSNibLoading)
  loadNibFile:externalNameTable:withZone:] + 158
  12  com.apple.AppKit                    0x97b5f441 _NXLoadNib + 234
 13 com.apple.AppKit                    0x97b5eed0 -[NSAlert init] + 113
  14  com.apple.AppKit                    0x97bfd06b _NXDoLocalRunAlertPanel 
  + 201
  15  com.apple.AppKit                    0x97bfd83d NSRunAlertPanel + 69
  16  ...ythonmac.unspecified.web2py      0x4890 start + 10140
  17  ...ythonmac.unspecified.web2py      0x6631 start + 17725
  18  ...ythonmac.unspecified.web2py      0x6f3d main + 2097
  19  ...ythonmac.unspecified.web2py      0x2202 start + 270
  20  ...ythonmac.unspecified.web2py      0x211d start + 41

  Thread 1:  Dispatch queue: com.apple.libdispatch-manager
  0   libSystem.B.dylib                   0x94ec9982 kevent + 10
  1   libSystem.B.dylib                   0x94eca09c _dispatch_mgr_invoke + 
  215
  2   libSystem.B.dylib                   0x94ec9559 _dispatch_queue_invoke + 
  163
  3   libSystem.B.dylib                   0x94ec92fe _dispatch_worker_thread2 
  + 240
  4   libSystem.B.dylib                   0x94ec8d81 _pthread_wqthread + 390
  5   libSystem.B.dylib                   0x94ec8bc6 start_wqthread + 30

  Thread 2:
  0   libSystem.B.dylib                   0x94edead2
  select$DARWIN_EXTSN$NOCANCEL + 10
  1   libSystem.B.dylib                   0x94f76fd7 select + 92
  2   time.so                             0x0077c89d inittime + 629
  3   org.python.python                   0x0189442a PyEval_EvalFrameEx + 
  24563
  4   org.python.python                   0x018944d8 PyEval_EvalFrameEx + 
  24737
  5   org.python.python                   0x018944d8 PyEval_EvalFrameEx + 
  24737
  6   org.python.python                   0x01894cdc PyEval_EvalCodeEx + 1819
  7   org.python.python                   0x0182a537 PyFunction_SetClosure + 
  2019
  8   org.python.python                   0x01809278 PyObject_Call + 45
  9   org.python.python                   0x01810ee5 PyMethod_New + 2432
  10  org.python.python                   0x01809278 PyObject_Call + 45
  11  org.python.python                   0x0188d5b2
  PyEval_CallObjectWithKeywords + 112
  12  org.python.python                   0x018c7d36 _PyObject_GC_NewVar + 
  1965
 13 libSystem.B.dylib         

Re: [web2py] Re: web2py admin 2.0

2010-11-20 Thread António Ramos
Those images of the possible 2.0 reminds me of the jqgrid example

http://trirand.com/blog/jqgrid/jqgrid.html

Treeview for models ,views controllers etc in the left side, and in the
right side, the editarea with tabbed access to the files we open in the
left.
Don´t forget the shell in the bottom right :)

Thas is EXCELLENT!



Antonio


Em 20 de novembro de 2010 23:37, António Ramos ramstei...@gmail.comescreveu:

 All of that in the browser is outstanding

 I cant wait to use it.
 Just one detail that would be also important.

 Is it possible to add bellow the editarea a frame with the python shell?

 Also as a lotus notes programmer as i said previously where we have a
 workspace also with icons, we change the icon with a tool like this


 http://www.rw-designer.com/online_icon_maker.php

 Just an idea for 2.1 :)

 Best regards
 António

 2010/11/20 Branko Vukelic bg.bra...@gmail.com

 Here are some wireframes:

 Workbench:
 http://www.flickr.com/photos/foxbunny/5192808829/sizes/o/

 Design window:
 http://www.flickr.com/photos/foxbunny/5193406424/sizes/o/

 On Sat, Nov 20, 2010 at 11:16 PM, Branko Vukelic bg.bra...@gmail.com
 wrote:
  On Sat, Nov 20, 2010 at 11:12 PM, Branko Vukelic bg.bra...@gmail.com
 wrote:
  1. Sites section
 
  1.5 Workbench wallpaper
 
  A cosmetic thing, really, but would make it more desktop-like. :)
 
  --
  Branko Vukelić
 
  bg.bra...@gmail.com
  stu...@brankovukelic.com
 
  Check out my blog: http://www.brankovukelic.com/
  Check out my portfolio: http://www.flickr.com/photos/foxbunny/
  Registered Linux user #438078 (http://counter.li.org/)
  I hang out on identi.ca: http://identi.ca/foxbunny
 
  Gimp Brushmakers Guild
  http://bit.ly/gbg-group
 



 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog: http://www.brankovukelic.com/
 Check out my portfolio: http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca: http://identi.ca/foxbunny

 Gimp Brushmakers Guild
 http://bit.ly/gbg-group





[web2py] Wizard Code

2010-11-20 Thread villas
From wizard generated code, but a style promoted elsewhere too...

f,v = request.args(0), request.args(1)
query = f and db.table[f]==v or db.table

If I use a wrong url e.g. 'function/my/error',  this code fails.

I expected that if  'f and db.table[f]==v'  fails then 'db.table' is
used instead?  A bit like a 'try/excepts'.  This doesn't appear to be
the case.

Therefore this is bad code (unrobust)?  What's the answer, a real try/
excepts or does it just need tweaking?


[web2py] Re: web2py admin 2.0

2010-11-20 Thread blackthorne
hey,

also consider:
- mobile view - good for keep updated on ticket reporting and so on...
- integrated SQL designer
- update option for each app
- routes web interface
- logging interface

Thank you
Best regards

On Nov 20, 5:12 pm, Branko Vukelic bg.bra...@gmail.com wrote:
 This topic is for brainstorming future development of the admin UI.
 Please do not report bugs with the current one in this topic, since
 its purpose is not fixing the current admin.

 Here are a few ideas.

 1. Sites section

 1.1 Workbench

 The workbench would be the space below the current top panel. It would
 occupy the entire space below the panel and would contain icons
 representing apps, as well as some miscellanous features such as
 twitter feed. The admin would be expandable via plugins, and plugins
 would provide workbench icons that would appear on the... err...
 workbench. :)

 1.2 Admin bar

 The admin bar would be an extension to the current panel at the top.
 It would contain menu items that open modal dialogs containing the
 functionality of the items in the current sidebar (web2py update,
 creation of new apps, deployment on GAE, etc). The functionality that
 is already in the top panel would become part of the admin bar with
 the same status (importance) as the ones currently on the sidebar.

 1.3 Twitter feed

 The twitter feed would be presented as a separate non-modal window
 which can be closed (minimized to an icon). This feature will
 represent an example of the admin plugin as well, and it should be
 developed separately but included by default.

 1.4 App icons

 The workbench app icons should behave more or less like desktop icons.
 Clicking on them opens the design view, and hovering over the icons
 opens a toolbar with less commonly used features like packaging and
 testing. All apps can have custom 128x128px icons in png format. The
 icon can be placed into the app directory as ``appicon.png``. The icon
 can also be uploaded at (a) app creation time via the admin bar, or
 (b) later via design view, or (c) during creation via the wizard.

 2.0 Design window

 The design window will be a non-modal window expandable to 100% space
 of the workbench. It is has the functionality currently offered by the
 design view. The design window will behave much like a desktop IDE. It
 will have tabbed edit space, and a file list on the left. The file
 list will be a panel that is separated horizontally into two boxes.
 The top box (top panel) contains the project tree, and the bottom
 panel will contain various information about the file (what method it
 exposes, etc). The specific advantage of having a non-modal design
 window would be the ability to open multiple design windows at once,
 enabling copying of code between projects, etc.

  2.1 Project tree

 Project tree is a expandable node system. Multiple root nodes
 correspond to current design view subsections (Models, Controllers,
 etc). Child nodes correspond to the directory/file hierarchy. Clicking
 on the root node expands it or collapses it. Right-clicking the root
 node offers options like Expand all children, Collapse, Collapse
 all sections, etc. By default, all root nodes are expanded. Child
 nodes can be either file nodes or directory nodes. Dir node behaves
 the same way as root node. File nodes have a context menu that offers
 functionality such as testing, editing, or deletion. Clicking on a
 file node updates the info panel (bottom panel). Double clicking the
 file node opens it in the editor in the edit panel (right panel).

 It would be interesting to see revision control integrated with the
 file panel as well.

 2.2 Editor panel

 The editor panel (edit space) on the right is a tabbed interface
 containing the editor of choice. It enables editing of multiple files
 and switching between them using the tabs. A tab has an X mark that
 allows closing it.

 2.3 Design bar

 The design bar has the appearance similar to admin bar, but with
 options specific to design view. It doesn't replace the admin bar, but
 it appears attached to the design window. All design bar functionality
 should open non-modal windows of their own. This allows you to, for
 example, view the code and the ticket(s) side-by-side, etc. This
 philosophy extends to pluigin view as well, so plugin view opens a new
 non-modal design window containing the plugin-related functionality.

 That's it for now. I'll keep adding things as I think of them.

 --
 Branko Vukelić

 bg.bra...@gmail.com
 stu...@brankovukelic.com

 Check out my blog:http://www.brankovukelic.com/
 Check out my portfolio:http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca:http://identi.ca/foxbunny

 Gimp Brushmakers Guildhttp://bit.ly/gbg-group


[web2py] Re: Python Message Queue

2010-11-20 Thread blackthorne
I've used extensively ActiveMQ, RabbitMQ and memcache + starling for
professional reasons, what is it that you really want to know? what is
the target?

On Nov 19, 2:09 am, Pystar aitoehi...@gmail.com wrote:
 I would like to know if any one here has used any message queue? and
 which one comes recommended?


[web2py] Selecting subsets of objects in a controller.

2010-11-20 Thread Joe J
Hi All,
  I have a one-to-many relationship between a table called org and a
table called eventtype.  (one org can have many eventtypes).

I'm trying to construct a controller function that can edit a
eventtype belonging to a specific org.  The URL might look something
like:
/app_name/eventtype/edit/[org_name_id]/[event_type_id]/

I'm like to pass the org_id, and eventtype_id in as arguments to the
controller function and then return the given eventtype object
instance only if it belongs to the selected org.

def edit():
# example I found in the book
try: org=db.org(request.args(0))
except: redirect(URL('org','index'))

eventtype_id = request.args(1)
# trying to find a way to select the eventtype
# from the orgs available eventtypes.  I want
# the eventtype var to be the selected
# eventtype instance (not a list of fields)
try: eventtype=db.eventtype(eventtype_id, db.org???)
except: redirect(URL('org','index'))

If it helps clarify the question, here is the Django syntax for what I
am trying to do.

try:
eventtype=org.eventtype_set.get(id=eventtype_id)
except 
return HttpRedirect(...)

Any help is much appreciated.  Thank you for reading at this.
Joe


Re: [web2py] Re: Questions about sets

2010-11-20 Thread Lorin Rivers
I figured out what i was doing wrong. I should have been updating the datetime 
field with a string.

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing http://www.mosasaur.com
mailto:lriv...@mosasaur.com
512/203.3198 (m)




Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
For my problem i have to use multiprocessing + Queue is:

I am developing a file indexer for a Digital Forensic Firm which extract
huge archive of files , pst (ms Outlook archives), Read them . parse them ,
extract Mime and Indexable text out of many different type of documents , as
much as possible. And put them into the database for later indexing by
search engine.

Target is to process over 10GB of files at once.

When we tested 800MB archives, takes over 20 mins (without multiprocessing)
.

machine is dual Core2 8GB DDR

Problems are ,
1. it stop web2py's from responding both normal requests and ajax requests
, that makes it impossible for showing progress to user.
2. it also stops Rocket's Keealive responds for 20 mins , making browser
think its dead

my solution is to separate all processing out into a separate python
process, spawn it via subprocess.Popen , without waiting it to end.

With that i can use multiprocessing module to spread loads across 4
processess , without bombarding web2py.
With that web2py can function welll.The process is running at background.
and with Ajax i can make a progress bar by checking the progress report of
the separated process.

Problem there are :

1. As it is outside of web2py theres no way of knowing if there error
occoured, unless i monitoring the output of web2py process.
2. The way to communicate back to web2py is via files. I wrote process
progress or error to 4 different files , which ajax requests monitor them
for progress.
3. Between 4 processes it is easy to communicate parsed results via
multiprocessing Queue , but as it is outside of web2py scope , cannot
communicate using Queue
4. Also DAL have to be use as outside of web2py to put back results into
database , and its ugly.


If tasks and ques of celery are integrated , there will be many benefits.
Can easily load balance across multiple machines too. and communicate to and
fro easily.


On Sun, Nov 21, 2010 at 6:06 AM, mdipierro mdipie...@cs.depaul.edu wrote:

 If we here to integrate a queue functionality in web2py what features
 would you consider most valuable?

 I can three different applications:
 1) a message queue (one app sends a message, another one receives it)
 2) a task queue (an app can submit a task to be executed later): task
 is executed by a remote process (or cloud)
 3) a task queue: task is executed by the app itself (in a separate
 thread) but triggered by a queue callback.

 There is some overlap but they are subject to different optimizations.
 2) could be a compatibility layer on top of google's task queue.



[web2py] Re: Python Message Queue

2010-11-20 Thread blackthorne
Hey Massimo, i think I can help on this and btw I think it is the way
to go if we want to bring scalability and fault-tolerance to another
level.

I would suggest the very same architecture used in the Merb framework.
They did an awesome work with nanites (a fabric of ruby daemons),
bringing real cloud computing power out-of-the-box. I've a work around
this on my Mst. and currently work on it professionally. If you want
the results on benchmarks for different things on this, please feel
free to contact me.

here:
http://www.slideshare.net/ezmobius/merb-nanite-presentation


Thank you,
Best regards

On Nov 20, 11:36 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 If we here to integrate a queue functionality in web2py what features
 would you consider most valuable?

 I can three different applications:
 1) a message queue (one app sends a message, another one receives it)
 2) a task queue (an app can submit a task to be executed later): task
 is executed by a remote process (or cloud)
 3) a task queue: task is executed by the app itself (in a separate
 thread) but triggered by a queue callback.

 There is some overlap but they are subject to different optimizations.
 2) could be a compatibility layer on top of google's task queue.


Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
2) could be a compatibility layer on top of google's task queue.

google's task queue? on GAE?

for many orginizations and companys , GAE or any other public clouds are not
an option. They want their sensitive data to be private, and paranoid to go
it online. The firm i am working on is building their own private cloud and
for their clients. My extractor will also need to run over it too , later.

So many private or goverment organisation , they will want non public cloud
related technologies.


On Sun, Nov 21, 2010 at 7:49 AM, Phyo Arkar phyo.arkarl...@gmail.comwrote:

 For my problem i have to use multiprocessing + Queue is:

 I am developing a file indexer for a Digital Forensic Firm which extract
 huge archive of files , pst (ms Outlook archives), Read them . parse them ,
 extract Mime and Indexable text out of many different type of documents , as
 much as possible. And put them into the database for later indexing by
 search engine.

 Target is to process over 10GB of files at once.

 When we tested 800MB archives, takes over 20 mins (without multiprocessing)
 .

 machine is dual Core2 8GB DDR

 Problems are ,
 1. it stop web2py's from responding both normal requests and ajax requests
 , that makes it impossible for showing progress to user.
 2. it also stops Rocket's Keealive responds for 20 mins , making browser
 think its dead

 my solution is to separate all processing out into a separate python
 process, spawn it via subprocess.Popen , without waiting it to end.

 With that i can use multiprocessing module to spread loads across 4
 processess , without bombarding web2py.
 With that web2py can function welll.The process is running at background.
 and with Ajax i can make a progress bar by checking the progress report of
 the separated process.

 Problem there are :

 1. As it is outside of web2py theres no way of knowing if there error
 occoured, unless i monitoring the output of web2py process.
 2. The way to communicate back to web2py is via files. I wrote process
 progress or error to 4 different files , which ajax requests monitor them
 for progress.
 3. Between 4 processes it is easy to communicate parsed results via
 multiprocessing Queue , but as it is outside of web2py scope , cannot
 communicate using Queue
 4. Also DAL have to be use as outside of web2py to put back results into
 database , and its ugly.


 If tasks and ques of celery are integrated , there will be many benefits.
 Can easily load balance across multiple machines too. and communicate to and
 fro easily.



 On Sun, Nov 21, 2010 at 6:06 AM, mdipierro mdipie...@cs.depaul.eduwrote:

 If we here to integrate a queue functionality in web2py what features
 would you consider most valuable?

 I can three different applications:
 1) a message queue (one app sends a message, another one receives it)
 2) a task queue (an app can submit a task to be executed later): task
 is executed by a remote process (or cloud)
 3) a task queue: task is executed by the app itself (in a separate
 thread) but triggered by a queue callback.

 There is some overlap but they are subject to different optimizations.
 2) could be a compatibility layer on top of google's task queue.





Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
Thats Very cool!
+1
On 11/21/10, blackthorne francisco@gmail.com wrote:
 Hey Massimo, i think I can help on this and btw I think it is the way
 to go if we want to bring scalability and fault-tolerance to another
 level.

 I would suggest the very same architecture used in the Merb framework.
 They did an awesome work with nanites (a fabric of ruby daemons),
 bringing real cloud computing power out-of-the-box. I've a work around
 this on my Mst. and currently work on it professionally. If you want
 the results on benchmarks for different things on this, please feel
 free to contact me.

 here:
 http://www.slideshare.net/ezmobius/merb-nanite-presentation


 Thank you,
 Best regards

 On Nov 20, 11:36 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 If we here to integrate a queue functionality in web2py what features
 would you consider most valuable?

 I can three different applications:
 1) a message queue (one app sends a message, another one receives it)
 2) a task queue (an app can submit a task to be executed later): task
 is executed by a remote process (or cloud)
 3) a task queue: task is executed by the app itself (in a separate
 thread) but triggered by a queue callback.

 There is some overlap but they are subject to different optimizations.
 2) could be a compatibility layer on top of google's task queue.


[web2py] very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread Carlos
Hi,

Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
often take a LOOONG time to load web2py urls in the following format?:

   http://127.0.0.1:8000/

I just see in the following in the status bar:

   Waiting for http://127.0.0.1:8000/ ...

Even after trying to refresh/reload many times, and then all of the
sudden everything work ok, until the delays occur again !

When using Chrome, I never have to wait, there are no delays, and
everything is very fast.

I'm using web2py 1.89.1 source on win7.

Any ideas?.

Thanks,

   Carlos


Re: [web2py] very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread Bruno Rocha
Windows firewall, browser security settings or some antivirus system?

2010/11/20 Carlos carlosgali...@gmail.com

 Hi,

 Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
 often take a LOOONG time to load web2py urls in the following format?:

   http://127.0.0.1:8000/

 I just see in the following in the status bar:

   Waiting for http://127.0.0.1:8000/ ...

 Even after trying to refresh/reload many times, and then all of the
 sudden everything work ok, until the delays occur again !

 When using Chrome, I never have to wait, there are no delays, and
 everything is very fast.

 I'm using web2py 1.89.1 source on win7.

 Any ideas?.

 Thanks,

   Carlos




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


Re: [web2py] very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread Gary Herron

On 11/20/2010 05:50 PM, Carlos wrote:

Hi,

Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
often take a LOOONG time to load web2py urls in the following format?:

http://127.0.0.1:8000/

I just see in the following in the status bar:

Waiting for http://127.0.0.1:8000/ ...

Even after trying to refresh/reload many times, and then all of the
sudden everything work ok, until the delays occur again !

When using Chrome, I never have to wait, there are no delays, and
everything is very fast.

I'm using web2py 1.89.1 source on win7.

Any ideas?.

Thanks,

Carlos



I never see this with any browser, IE, Firefox, or Chrome.  It seems 
more likely to be a function of the server -- but we'll need a lot more 
information to debug that.


--
Gary Herron, PhD.
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418



Re: [web2py] very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread Phyo Arkar
I got very long loading time on examples ., it just waiting for (about
10-15 seconds) and do nothing.
http://127.0.0.1:8000/examples

I suspect Twitter loads but they supposed to be load after document is
ready, right?

On 11/21/10, Bruno Rocha rochacbr...@gmail.com wrote:
 Windows firewall, browser security settings or some antivirus system?

 2010/11/20 Carlos carlosgali...@gmail.com

 Hi,

 Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
 often take a LOOONG time to load web2py urls in the following format?:

   http://127.0.0.1:8000/

 I just see in the following in the status bar:

   Waiting for http://127.0.0.1:8000/ ...

 Even after trying to refresh/reload many times, and then all of the
 sudden everything work ok, until the delays occur again !

 When using Chrome, I never have to wait, there are no delays, and
 everything is very fast.

 I'm using web2py 1.89.1 source on win7.

 Any ideas?.

 Thanks,

   Carlos




 --

 Bruno Rocha
 http://about.me/rochacbruno/bio



Re: [web2py] Re: web2py 1.89.2 is OUT

2010-11-20 Thread Phyo Arkar
coz it is using MSVCR71.dll currently.

Better do clean upgrade after shutting down web2py

On 11/21/10, JoeCodeswell joecodesw...@gmail.com wrote:
 I tried [twice] to upgrade using the upgrade now button in the
 site page of the administrative interface:

 from: Version 1.81.5 (2010-07-22 23:56:21)
 to:   Version 1.89.4 (2010-11-19 02:50:05)
 on:   Windows 2000
 result:   unable to upgrade because
   [Errno 13] Permission denied: 'C:\\web2py/MSVCR71.dll'

 On Nov 16, 12:22 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 There was a missing file.

 Try 1.89.3

 On Nov 16, 2:20 pm, Matias matiassu...@gmail.com wrote: El 16/11/10
 20:04, mdipierro escribi :

   Please check it.

   It is almost minor bug fixes.

  I've downloaded and overwritten the previous version on osx and I'm
  getting a crash when running it:

  Process:         web2py [10135]
  Path:            /Applications/web2py.app/Contents/MacOS/web2py
  Identifier:      org.pythonmac.unspecified.web2py
  Version:         web2py_version (1.89.2)
  Code Type:       X86 (Native)
  Parent Process:  launchd [194]

  Date/Time:       2010-11-16 21:18:48.933 +0100
  OS Version:      Mac OS X 10.6.5 (10H574)
  Report Version:  6

  Interval Since Last Report:          112877 sec
  Crashes Since Last Report:           6
  Per-App Interval Since Last Report:  16 sec
  Per-App Crashes Since Last Report:   4
  Anonymous UUID:
   16007E1A-1AEF-4C50-9BCF-57F1CE2519E7

  Exception Type:  EXC_BAD_ACCESS (SIGBUS)
  Exception Codes: KERN_PROTECTION_FAILURE at 0x00e8
  Crashed Thread:  0  Dispatch queue: com.apple.main-thread

  Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
  0   com.apple.CoreFoundation            0x91cd09a3
  _CFDoExceptionOperation + 531
  1   com.apple.Foundation                0x90e95083
  _NSAddExceptionHandlerForLock + 33
  2   com.apple.AppKit                    0x979701ed -[NSViewHierarchyLock
  _lockForWriting:handler:] + 690
  3   com.apple.AppKit                    0x9796ff35 -[NSViewHierarchyLock
  lockForWritingWithExceptionHandler:] + 50
  4   com.apple.AppKit                    0x979b19e3 -[NSView
  removeFromSuperview] + 53
  5   com.apple.AppKit                    0x9796be8f -[NSWindow
  setContentView:] + 77
  6   com.apple.AppKit                    0x979df9c2 -[NSWindowTemplate
  nibInstantiate] + 972
  7   com.apple.AppKit                    0x97950a49 -[NSIBObjectData
  instantiateObject:] + 253
  8   com.apple.AppKit                    0x9794fd4e -[NSIBObjectData
  nibInstantiateWithOwner:topLevelObjects:] + 336
  9   com.apple.AppKit                    0x9794e1f4 loadNib + 257
  10  com.apple.AppKit                    0x9794d848
  +[NSBundle(NSNibLoading)
  _loadNibFile:nameTable:withZone:ownerBundle:] + 831
  11  com.apple.AppKit                    0x9794d4fe
  +[NSBundle(NSNibLoading)
  loadNibFile:externalNameTable:withZone:] + 158
  12  com.apple.AppKit                    0x97b5f441 _NXLoadNib + 234
 13 com.apple.AppKit                    0x97b5eed0 -[NSAlert init] + 113
  14  com.apple.AppKit                    0x97bfd06b
  _NXDoLocalRunAlertPanel + 201
  15  com.apple.AppKit                    0x97bfd83d NSRunAlertPanel + 69
  16  ...ythonmac.unspecified.web2py      0x4890 start + 10140
  17  ...ythonmac.unspecified.web2py      0x6631 start + 17725
  18  ...ythonmac.unspecified.web2py      0x6f3d main + 2097
  19  ...ythonmac.unspecified.web2py      0x2202 start + 270
  20  ...ythonmac.unspecified.web2py      0x211d start + 41

  Thread 1:  Dispatch queue: com.apple.libdispatch-manager
  0   libSystem.B.dylib                   0x94ec9982 kevent + 10
  1   libSystem.B.dylib                   0x94eca09c _dispatch_mgr_invoke
  + 215
  2   libSystem.B.dylib                   0x94ec9559
  _dispatch_queue_invoke + 163
  3   libSystem.B.dylib                   0x94ec92fe
  _dispatch_worker_thread2 + 240
  4   libSystem.B.dylib                   0x94ec8d81 _pthread_wqthread +
  390
  5   libSystem.B.dylib                   0x94ec8bc6 start_wqthread + 30

  Thread 2:
  0   libSystem.B.dylib                   0x94edead2
  select$DARWIN_EXTSN$NOCANCEL + 10
  1   libSystem.B.dylib                   0x94f76fd7 select + 92
  2   time.so                             0x0077c89d inittime + 629
  3   org.python.python                   0x0189442a PyEval_EvalFrameEx +
  24563
  4   org.python.python                   0x018944d8 PyEval_EvalFrameEx +
  24737
  5   org.python.python                   0x018944d8 PyEval_EvalFrameEx +
  24737
  6   org.python.python                   0x01894cdc PyEval_EvalCodeEx +
  1819
  7   org.python.python                   0x0182a537 PyFunction_SetClosure
  + 2019
  8   org.python.python                   0x01809278 PyObject_Call + 45
  9   org.python.python                   0x01810ee5 PyMethod_New + 2432
  10  org.python.python                   0x01809278 PyObject_Call + 45
  11  org.python.python                   0x0188d5b2
  

Re: [web2py] very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread Bruno Rocha
examples loads google groups and google code RSS, Welcome loads Jquery from
cdn.google, admin loads twitter feed and update/upgrade information. can be
that.

2010/11/21 Phyo Arkar phyo.arkarl...@gmail.com

 I got very long loading time on examples ., it just waiting for (about
 10-15 seconds) and do nothing.
 http://127.0.0.1:8000/examples

 I suspect Twitter loads but they supposed to be load after document is
 ready, right?

 On 11/21/10, Bruno Rocha rochacbr...@gmail.com wrote:
  Windows firewall, browser security settings or some antivirus system?
 
  2010/11/20 Carlos carlosgali...@gmail.com
 
  Hi,
 
  Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
  often take a LOOONG time to load web2py urls in the following format?:
 
http://127.0.0.1:8000/
 
  I just see in the following in the status bar:
 
Waiting for http://127.0.0.1:8000/ ...
 
  Even after trying to refresh/reload many times, and then all of the
  sudden everything work ok, until the delays occur again !
 
  When using Chrome, I never have to wait, there are no delays, and
  everything is very fast.
 
  I'm using web2py 1.89.1 source on win7.
 
  Any ideas?.
 
  Thanks,
 
Carlos
 
 
 
 
  --
 
  Bruno Rocha
  http://about.me/rochacbruno/bio
 




-- 

Bruno Rocha
http://about.me/rochacbruno/bio


[web2py] Re: Wizard Code

2010-11-20 Thread mdipierro
you are correct. will fix it.

On Nov 20, 5:57 pm, villas villa...@gmail.com wrote:
 From wizard generated code, but a style promoted elsewhere too...

     f,v = request.args(0), request.args(1)
     query = f and db.table[f]==v or db.table

 If I use a wrong url e.g. 'function/my/error',  this code fails.

 I expected that if  'f and db.table[f]==v'  fails then 'db.table' is
 used instead?  A bit like a 'try/excepts'.  This doesn't appear to be
 the case.

 Therefore this is bad code (unrobust)?  What's the answer, a real try/
 excepts or does it just need tweaking?


[web2py] Re: Selecting subsets of objects in a controller.

2010-11-20 Thread mdipierro
Depends on the model. I will assume

db.define_table('org',Field('name'))
db.define_table('eventtype,Field('org',db.org),Field('name'))

In this case

def edit():
org_id, eventtype_id=request.args(0),request.args(1)
eventtype==db.eventtype(eventtype_id,org=org_id) or
redirect(URL(...))

I do not understand the Django example since it is not using the
ord_id information.


On Nov 20, 6:31 pm, Joe J joe.jasin...@gmail.com wrote:
 Hi All,
   I have a one-to-many relationship between a table called org and a
 table called eventtype.  (one org can have many eventtypes).

 I'm trying to construct a controller function that can edit a
 eventtype belonging to a specific org.  The URL might look something
 like:
 /app_name/eventtype/edit/[org_name_id]/[event_type_id]/

 I'm like to pass the org_id, and eventtype_id in as arguments to the
 controller function and then return the given eventtype object
 instance only if it belongs to the selected org.

 def edit():
     # example I found in the book
     try: org=db.org(request.args(0))
     except: redirect(URL('org','index'))

     eventtype_id = request.args(1)
     # trying to find a way to select the eventtype
     # from the orgs available eventtypes.  I want
     # the eventtype var to be the selected
     # eventtype instance (not a list of fields)
     try: eventtype=db.eventtype(eventtype_id, db.org???)
     except: redirect(URL('org','index'))

 If it helps clarify the question, here is the Django syntax for what I
 am trying to do.
     
     try:
         eventtype=org.eventtype_set.get(id=eventtype_id)
     except 
         return HttpRedirect(...)

 Any help is much appreciated.  Thank you for reading at this.
 Joe


[web2py] Re: Python Message Queue

2010-11-20 Thread mdipierro
http://code.google.com/appengine/docs/python/taskqueue/

On Nov 20, 7:29 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
 2) could be a compatibility layer on top of google's task queue.

 google's task queue? on GAE?

 for many orginizations and companys , GAE or any other public clouds are not
 an option. They want their sensitive data to be private, and paranoid to go
 it online. The firm i am working on is building their own private cloud and
 for their clients. My extractor will also need to run over it too , later.

 So many private or goverment organisation , they will want non public cloud
 related technologies.

 On Sun, Nov 21, 2010 at 7:49 AM, Phyo Arkar phyo.arkarl...@gmail.comwrote:

  For my problem i have to use multiprocessing + Queue is:

  I am developing a file indexer for a Digital Forensic Firm which extract
  huge archive of files , pst (ms Outlook archives), Read them . parse them ,
  extract Mime and Indexable text out of many different type of documents , as
  much as possible. And put them into the database for later indexing by
  search engine.

  Target is to process over 10GB of files at once.

  When we tested 800MB archives, takes over 20 mins (without multiprocessing)
  .

  machine is dual Core2 8GB DDR

  Problems are ,
  1. it stop web2py's from responding both normal requests and ajax requests
  , that makes it impossible for showing progress to user.
  2. it also stops Rocket's Keealive responds for 20 mins , making browser
  think its dead

  my solution is to separate all processing out into a separate python
  process, spawn it via subprocess.Popen , without waiting it to end.

  With that i can use multiprocessing module to spread loads across 4
  processess , without bombarding web2py.
  With that web2py can function welll.The process is running at background.
  and with Ajax i can make a progress bar by checking the progress report of
  the separated process.

  Problem there are :

  1. As it is outside of web2py theres no way of knowing if there error
  occoured, unless i monitoring the output of web2py process.
  2. The way to communicate back to web2py is via files. I wrote process
  progress or error to 4 different files , which ajax requests monitor them
  for progress.
  3. Between 4 processes it is easy to communicate parsed results via
  multiprocessing Queue , but as it is outside of web2py scope , cannot
  communicate using Queue
  4. Also DAL have to be use as outside of web2py to put back results into
  database , and its ugly.

  If tasks and ques of celery are integrated , there will be many benefits.
  Can easily load balance across multiple machines too. and communicate to and
  fro easily.

  On Sun, Nov 21, 2010 at 6:06 AM, mdipierro mdipie...@cs.depaul.eduwrote:

  If we here to integrate a queue functionality in web2py what features
  would you consider most valuable?

  I can three different applications:
  1) a message queue (one app sends a message, another one receives it)
  2) a task queue (an app can submit a task to be executed later): task
  is executed by a remote process (or cloud)
  3) a task queue: task is executed by the app itself (in a separate
  thread) but triggered by a queue callback.

  There is some overlap but they are subject to different optimizations.
  2) could be a compatibility layer on top of google's task queue.




[web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread mdipierro
yes. the twitten part is loaded via ajax. Should not cause the delay.

On Nov 20, 8:10 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
 I got very long loading time on examples ., it just waiting for (about
 10-15 seconds) and do nothing.http://127.0.0.1:8000/examples

 I suspect Twitter loads but they supposed to be load after document is
 ready, right?

 On 11/21/10, Bruno Rocha rochacbr...@gmail.com wrote:

  Windows firewall, browser security settings or some antivirus system?

  2010/11/20 Carlos carlosgali...@gmail.com

  Hi,

  Why do IE (v. 8) and Firefox (v. 3.6 with Firebug) browsers quite
  often take a LOOONG time to load web2py urls in the following format?:

   http://127.0.0.1:8000/

  I just see in the following in the status bar:

    Waiting forhttp://127.0.0.1:8000/...

  Even after trying to refresh/reload many times, and then all of the
  sudden everything work ok, until the delays occur again !

  When using Chrome, I never have to wait, there are no delays, and
  everything is very fast.

  I'm using web2py 1.89.1 source on win7.

  Any ideas?.

  Thanks,

    Carlos

  --

  Bruno Rocha
 http://about.me/rochacbruno/bio




Re: [web2py] Re: Python Message Queue

2010-11-20 Thread Phyo Arkar
I was never into GAE , but if GAE SDK works locally without any need
from Google GAE ?

Can we build cloud using it?

On 11/21/10, mdipierro mdipie...@cs.depaul.edu wrote:
 http://code.google.com/appengine/docs/python/taskqueue/

 On Nov 20, 7:29 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote:
 2) could be a compatibility layer on top of google's task queue.

 google's task queue? on GAE?

 for many orginizations and companys , GAE or any other public clouds are
 not
 an option. They want their sensitive data to be private, and paranoid to
 go
 it online. The firm i am working on is building their own private cloud
 and
 for their clients. My extractor will also need to run over it too , later.

 So many private or goverment organisation , they will want non public
 cloud
 related technologies.

 On Sun, Nov 21, 2010 at 7:49 AM, Phyo Arkar
 phyo.arkarl...@gmail.comwrote:

  For my problem i have to use multiprocessing + Queue is:

  I am developing a file indexer for a Digital Forensic Firm which extract
  huge archive of files , pst (ms Outlook archives), Read them . parse
  them ,
  extract Mime and Indexable text out of many different type of documents
  , as
  much as possible. And put them into the database for later indexing by
  search engine.

  Target is to process over 10GB of files at once.

  When we tested 800MB archives, takes over 20 mins (without
  multiprocessing)
  .

  machine is dual Core2 8GB DDR

  Problems are ,
  1. it stop web2py's from responding both normal requests and ajax
  requests
  , that makes it impossible for showing progress to user.
  2. it also stops Rocket's Keealive responds for 20 mins , making browser
  think its dead

  my solution is to separate all processing out into a separate python
  process, spawn it via subprocess.Popen , without waiting it to end.

  With that i can use multiprocessing module to spread loads across 4
  processess , without bombarding web2py.
  With that web2py can function welll.The process is running at
  background.
  and with Ajax i can make a progress bar by checking the progress report
  of
  the separated process.

  Problem there are :

  1. As it is outside of web2py theres no way of knowing if there error
  occoured, unless i monitoring the output of web2py process.
  2. The way to communicate back to web2py is via files. I wrote process
  progress or error to 4 different files , which ajax requests monitor
  them
  for progress.
  3. Between 4 processes it is easy to communicate parsed results via
  multiprocessing Queue , but as it is outside of web2py scope , cannot
  communicate using Queue
  4. Also DAL have to be use as outside of web2py to put back results into
  database , and its ugly.

  If tasks and ques of celery are integrated , there will be many
  benefits.
  Can easily load balance across multiple machines too. and communicate to
  and
  fro easily.

  On Sun, Nov 21, 2010 at 6:06 AM, mdipierro
  mdipie...@cs.depaul.eduwrote:

  If we here to integrate a queue functionality in web2py what features
  would you consider most valuable?

  I can three different applications:
  1) a message queue (one app sends a message, another one receives it)
  2) a task queue (an app can submit a task to be executed later): task
  is executed by a remote process (or cloud)
  3) a task queue: task is executed by the app itself (in a separate
  thread) but triggered by a queue callback.

  There is some overlap but they are subject to different optimizations.
  2) could be a compatibility layer on top of google's task queue.




[web2py] Re: Selecting subsets of objects in a controller.

2010-11-20 Thread Joe J
Thank you very much for your advice.

Yes, my models do relate to each other like that.  This solution seems
to be what I was looking for.

Thanks again,
Joe

On Nov 20, 8:30 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 Depends on the model. I will assume

 db.define_table('org',Field('name'))
 db.define_table('eventtype,Field('org',db.org),Field('name'))

 In this case

 def edit():
     org_id, eventtype_id=request.args(0),request.args(1)
     eventtype==db.eventtype(eventtype_id,org=org_id) or
 redirect(URL(...))

 I do not understand the Django example since it is not using the
 ord_id information.

 On Nov 20, 6:31 pm, Joe J joe.jasin...@gmail.com wrote:

  Hi All,
    I have a one-to-many relationship between a table called org and a
  table called eventtype.  (one org can have many eventtypes).

  I'm trying to construct a controller function that can edit a
  eventtype belonging to a specific org.  The URL might look something
  like:
  /app_name/eventtype/edit/[org_name_id]/[event_type_id]/

  I'm like to pass the org_id, and eventtype_id in as arguments to the
  controller function and then return the given eventtype object
  instance only if it belongs to the selected org.

  def edit():
      # example I found in the book
      try: org=db.org(request.args(0))
      except: redirect(URL('org','index'))

      eventtype_id = request.args(1)
      # trying to find a way to select the eventtype
      # from the orgs available eventtypes.  I want
      # the eventtype var to be the selected
      # eventtype instance (not a list of fields)
      try: eventtype=db.eventtype(eventtype_id, db.org???)
      except: redirect(URL('org','index'))

  If it helps clarify the question, here is the Django syntax for what I
  am trying to do.
      
      try:
          eventtype=org.eventtype_set.get(id=eventtype_id)
      except 
          return HttpRedirect(...)

  Any help is much appreciated.  Thank you for reading at this.
  Joe




Re: [web2py] Re: very long wait for http://127.0.0.1:8000/ on IE and Firefox browsers

2010-11-20 Thread Luis Díaz
I had a similar problem and was produced by my work poxy

if you are behind a proxy, I recommend you disable it in your browser while
you do local tests.

--
google translator

-- 
Díaz Luis
TSU Analisis de Sistemas
Universidad de Carabobo

http://web2pyfacil.blogspot.com/
Facultad de 
Odontologíahttp://www.odontologia.uc.edu.ve/index.php?option=com_contentview=articleid=102Itemid=85


  1   2   >