[web2py] Re: from devel list

2013-09-27 Thread Gour
On Thu, 26 Sep 2013 14:40:54 -0700 (PDT)
Cliff Kachinske cjk...@gmail.com wrote:

Hi Cliff,

 Gour,
 
 Do you mean something like Drupal?

No, I mean Mezzanine (http://mezzanine.jupo.org/ 
http://cartridge.jupo.org/) based on Django framework which was created
and developed by a single guy.

THe project is, according to Bitbucket created on 2010-06-08 and it has,
according to github ~3k commits, 139 contributors, a337 stargazers,
impressive set of features and decent list of sites built with it
(http://mezzanine.jupo.org/sites/)

I know about the argument that Django is older and/or more mature than
web2py, but, according to the web2py site, the project had version 1.0
in 2007, and in comparison with Mezzanine, I believe it's old enough to
get some decent CMS enabling people to choose it as preferred platform
(instead of using WP, Joomla, Drupal...) for building *geneneral* web
sites which can be easily customized/tailored according to the client's
needs.

Mezzanine also has fair number of 3rd party add-ons
(https://github.com/stephenmcd/mezzanine) filling the potential gaps of
the core app.

Sometimes within the Django community it was heard that there are no
'general' CMS solutions 'cause it is too easy to build one from the
scratch.

Fortunately, such concept is not prevailing any longer and there are
several apps available: https://www.djangopackages.com/grids/g/cms/

If there is no value in abstracting some common features and make it
'general' CMS, then one can reason that there is no value to abstract
some tasks and make them into full-featured framework.

Shortly, my point is that at the moment web2py is filling specific niche
of being mostly used in intranet and/or smaller apps, but by having
general CMS/ecommerce app ala Mezzanine/Cartridge, the usage of the
framework could exponentially increase considering other 'pros' of the
framework.


Sincerely,
Gour

-- 
Thus the wise living entity's pure consciousness becomes covered by 
his eternal enemy in the form of lust, which is never satisfied and 
which burns like fire.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Default value for upload filename

2013-09-27 Thread Martin Weissenboeck
Hi,
I have a SQLFORM with a field with type=upload. How can I prepare a
start value for the filename?

Regards, Martin

(Sorry - maybe I have sent this questiion twice)

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] grid, smartgrid and ignore_default_filters

2013-09-27 Thread Martin Weissenboeck
Hi,
I am using default filters at many places. Now I want to bulid a grid or a
smartgrid, but I have to set ignore_default_filters=True. How can it be
done? The parameterquery seems not be the right way.

Regards, Martin

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] smartgrid and represent

2013-09-27 Thread Mirko
Hi,

I'm using 2.5.1 and I defined a table with a default format which I 
override in my controller with represent attribute and then I call 
smartgrid on another table referencing the first one.

When I call the controller, smartgrid shows a tabular display and the 
representation I overrode is taken into account, the correct string 
representation is displayed, fine.

But when I click on add button or edit button, it appears that the default 
format is used for the dropdown list.

I've tried many workarounds unsuccessfully, but I'm sure the new 
representation code line is executed and it looks like on creation or 
editing smartgrid is reloading the table definition after that...

Or I'm I missing something ?

Thanks in advance!

Mirko

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Default value for upload filename

2013-09-27 Thread Niphlod
you can't preselect a value for it, no browser will allow a web page to 
automatically fetch a file on the client's computer  it's a security 
issue and I'm not sure it will ever be supported . NB: it's a problem of 
the browser, not web2py's

Il giorno venerdì 27 settembre 2013 10:05:03 UTC+2, mweissen ha scritto:

 Hi, 
 I have a SQLFORM with a field with type=upload. How can I prepare a 
 start value for the filename?

 Regards, Martin

 (Sorry - maybe I have sent this questiion twice)
  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Default value for upload filename

2013-09-27 Thread Martin Weissenboeck
Good pioint - thank you for the explanation.


2013/9/27 Niphlod niph...@gmail.com

 you can't preselect a value for it, no browser will allow a web page to
 automatically fetch a file on the client's computer  it's a security
 issue and I'm not sure it will ever be supported . NB: it's a problem of
 the browser, not web2py's

 Il giorno venerdì 27 settembre 2013 10:05:03 UTC+2, mweissen ha scritto:

 Hi,
 I have a SQLFORM with a field with type=upload. How can I prepare a
 start value for the filename?

 Regards, Martin

 (Sorry - maybe I have sent this questiion twice)

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread hiro
Small bump, this error is still present in latest stable version.

On Thursday, September 19, 2013 10:49:35 AM UTC+2, hiro wrote:

 In the book I read:

 *Showing virtual fields in SQLFORM.grid and smartgrid*
 In recent versions of web2py, virtual fields are shown in grids like 
 normal fields: either shown alongside all other fields by default, or by 
 including them in the fields argument. However, virtual fields are not 
 sortable.

 However, if i use the welcome app and define:

 db.define_table('entity',
 Field('entity_name', 'string'),
 Field('slogan', 'string'),
 Field.Virtual('slogan2', lambda row: row.entity.slogan+', it is 
 really the best.')
 )

 and then create a grid:

 def index():
 my_grid = SQLFORM.grid(db.entity)
 return locals()

 Reading the book I expect this to work. However I get the error 'Query 
 Not Supported: no such column: entity.slogan2' in the smartgrid.

 Massimo, is this related to to the same bug I asked about yesterday? (I 
 have not yet updated my web2py to trunk, but did not find anything about 
 this issue in the tracker.)

 One solution might be to change the Virtual Fiels to computed fields.

 A big hug to all web2py contributors!


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: smartgrid and represent

2013-09-27 Thread Mirko
Here's a code example :

db definition:
db.define_table('person', Field('name'), format='%(name)s')
db.define_table('thing',  Field('name'), Field('owner_id','reference 
person'), format='%(name)s')

controller:
def manage_test():
db.thing.owner_id.represent=lambda id, row: '%s' % 
db.person[row.owner_id].name.upper()
grid=SQLFORM.smartgrid(db.thing)
return dict(grid=grid)

db.thing.owner_id.represent is not taken into account when click on add or 
edit button.

Many thanks!


On Friday, September 27, 2013 10:47:38 AM UTC+2, Mirko wrote:

 Hi,

 I'm using 2.5.1 and I defined a table with a default format which I 
 override in my controller with represent attribute and then I call 
 smartgrid on another table referencing the first one.

 When I call the controller, smartgrid shows a tabular display and the 
 representation I overrode is taken into account, the correct string 
 representation is displayed, fine.

 But when I click on add button or edit button, it appears that the default 
 format is used for the dropdown list.

 I've tried many workarounds unsuccessfully, but I'm sure the new 
 representation code line is executed and it looks like on creation or 
 editing smartgrid is reloading the table definition after that...

 Or I'm I missing something ?

 Thanks in advance!

 Mirko


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread Mirko
Hi,
I confirm this error here with 2.5.1
Ciao ciao
Mirko

On Thursday, September 19, 2013 10:49:35 AM UTC+2, hiro wrote:

 In the book I read:

 *Showing virtual fields in SQLFORM.grid and smartgrid*
 In recent versions of web2py, virtual fields are shown in grids like 
 normal fields: either shown alongside all other fields by default, or by 
 including them in the fields argument. However, virtual fields are not 
 sortable.

 However, if i use the welcome app and define:

 db.define_table('entity',
 Field('entity_name', 'string'),
 Field('slogan', 'string'),
 Field.Virtual('slogan2', lambda row: row.entity.slogan+', it is 
 really the best.')
 )

 and then create a grid:

 def index():
 my_grid = SQLFORM.grid(db.entity)
 return locals()

 Reading the book I expect this to work. However I get the error 'Query 
 Not Supported: no such column: entity.slogan2' in the smartgrid.

 Massimo, is this related to to the same bug I asked about yesterday? (I 
 have not yet updated my web2py to trunk, but did not find anything about 
 this issue in the tracker.)

 One solution might be to change the Virtual Fiels to computed fields.

 A big hug to all web2py contributors!


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: smartgrid and represent

2013-09-27 Thread Anthony
The dropdown on a create/edit form is not controlled by the field's 
represent attribute -- instead, it is the field's IS_IN_DB validator that 
creates the dropdown. So, you could either manually override the default 
IS_IN_DB validator, or just change the db.person._format attribute, which 
will affect both the represent attribute and the IS_IN_DB validator of 
db.thing.owner_id:

db.person._format = lambda r: r.name.upper()

Note, with the above, you no longer need to explicitly change the 
db.thing.owner_id.represent attribute.

Anthony

On Friday, September 27, 2013 7:30:13 AM UTC-4, Mirko wrote:

 Here's a code example :

 db definition:
 db.define_table('person', Field('name'), format='%(name)s')
 db.define_table('thing',  Field('name'), Field('owner_id','reference 
 person'), format='%(name)s')

 controller:
 def manage_test():
 db.thing.owner_id.represent=lambda id, row: '%s' % 
 db.person[row.owner_id].name.upper()
 grid=SQLFORM.smartgrid(db.thing)
 return dict(grid=grid)

 db.thing.owner_id.represent is not taken into account when click on add or 
 edit button.

 Many thanks!


 On Friday, September 27, 2013 10:47:38 AM UTC+2, Mirko wrote:

 Hi,

 I'm using 2.5.1 and I defined a table with a default format which I 
 override in my controller with represent attribute and then I call 
 smartgrid on another table referencing the first one.

 When I call the controller, smartgrid shows a tabular display and the 
 representation I overrode is taken into account, the correct string 
 representation is displayed, fine.

 But when I click on add button or edit button, it appears that the 
 default format is used for the dropdown list.

 I've tried many workarounds unsuccessfully, but I'm sure the new 
 representation code line is executed and it looks like on creation or 
 editing smartgrid is reloading the table definition after that...

 Or I'm I missing something ?

 Thanks in advance!

 Mirko



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Error upload file on 2.6.4

2013-09-27 Thread Relsi Hur Maron

Hi all, I have a upload javascript in my app tha call a function in my 
controller to upload files. 

It was working fine until now, so I update my web2py to latest version and 
now I get te error:  not indexable in my upload function.

Well, my functions is:

def upload_callback():
if 'qqfile' in request.vars:
filename = request.vars.qqfile
newfilename = db.realty_photos.photo.store(request.body, filename)
db.realty_photos.insert(photo=newfilename,realty_id=request.args(0))
return response.json({'success': 'true'})


And I sed to it a url like it:

/upload_callback/5?qqfile=1.png

It works fine in my old version 2.5.1, but not now.

All help is welcome!

Thanks for all.





















-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: smartgrid and represent

2013-09-27 Thread Mirko
Hi Anthony, and thanks for answering.

Actually

db.person._format = lambda row: '%s' % row.name.upper()

doesnt not affect the dropdown list building...


I had to add this

db.thing.owner_id.requires=IS_IN_DB(db,'person.id',lambda row: '%s' % 
row.name.upper())

to have the dropdown list in upper case...

On Friday, September 27, 2013 2:54:17 PM UTC+2, Anthony wrote:

 The dropdown on a create/edit form is not controlled by the field's 
 represent attribute -- instead, it is the field's IS_IN_DB validator that 
 creates the dropdown. So, you could either manually override the default 
 IS_IN_DB validator, or just change the db.person._format attribute, which 
 will affect both the represent attribute and the IS_IN_DB validator of 
 db.thing.owner_id:

 db.person._format = lambda r: r.name.upper()

 Note, with the above, you no longer need to explicitly change the 
 db.thing.owner_id.represent attribute.

 Anthony

 On Friday, September 27, 2013 7:30:13 AM UTC-4, Mirko wrote:

 Here's a code example :

 db definition:
 db.define_table('person', Field('name'), format='%(name)s')
 db.define_table('thing',  Field('name'), Field('owner_id','reference 
 person'), format='%(name)s')

 controller:
 def manage_test():
 db.thing.owner_id.represent=lambda id, row: '%s' % 
 db.person[row.owner_id].name.upper()
 grid=SQLFORM.smartgrid(db.thing)
 return dict(grid=grid)

 db.thing.owner_id.represent is not taken into account when click on add 
 or edit button.

 Many thanks!


 On Friday, September 27, 2013 10:47:38 AM UTC+2, Mirko wrote:

 Hi,

 I'm using 2.5.1 and I defined a table with a default format which I 
 override in my controller with represent attribute and then I call 
 smartgrid on another table referencing the first one.

 When I call the controller, smartgrid shows a tabular display and the 
 representation I overrode is taken into account, the correct string 
 representation is displayed, fine.

 But when I click on add button or edit button, it appears that the 
 default format is used for the dropdown list.

 I've tried many workarounds unsuccessfully, but I'm sure the new 
 representation code line is executed and it looks like on creation or 
 editing smartgrid is reloading the table definition after that...

 Or I'm I missing something ?

 Thanks in advance!

 Mirko



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-27 Thread Loïc
Shortly, my point is that at the moment web2py is filling specific niche 
of being mostly used in intranet and/or smaller apps, but by having 
general CMS/ecommerce app ala Mezzanine/Cartridge, the usage of the 
framework could exponentially increase considering other 'pros' of the 
framework. 

Personnally when I looked for a CMS build in web2py I didn't find anything 
generic and *simple *enough to build my customers websites.
Then I decided to develop my own little CMS. (I think many other Web2py 
users are in the same case)
I released the sources, here, but it seems that only a few people are 
interested in. (I received only one PR for a typo in a fixture file)

So I think we have a lot of disorganized CMS apps, each used by a few of 
people, but (until now) nobody has accumulate enough contributors to 
compete with something like mezzanine.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Error trying to view Errors for my app

2013-09-27 Thread Jim S
Thanks - Went into admin and did a Clean.  Solved the problem.

-Jim

On Thursday, September 26, 2013 4:10:31 PM UTC-5, Niphlod wrote:

 login remotely and 
 cd applications/appname/errors
 rm *

 or just go into the main page of admin, click on the button next to the 
 app and press clean (although it will clean also sessions)

 On Thursday, September 26, 2013 10:48:22 PM UTC+2, Jim S wrote:

 I wasn't trying to display the error, just the list of errors.  Would 
 that make a difference?  I'm assuming that this will be fixed.  Is there a 
 way I can clear all my errors without using the console?


 On Thu, Sep 26, 2013 at 3:43 PM, Niphlod nip...@gmail.com wrote:

 this is due to a new web2py trying to open an error generated with an 
 old web2py.


 On Thursday, September 26, 2013 10:29:08 PM UTC+2, Jim S wrote:

 Went here:  
 http://127.0.0.1:8000/admin/**default/errors/sideboardhttp://127.0.0.1:8000/admin/default/errors/sideboard

 to see the errors in my app (sideboard) but the attached traceback.

 -Jim

  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/web2py/LPbKbWHMjgY/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Richard Vézina
CMS is dead!! Yes there is still need for it, but there is plenty of
already mature and working solution out there. With the frameworks you can
make much better than any CMS will never be able to do by developping a
specific app that address the exact needs of your cusomers. For sure it
requires more skills, but you should master what you do anyway if you are
serious. For a serious cusomer 5K is a basic check in the Web. For this
price a good developper can build something really good for the specific
needs of the client using Frameworks. The resulting app will be easy to
evolve database centric according to the need of the client. For others
that only one page on the web there is CMS (WP, Joomla, etc.). But I think
that trying to build a custom site with CMS as many are doing with plugins
is a waste of time and money and only lead to a poorly secure web site. I
had issue with WordPress and plugins in the pass and there is no way to
know if a plugins is safe or not even if it is largely used.

I am not saying that creating a good web2py CMS is not useful, but maybe
just use WP or Joomla with a custom app for client specific need in
symbiosis is more money wise?? So you have best of both world...

Richard


On Fri, Sep 27, 2013 at 9:32 AM, Loïc loic.esp...@gmail.com wrote:

 Shortly, my point is that at the moment web2py is filling specific niche
 of being mostly used in intranet and/or smaller apps, but by having
 general CMS/ecommerce app ala Mezzanine/Cartridge, the usage of the
 framework could exponentially increase considering other 'pros' of the
 framework.

 Personnally when I looked for a CMS build in web2py I didn't find anything
 generic and *simple *enough to build my customers websites.
 Then I decided to develop my own little CMS. (I think many other Web2py
 users are in the same case)
 I released the sources, here, but it seems that only a few people are
 interested in. (I received only one PR for a typo in a fixture file)

 So I think we have a lot of disorganized CMS apps, each used by a few of
 people, but (until now) nobody has accumulate enough contributors to
 compete with something like mezzanine.

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Error upload file on 2.6.4

2013-09-27 Thread Niphlod
try current trunk.

Il giorno venerdì 27 settembre 2013 15:17:54 UTC+2, Relsi Hur Maron ha 
scritto:


 Hi all, I have a upload javascript in my app that call a function in my 
 controller to upload files. 

 It was working fine until now, so I update my web2py to latest version 
 and now I get te error:  not indexable in my upload function.

 Well, my functions is:

 def upload_callback():
 if 'qqfile' in request.vars:
 filename = request.vars.qqfile
 newfilename = db.realty_photos.photo.store(request.body, filename)
 db.realty_photos.insert(photo=newfilename,realty_id=request.args(0
 ))
 return response.json({'success': 'true'})


 And I sed to it a url like it:

 /upload_callback/5?qqfile=1.png

 It works fine in my old version 2.5.1, but not now.

 All help is welcome!

 Thanks for all.























-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Error upload file on 2.6.4

2013-09-27 Thread Relsi Hur Maron

Thanks! Now is working. 

It is a production app, no problem to use the current trunk?

Em sexta-feira, 27 de setembro de 2013 11h20min01s UTC-3, Niphlod escreveu:

 try current trunk.

 Il giorno venerdì 27 settembre 2013 15:17:54 UTC+2, Relsi Hur Maron ha 
 scritto:


 Hi all, I have a upload javascript in my app that call a function in my 
 controller to upload files. 

 It was working fine until now, so I update my web2py to latest version 
 and now I get te error:  not indexable in my upload function.

 Well, my functions is:

 def upload_callback():
 if 'qqfile' in request.vars:
 filename = request.vars.qqfile
 newfilename = db.realty_photos.photo.store(request.body, filename
 )
 db.realty_photos.insert(photo=newfilename,realty_id=request.args(
 0))
 return response.json({'success': 'true'})


 And I sed to it a url like it:

 /upload_callback/5?qqfile=1.png

 It works fine in my old version 2.5.1, but not now.

 All help is welcome!

 Thanks for all.























-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: smartgrid and represent

2013-09-27 Thread Anthony
Can you show your exact code (the code you showed can't be the code you're 
using, as there would be no add or edit buttons with that code)? It 
definitely works when I try it.

Anthony

On Friday, September 27, 2013 9:22:37 AM UTC-4, Mirko wrote:

 Hi Anthony, and thanks for answering.

 Actually

 db.person._format = lambda row: '%s' % row.name.upper()

 doesnt not affect the dropdown list building...


 I had to add this

 db.thing.owner_id.requires=IS_IN_DB(db,'person.id',lambda row: '%s' % 
 row.name.upper())

 to have the dropdown list in upper case...

 On Friday, September 27, 2013 2:54:17 PM UTC+2, Anthony wrote:

 The dropdown on a create/edit form is not controlled by the field's 
 represent attribute -- instead, it is the field's IS_IN_DB validator that 
 creates the dropdown. So, you could either manually override the default 
 IS_IN_DB validator, or just change the db.person._format attribute, which 
 will affect both the represent attribute and the IS_IN_DB validator of 
 db.thing.owner_id:

 db.person._format = lambda r: r.name.upper()

 Note, with the above, you no longer need to explicitly change the 
 db.thing.owner_id.represent attribute.

 Anthony

 On Friday, September 27, 2013 7:30:13 AM UTC-4, Mirko wrote:

 Here's a code example :

 db definition:
 db.define_table('person', Field('name'), format='%(name)s')
 db.define_table('thing',  Field('name'), Field('owner_id','reference 
 person'), format='%(name)s')

 controller:
 def manage_test():
 db.thing.owner_id.represent=lambda id, row: '%s' % 
 db.person[row.owner_id].name.upper()
 grid=SQLFORM.smartgrid(db.thing)
 return dict(grid=grid)

 db.thing.owner_id.represent is not taken into account when click on add 
 or edit button.

 Many thanks!


 On Friday, September 27, 2013 10:47:38 AM UTC+2, Mirko wrote:

 Hi,

 I'm using 2.5.1 and I defined a table with a default format which I 
 override in my controller with represent attribute and then I call 
 smartgrid on another table referencing the first one.

 When I call the controller, smartgrid shows a tabular display and the 
 representation I overrode is taken into account, the correct string 
 representation is displayed, fine.

 But when I click on add button or edit button, it appears that the 
 default format is used for the dropdown list.

 I've tried many workarounds unsuccessfully, but I'm sure the new 
 representation code line is executed and it looks like on creation or 
 editing smartgrid is reloading the table definition after that...

 Or I'm I missing something ?

 Thanks in advance!

 Mirko



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-27 Thread Gour
On Fri, 27 Sep 2013 10:16:12 -0400
Richard Vézina
ml.richard.vez...@gmail.com wrote:

 CMS is dead!! 

I don't agree.

 Yes there is still need for it, but there is plenty of
 already mature and working solution out there. 

But not for web2py.

 With the frameworks
 you can make much better than any CMS will never be able to do by
 developping a specific app that address the exact needs of your
 cusomers. For sure it requires more skills, but you should master
 what you do anyway if you are serious. 

I do not believe it's wise to re-invent major part of the common tasks
for every client's app. It means that such apps will have very limited
userbase and therefore not much testing in the filed and therefore prone
to all kinds of problems.

 For a serious cusomer 5K is a basic check in the Web. For this price a
 good developper can build something really good for the specific needs
 of the client using Frameworks. The resulting app will be easy to
 evolve database centric according to the need of the client. 

If we put Mezzanine thorugh sloccount, we get the following:

Total Physical Source Lines of Code (SLOC)= 14,849
Development Effort Estimate, Person-Years (Person-Months) = 3.40 (40.78)
 (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 0.85 (10.23)
 (Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule)  = 3.99
Total Estimated Cost to Develop   = $ 459,117
 (average salary = $56,286/year, overhead = 2.40).


so your estimated 5k budget won't accomplish much. :-)

 For others that only one page on the web there is CMS (WP, Joomla,
 etc.). But I think that trying to build a custom site with CMS as many
 are doing with plugins is a waste of time and money and only lead to a
 poorly secure web site. I had issue with WordPress and plugins in the
 pass and there is no way to know if a plugins is safe or not even if
 it is largely used.

Let's don't mix apples and oranges. Here I'm mostly thinking about
Python-based frameworks, iow. Django vs. web2py. ;)

 I am not saying that creating a good web2py CMS is not useful, but
 maybe just use WP or Joomla with a custom app for client specific
 need in symbiosis is more money wise?? So you have best of both
 world...

Complete-stack frameworks like Django, Pyramid...have CMS projects and
even microframework like Flask has it, but it looks as web2py are
special not having one nor considering it needed, so no wonder it
occupies only specific niche.


Sincerely,
Gour

-- 
Before giving up this present body, if one is able to tolerate 
the urges of the material senses and check the force of desire and 
anger, he is well situated and is happy in this world.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-27 Thread Gour
On Fri, 27 Sep 2013 06:32:28 -0700 (PDT)
Loïc loic.esp...@gmail.com wrote:

 Personnally when I looked for a CMS build in web2py I didn't find
 anything generic and *simple *enough to build my customers websites.

Same here and that's why I'll explore Mezzanine for my needs.

 Then I decided to develop my own little CMS. (I think many other
 Web2py users are in the same case)

That's pity and waste of resources, imho, but everyone has its own free
will. :-)

 I released the sources, here, but it seems that only a few people are 
 interested in. (I received only one PR for a typo in a fixture file)

I do not recall if I tried it...maybe it was too simple. Which one it
was?

 So I think we have a lot of disorganized CMS apps, each used by a few
 of people, but (until now) nobody has accumulate enough contributors
 to compete with something like mezzanine.

You're right and I believe that *disorganized* is keyword here. :-(


Sincerely,
Gour

-- 
The working senses are superior to dull matter; mind is higher 
than the senses; intelligence is still higher than the mind; 
and he [the soul] is even higher than the intelligence.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Loïc ESPERN
Depends on what you (or your customers) need...

I developped my little CMS to build a presentation website for a local
organization of firefighters in my city. They hadn't a lot of money to
expend, and they needed something very simple, to edit some webpages
content. Wordpress / Joomla were already overcomplicated for them.

My second customer was a town hall in a little village close to home. They
had same needs : something as simple as possible to edit a few webpages.

And so on...

Finally, of course, a specific app that addresses exactly each customer
needs is ideal for them. But not every customer will accept to pay
thousands of dollars for only a few of basic features.



2013/9/27 Richard Vézina ml.richard.vez...@gmail.com

 CMS is dead!! Yes there is still need for it, but there is plenty of
 already mature and working solution out there. With the frameworks you can
 make much better than any CMS will never be able to do by developping a
 specific app that address the exact needs of your cusomers. For sure it
 requires more skills, but you should master what you do anyway if you are
 serious. For a serious cusomer 5K is a basic check in the Web. For this
 price a good developper can build something really good for the specific
 needs of the client using Frameworks. The resulting app will be easy to
 evolve database centric according to the need of the client. For others
 that only one page on the web there is CMS (WP, Joomla, etc.). But I think
 that trying to build a custom site with CMS as many are doing with plugins
 is a waste of time and money and only lead to a poorly secure web site. I
 had issue with WordPress and plugins in the pass and there is no way to
 know if a plugins is safe or not even if it is largely used.

 I am not saying that creating a good web2py CMS is not useful, but maybe
 just use WP or Joomla with a custom app for client specific need in
 symbiosis is more money wise?? So you have best of both world...

 Richard


 On Fri, Sep 27, 2013 at 9:32 AM, Loïc loic.esp...@gmail.com wrote:

 Shortly, my point is that at the moment web2py is filling specific niche
 of being mostly used in intranet and/or smaller apps, but by having
 general CMS/ecommerce app ala Mezzanine/Cartridge, the usage of the
 framework could exponentially increase considering other 'pros' of the
 framework.

 Personnally when I looked for a CMS build in web2py I didn't find
 anything generic and *simple *enough to build my customers websites.
 Then I decided to develop my own little CMS. (I think many other Web2py
 users are in the same case)
 I released the sources, here, but it seems that only a few people are
 interested in. (I received only one PR for a typo in a fixture file)

 So I think we have a lot of disorganized CMS apps, each used by a few of
 people, but (until now) nobody has accumulate enough contributors to
 compete with something like mezzanine.

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.


  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/S9XmLRdmlD8/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-27 Thread Loïc
I do not recall if I tried it...maybe it was too simple. Which one it 
was? 

Yes simple is the word :-)

https://github.com/espern/tiny_website
http://www.tinywebsite.net/

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] contributing patches

2013-09-27 Thread Ricardo Cárdenas
(Apologies if this has been asked before.)

Kudos for web2py and for this community; happy to have found you. Web2py's 
very useful for my projects; even enjoyable!

I'd like to pay it back, starting with minor patches that I think could be 
useful to others. I can fork and watch on github, and generate PRs, but... Is 
there a document with guidelines on doing so? (I don't mean github 
instructions, more like what you are looking for in good PRs) I saw 
reference to an agreement that should be signed? Mailing lists one can join 
to get the hang of etiquette and how the devs currently manage the process?

best regards -Ricardo

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-27 Thread Gour
On Fri, 27 Sep 2013 08:12:37 -0700 (PDT)
Loïc loic.esp...@gmail.com wrote:

 Yes simple is the word :-)

:-)

 https://github.com/espern/tiny_website
 http://www.tinywebsite.net/

Nope, I didn't try it. It was created *after* I already pretty much gave
up idea to find appropriate web2py-based CMS, but your project looks
promising, although  Ican't say if it would be possible to enhance it up
to the level of something like Mezzanine.


Sincerely,
Gour

-- 
Never was there a time when I did not exist, 
nor you, nor all these kings; nor in the future 
shall any of us cease to be.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Loïc ESPERN
Neither do I...
However I'm open to ideas/contributions to improve it, step by step

Regards


2013/9/27 Gour g...@atmarama.net

 On Fri, 27 Sep 2013 08:12:37 -0700 (PDT)
 Loïc loic.esp...@gmail.com wrote:

  Yes simple is the word :-)

 :-)

  https://github.com/espern/tiny_website
  http://www.tinywebsite.net/

 Nope, I didn't try it. It was created *after* I already pretty much gave
 up idea to find appropriate web2py-based CMS, but your project looks
 promising, although  Ican't say if it would be possible to enhance it up
 to the level of something like Mezzanine.


 Sincerely,
 Gour

 --
 Never was there a time when I did not exist,
 nor you, nor all these kings; nor in the future
 shall any of us cease to be.

 http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/S9XmLRdmlD8/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: smartgrid and represent

2013-09-27 Thread Mirko
Hi Anthony,
it is working now, sorry for the inconvenience.
Thanks again!

On Friday, September 27, 2013 4:40:05 PM UTC+2, Anthony wrote:

 Can you show your exact code (the code you showed can't be the code you're 
 using, as there would be no add or edit buttons with that code)? It 
 definitely works when I try it.

 Anthony

 On Friday, September 27, 2013 9:22:37 AM UTC-4, Mirko wrote:

 Hi Anthony, and thanks for answering.

 Actually

 db.person._format = lambda row: '%s' % row.name.upper()

 doesnt not affect the dropdown list building...


 I had to add this

 db.thing.owner_id.requires=IS_IN_DB(db,'person.id',lambda row: '%s' % 
 row.name.upper())

 to have the dropdown list in upper case...

 On Friday, September 27, 2013 2:54:17 PM UTC+2, Anthony wrote:

 The dropdown on a create/edit form is not controlled by the field's 
 represent attribute -- instead, it is the field's IS_IN_DB validator that 
 creates the dropdown. So, you could either manually override the default 
 IS_IN_DB validator, or just change the db.person._format attribute, which 
 will affect both the represent attribute and the IS_IN_DB validator of 
 db.thing.owner_id:

 db.person._format = lambda r: r.name.upper()

 Note, with the above, you no longer need to explicitly change the 
 db.thing.owner_id.represent attribute.

 Anthony

 On Friday, September 27, 2013 7:30:13 AM UTC-4, Mirko wrote:

 Here's a code example :

 db definition:
 db.define_table('person', Field('name'), format='%(name)s')
 db.define_table('thing',  Field('name'), Field('owner_id','reference 
 person'), format='%(name)s')

 controller:
 def manage_test():
 db.thing.owner_id.represent=lambda id, row: '%s' % 
 db.person[row.owner_id].name.upper()
 grid=SQLFORM.smartgrid(db.thing)
 return dict(grid=grid)

 db.thing.owner_id.represent is not taken into account when click on add 
 or edit button.

 Many thanks!


 On Friday, September 27, 2013 10:47:38 AM UTC+2, Mirko wrote:

 Hi,

 I'm using 2.5.1 and I defined a table with a default format which I 
 override in my controller with represent attribute and then I call 
 smartgrid on another table referencing the first one.

 When I call the controller, smartgrid shows a tabular display and the 
 representation I overrode is taken into account, the correct string 
 representation is displayed, fine.

 But when I click on add button or edit button, it appears that the 
 default format is used for the dropdown list.

 I've tried many workarounds unsuccessfully, but I'm sure the new 
 representation code line is executed and it looks like on creation or 
 editing smartgrid is reloading the table definition after that...

 Or I'm I missing something ?

 Thanks in advance!

 Mirko



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Jim S
I am no expert on all of these CMS systems but have used WordPress in the 
past to build some websites for local youth sports clubs.  Right now I have 
one that is a WordPress site and one that is a web2py app.  Instead of 
writing a web2py app for these types of things what I would love to see is 
a WordPress plug-in that would allow me to call a web2py controller, 
passing authentication information (if logged in) and allowing me to return 
a view that would be embedded in the WordPress page.

I really like the community around WordPress, the theming capabilities and 
the ease with which regular people can add content.  My challenge is 
usually to add data-driven pages to the site and I would love to be able to 
use web2py to deliver that data.

Building a CMS and community like WordPress has would be an enormous 
undertaking.  But, building a plugin that let us take advantage of that CMS 
and community is something that I feel would be attainable.  Alas, I've 
never developed a WordPress plugin.  

Just my opinion on this. Wish I had the time/skills to take this on.

-Jim

On Friday, September 27, 2013 10:53:57 AM UTC-5, Loïc ESPERN wrote:

 Neither do I...
 However I'm open to ideas/contributions to improve it, step by step

 Regards


 2013/9/27 Gour go...@atmarama.net javascript:

 On Fri, 27 Sep 2013 08:12:37 -0700 (PDT)
 Loïc loic@gmail.com javascript: wrote:

  Yes simple is the word :-)

 :-)

  https://github.com/espern/tiny_website
  http://www.tinywebsite.net/

 Nope, I didn't try it. It was created *after* I already pretty much gave
 up idea to find appropriate web2py-based CMS, but your project looks
 promising, although  Ican't say if it would be possible to enhance it up
 to the level of something like Mezzanine.


 Sincerely,
 Gour

 --
 Never was there a time when I did not exist,
 nor you, nor all these kings; nor in the future
 shall any of us cease to be.

 http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to a topic in the 
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/web2py/S9XmLRdmlD8/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Richard Vézina
I don't say re-invent the wheel. If you have a couple of clients, you will
re-use app, so it get tested overtime. As mention Loîc, for most client CMS
is overkill and only serve the purpose to keeping the developper away form
CSS. A basic html page is more then enough for greate number of small
business because of lack of vision maybe or just because there core
business doesn't required online tool. I setup many CMS for many
organisation since 2000 and most of the time the client where calling me to
update stuff on the site even if I give them a formation to show how easy
it was to update or add more content on their site. That why I say CMS is
dead. It will never really reach it objective for small business. Maybe it
was not the objective... But turning client into webmaster (in french we
distinguish between webmester and édimestre, so here I would say édimestre
or webmaster that only update content) is not working. CSM is good for mid
to large organisation, but most of the time they will build their own
solution with a framework today...

So, I am not against creating a CMS, but what serve to create another pizza
shop in town, there is already 3...

I think it is more pragmatic to combine technology that works, even if I
where prefere to keep everything simple by doing everthing in web2py...

This is just my opinion and only my opinion...

Richard



On Fri, Sep 27, 2013 at 11:43 AM, Gour g...@atmarama.net wrote:

 On Fri, 27 Sep 2013 08:12:37 -0700 (PDT)
 Loïc loic.esp...@gmail.com wrote:

  Yes simple is the word :-)

 :-)

  https://github.com/espern/tiny_website
  http://www.tinywebsite.net/

 Nope, I didn't try it. It was created *after* I already pretty much gave
 up idea to find appropriate web2py-based CMS, but your project looks
 promising, although  Ican't say if it would be possible to enhance it up
 to the level of something like Mezzanine.


 Sincerely,
 Gour

 --
 Never was there a time when I did not exist,
 nor you, nor all these kings; nor in the future
 shall any of us cease to be.

 http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Richard Vézina
+1 Jim

:)

Or just take a web2py tiny CMS ans build on it and commit your addon to the
web2py-cms project, so we all get a good tiny CMS to address some client
needs in this area rapidly...

Richard




On Fri, Sep 27, 2013 at 12:11 PM, Jim S j...@qlf.com wrote:

 I am no expert on all of these CMS systems but have used WordPress in the
 past to build some websites for local youth sports clubs.  Right now I have
 one that is a WordPress site and one that is a web2py app.  Instead of
 writing a web2py app for these types of things what I would love to see is
 a WordPress plug-in that would allow me to call a web2py controller,
 passing authentication information (if logged in) and allowing me to return
 a view that would be embedded in the WordPress page.

 I really like the community around WordPress, the theming capabilities and
 the ease with which regular people can add content.  My challenge is
 usually to add data-driven pages to the site and I would love to be able to
 use web2py to deliver that data.

 Building a CMS and community like WordPress has would be an enormous
 undertaking.  But, building a plugin that let us take advantage of that CMS
 and community is something that I feel would be attainable.  Alas, I've
 never developed a WordPress plugin.

 Just my opinion on this. Wish I had the time/skills to take this on.

 -Jim


 On Friday, September 27, 2013 10:53:57 AM UTC-5, Loïc ESPERN wrote:

 Neither do I...
 However I'm open to ideas/contributions to improve it, step by step

 Regards


 2013/9/27 Gour go...@atmarama.net

 On Fri, 27 Sep 2013 08:12:37 -0700 (PDT)
 Loïc loic@gmail.com wrote:

  Yes simple is the word :-)

 :-)

  https://github.com/espern/**tiny_websitehttps://github.com/espern/tiny_website
  http://www.tinywebsite.net/

 Nope, I didn't try it. It was created *after* I already pretty much gave
 up idea to find appropriate web2py-based CMS, but your project looks
 promising, although  Ican't say if it would be possible to enhance it up
 to the level of something like Mezzanine.


 Sincerely,
 Gour

 --
 Never was there a time when I did not exist,
 nor you, nor all these kings; nor in the future
 shall any of us cease to be.

 http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/**web2py 
 http://github.com/web2py/web2py(Source code)
 - 
 https://code.google.com/p/**web2py/issues/listhttps://code.google.com/p/web2py/issues/list(Report
  Issues)
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit https://groups.google.com/d/**
 topic/web2py/S9XmLRdmlD8/**unsubscribehttps://groups.google.com/d/topic/web2py/S9XmLRdmlD8/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 web2py+un...@**googlegroups.com.

 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .


  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
Hey all.

I'm facing a strange problem concerning special characters.

Using web2py shell, through command line (linux shell), I do this:

#   start
$ python web2py.py -S welcome
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
Database drivers available: SQLite(sqlite3), MySQL(pymysql),
PostgreSQL(pg8000), IMAP(imaplib)
WARNING:web2py:import IPython error; use default python shell
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
(InteractiveConsole)
 print áéíóú   # note the strange chars!
áéíóú
 from unicodedata import normalize
 normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore) # 
 again!
'AAuAA3Ao'
#   end

Note the noisy characters on the last line.


Then, at the same machine, I enter into the naked Python shell and:
#   start
$ python
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
 print áéíóú # looks ok
áéíóú
 from unicodedata import normalize
 normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore) # ok 
 again.
'aeiou'
#   end

Everything works fine.

The same code.

I found this problem because I'm working to strip special characters
off of names, with unicodedata.normalize().

If it wan't strange enough, the unicodedata.normalize() works fine
from web environment, throug app admin. There the normalization works
as expected (the same way as the standard naked Python shell).

What could be the root of this situation?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: batch script - best way to reopen a closed database connection?

2013-09-27 Thread Michele Comitini
Ricardo,

Your use case has been useful to pinpoint some issues with the semantic of
commit/rollback/close in the DAL.
We are working on it to improve ease of use. So thank you!

mic


2013/9/27 Ricardo Cárdenas ricardo.carde...@gmail.com

 @michele, @niphlod, @Derek

 My solution oddly turned out to be a combination of all of your
 suggestions! :)

 On Postgres, Michele's snippet below works for me too. On MySQL it works,
 but then raises an exception (attached below). Apparently, upon exit web2py
 tries to close the dead MySQL connection, and MySQL complains (even though
 the connection had no outstanding transactions). The PostgreSQL behavior
 seems different; web2py is silent when trying to close a dead connection
 with no outstanding transactions.

 So I tried db._adapter.close() right after the db.commit(). That
 eliminated the MySQL exception. In fact, if there are no pending
 transactions, db._adapter.close() is all that is needed.

 Problem solved for me. But I wonder whether the dev's might consider
 exposing an explicit db.close() and db.open() to avoid calling 
 db._adapter.close()
 and then DAL(...auto_import=True), for the use case where a script does a
 lot of processing sans database, and then resumes database use.

 Sorry if this was TL;DR for most people... best regards -Ricardo



 Traceback (most recent call last):
   File /home/rcardenas/web2py/gluon/shell.py, line 231, in run
 BaseAdapter.close_all_instances('commit')
   File /home/rcardenas/web2py/gluon/dal.py, line 560, in
 close_all_instances
 db._adapter.close(action)
   File /home/rcardenas/web2py/gluon/dal.py, line 540, in close
 getattr(self, action)()
   File /home/rcardenas/web2py/gluon/dal.py, line 1740, in commit
 if self.connection: return self.connection.commit()
 OperationalError: (2013, 'Lost connection to MySQL server during query')

 Traceback (most recent call last):
   File web2py.py, line 33, in module
 gluon.widget.start(cron=True)
   File /home/rcardenas/web2py/gluon/widget.py, line 1120, in start
 import_models=options.import_models, startfile=options.run)
   File /home/rcardenas/web2py/gluon/shell.py, line 235, in run
 BaseAdapter.close_all_instances('rollback')
   File /home/rcardenas/web2py/gluon/dal.py, line 560, in
 close_all_instances
 db._adapter.close(action)
   File /home/rcardenas/web2py/gluon/dal.py, line 540, in close
 getattr(self, action)()
   File /home/rcardenas/web2py/gluon/dal.py, line 1743, in rollback
 if self.connection: return self.connection.rollback()
 _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')



 On Wednesday, September 25, 2013 8:36:01 AM UTC-5, Michele Comitini wrote:



 -- Forwarded message --
 From: Michele Comitini michele@gmail.com
 Date: 2013/9/25
 Subject: Re: [web2py] Re: batch script - best way to reopen a closed
 database connection?
 To: Ricardo Cárdenas

 Try using the auto_import

 see the following:

 db.commit()
 sleep(20) # -- here I stop and restart the postgresql service
 db=DAL('postgres://script:**script@localhost/script',pool_**size=1,
 check_reserved=['all'], auto_import=True)
 print db(db.people).count()



 2013/9/25 Ricardo Cárdenas ricardo@gmail.com

 Hi Michele, you're right, it's better to instantiate the connection when
 needed.

  Since I have all the DAL() and define_tables() calls in db.py, I
 shouldn't have to rewrite the code elsewhere. I tried import db after the
 wait, but I guess it's not possible to import models/* because I got an
 import error. How do you suggest I implement your suggestion?

 thanks -Ricardo

 On Wednesday, September 25, 2013 4:50:38 AM UTC-5, Michele Comitini
 wrote:

 Yes, but the connection in the pool will get dropped anyway.  After
 some thought IMHO the correct way for you to fix the problem is:
 start
 ...wait...wait...
 db = DAL(...)
 use db
 db.commit() #- commit or rollback as soon as possible
 ...wait...wait...
 db = DAL(...)
 use db
 db.commit() #- commit or rollback as soon as possible
 and so on

 i.e. init the db instance right before using it.  This should avoid
 timing out connections, with consequent data loss.
 It fixes also the problem that keeping transactions open for such a
 long time is no good for anything else trying to work on that database it
 could cause all other connections/applications to stop until the
 transaction is closed or timedout!


 2013/9/25 Ricardo Cárdenas ricardo@gmail.com

 @michele - No, I'm not doing a db.commit() -- because I don't use the
 db connection at all, until many minutes later, when it fails.

 However, you bring up an interesting point. Does this mean that if I
 db.commit() at the very beginning of my script (even if there is no
 outstanding transaction), I will in effect be pushing a connection to
 sleep?

 Ricardo


 On Tuesday, September 24, 2013 5:16:20 PM UTC-5, Michele Comitini
 wrote:

 Did you remember to do a commit at each round?

 A long running script / daemon 

Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Richard Vézina
Could it be the encoding of the file that content your bash script?

Richard


On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef vinicius...@gmail.comwrote:

 Hey all.

 I'm facing a strange problem concerning special characters.

 Using web2py shell, through command line (linux shell), I do this:

 #   start
 $ python web2py.py -S welcome
 web2py Web Framework
 Created by Massimo Di Pierro, Copyright 2007-2013
 Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
 Database drivers available: SQLite(sqlite3), MySQL(pymysql),
 PostgreSQL(pg8000), IMAP(imaplib)
 WARNING:web2py:import IPython error; use default python shell
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
 (InteractiveConsole)
  print áéíóú   # note the strange chars!
 áéíóú
  from unicodedata import normalize
  normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore)
 # again!
 'AAuAA3Ao'
 #   end

 Note the noisy characters on the last line.


 Then, at the same machine, I enter into the naked Python shell and:
 #   start
 $ python
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
  print áéíóú # looks ok
 áéíóú
  from unicodedata import normalize
  normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore)
 # ok again.
 'aeiou'
 #   end

 Everything works fine.

 The same code.

 I found this problem because I'm working to strip special characters
 off of names, with unicodedata.normalize().

 If it wan't strange enough, the unicodedata.normalize() works fine
 from web environment, throug app admin. There the normalization works
 as expected (the same way as the standard naked Python shell).

 What could be the root of this situation?

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: from devel list

2013-09-27 Thread Gour
On Fri, 27 Sep 2013 12:17:04 -0400
Richard Vézina
ml.richard.vez...@gmail.com wrote:

 I don't say re-invent the wheel. If you have a couple of clients, you
 will re-use app, so it get tested overtime. 

Why not contributing such codebase to the web2py community, so that
others can built on that.

 A basic html page is more then enough for greate number of small
 business because of lack of vision maybe or just because there core
 business doesn't required online tool.

That's true and I also plan to use some SSG (static site generator) for
such use cases, but, fortunately, there are plenty of them and they're
free. :-)

  I setup many CMS for many organisation since 2000 and most of the
  time the client where calling me to update stuff on the site even if
  I give them a formation to show how easy it was to update or add more
  content on their site. That why I say CMS is dead. It will never
  really reach it objective for small business. 

There are tons of sites out built with WordPress, Joomla, Drupal,
Concre5, CMS Made Simple, SilverStripe, MODx...(not mentioning ones with
Ruby-powered CMS-es) and I simply do not believe that most of them are
updated by developers.

 CSM is good for mid to large organisation, but most of the time they
 will build their own solution with a framework today...

Here I also believe that most of such organization does not care what is
used to run their site as long as ot provides what they want, so it
depends on the agency/developer doing the work.

Here (https://www.django-cms.org/en/case-studies/mercedes-benz/) you can
see how the agency used e.g. Django-CMS to build the site for Mercedes
Benz. So, if it's good-enough for Mercedes Benz to have web site built
upon open-source Django framework and 'general' CMS, why not based on
web2py and appropriate CMS?

 So, I am not against creating a CMS, but what serve to create another
 pizza shop in town, there is already 3...

Maybe there is no pizza shop in the town suitable for vegetarians. ;)

 I think it is more pragmatic to combine technology that works, even
 if I where prefere to keep everything simple by doing everthing in
 web2py...

There is nice quote on web2py site: Please use www.web2py.com when
using MVC , no PHP/SQL stuff please...its 2011 not 1999!

It seems to be that, according to your logic, we should leave the users
with no option except using Windows OS and let all the devs use
Slackware/Gentoo or LFS. :-)

Fortunately, someone invented Ubuntu (btw, I use Debian Sid) and it was
not enough so some brave users went further and provided Linux Mint or
even PC-BSD. :-)

I'm encouraged by Massimo's +1 and strongly believe that in order to
say thank you for his work of providing such a wonderful piece of
software for *free*, that web2py community should come together and
give something back in the form of general web2py-ppowered CMS easy
enough to be used stand-alone by end-users as well as flexible enough to
allow devs/agencies to build upon it custom solutions.

I know that if I'd be capable to do it, I wouldn't not think twice.

However, I'm at the beginning of python-based web development and will
probably have to start my modifying Mezzaning to build some sites, but I
won't forget idea of web2py CMS. ;)

 This is just my opinion and only my opinion...

In my case I'm glad I'm not alone with my opinion. :P


Sincerely,
Gour

-- 
Not by merely abstaining from work can one achieve freedom 
from reaction, nor by renunciation alone can one attain perfection.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: View have to be updated

2013-09-27 Thread Dave S
On Wednesday, September 25, 2013 9:44:06 PM UTC-7, Gael Princivalle wrote:

 I've found my mistake. View lista_articoli.html was not in the default 
 folder.


I've done that too.   =8-O

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] PyCharm 3.0 Opens to the Community. It supports the Web2py

2013-09-27 Thread manuscriptum
PyCharm 3.0 Opens
to the CommunityAn outstanding lineup of new features in v3.0 comes along 
with the most exciting announcement:
an open-source version of PyCharm
is available!
pyCharm recognizes existing web2py projects and can automatically create 
new ones. It understands the web2py internal template language, offers 
framework-specific code completion, helps you easily navigate around your 
project, and performs all the routine stuff. All that's left for you is to 
enjoy developing with web2py.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] SQLFORM.grid

2013-09-27 Thread Gael Princivalle
Hi.

I want to make a simple SQLFORM.grid test. I have one table. I've tried to 
make a lot of changes, but it don't works. With this code the ticket is 
'str' object has no attribute 'tablename'.

Someone can help me ?

MY DB:
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
db.define_table('products',
Field('code', unique=True),
Field('description'),
Field('producer'),
Field('path_pdf'))
db.products.id.writable = db.products.id.readable = False

IN MY CONTROLLER
def test():
I want all rows
query=db.products.id0
fields = 
('products.code','products.description','products.producer','products.path_pdf')
headers = {'products.code':   'Product code',
   'products.description': 'Description',
   'products.producer': 'Brand',
   'products.path_pdf': 'Catalogue' }
default_sort_order=[db.products.code]
form = SQLFORM.grid(query=query, fields=fields, headers=headers, 
orderby=default_sort_order,
create=False, deletable=False, editable=False, 
maxtextlength=64, paginate=25)
return dict(form=form)

IN MY VIEW test.html:
{{extend 'layout.html'}}
{{=form}}

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] International table names

2013-09-27 Thread Ruud Schroen
Hi, i'm working on a project atm and im using web2admin as the admin 
interface.
Is there a way to show different table names depending on the language? The 
table names don't actually have to change, but i would like web2py to show 
translations in the grid.

(BTW: i'm NOT talking about field labels)

Is this possible?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Seeking Skilled Web2py Developer with UX experience

2013-09-27 Thread Mark Graves
Hey guys,

I've been developing an application myself over the past 3 years.  I've 
finally got a solid version 1.0.

I'm refining it, deploying it, and looking for a skilled web2py/UX 
developer's help.

I've got a CTO ready to come on board.  We are pitching VC next month, and 
I'll be pitching at Chicago's Technori Pitch on November 26.

I am looking for a web2py developer to help refine the application as it 
prepares for launch.  If you are skilled and potentially want to join the 
team, please send me an email.

Thanks!

Mark

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: contributing patches

2013-09-27 Thread Massimo Di Pierro
Thank you Ricardo. github PR or patches via googlecode issues are two 
common solutions.

On Friday, 27 September 2013 10:43:51 UTC-5, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you. Web2py's 
 very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could be 
 useful to others. I can fork and watch on github, and generate PRs, but... Is 
 there a document with guidelines on doing so? (I don't mean github 
 instructions, more like what you are looking for in good PRs) I saw 
 reference to an agreement that should be signed? Mailing lists one can join 
 to get the hang of etiquette and how the devs currently manage the process?

 best regards -Ricardo


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] RSS - storing news in database

2013-09-27 Thread lesssugar
I'm planning to implement RSS aggregator in my app, using instruction from 
the book:

http://web2py.com/books/default/chapter/29/10/services?search=rss#RSS

The twist is to firstly store the news in my database, and display the feed 
using the stored data.

My questions: 

1) Does anyone know whether it is legal to store this kind of data from 
external source?
2) How do I fetch the data to DB first? Do I use background-running script 
or web2py's cron?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py Italy

2013-09-27 Thread Massimo Di Pierro
benissimo!

On Friday, 27 September 2013 03:37:23 UTC-5, Gael Princivalle wrote:

 Hi.

 For web2py users that speak Italian, I've create the web2py-it group. It 
 could be a complementary tool for the Italian web2py community.
 https://groups.google.com/forum/?fromgroups#!forum/web2py-it

 Ciao !


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: contributing patches

2013-09-27 Thread Anthony
If you're not already on it, you should join the developers Google 
Grouphttps://groups.google.com/forum/?fromgroups=#!forum/web2py-developersas 
well. That's a good place to discuss ideas or get feedback.

Anthony

On Friday, September 27, 2013 1:42:24 PM UTC-4, Massimo Di Pierro wrote:

 Thank you Ricardo. github PR or patches via googlecode issues are two 
 common solutions.

 On Friday, 27 September 2013 10:43:51 UTC-5, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you. 
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could 
 be useful to others. I can fork and watch on github, and generate PRs, 
 but... Is there a document with guidelines on doing so? (I don't mean 
 github instructions, more like what you are looking for in good PRs) I 
 saw reference to an agreement that should be signed? Mailing lists one can 
 join to get the hang of etiquette and how the devs currently manage the 
 process?

 best regards -Ricardo



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] web2py Italy

2013-09-27 Thread Gael Princivalle
Hi.

For web2py users that speak Italian, I've create the web2py-it group. It 
could be a complementary tool for the Italian web2py community.
https://groups.google.com/forum/?fromgroups#!forum/web2py-it

Ciao !

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
It wasn't a bash script, Richard.

I made exactly as I described: straight from terminal.

On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
 Could it be the encoding of the file that content your bash script?

 Richard


 On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef vinicius...@gmail.com
 wrote:

 Hey all.

 I'm facing a strange problem concerning special characters.

 Using web2py shell, through command line (linux shell), I do this:

 #   start
 $ python web2py.py -S welcome
 web2py Web Framework
 Created by Massimo Di Pierro, Copyright 2007-2013
 Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
 Database drivers available: SQLite(sqlite3), MySQL(pymysql),
 PostgreSQL(pg8000), IMAP(imaplib)
 WARNING:web2py:import IPython error; use default python shell
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
 (InteractiveConsole)
  print áéíóú   # note the strange chars!
 áéíóú
  from unicodedata import normalize
  normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore)
  # again!
 'AAuAA3Ao'
 #   end

 Note the noisy characters on the last line.


 Then, at the same machine, I enter into the naked Python shell and:
 #   start
 $ python
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
  print áéíóú # looks ok
 áéíóú
  from unicodedata import normalize
  normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore)
  # ok again.
 'aeiou'
 #   end

 Everything works fine.

 The same code.

 I found this problem because I'm working to strip special characters
 off of names, with unicodedata.normalize().

 If it wan't strange enough, the unicodedata.normalize() works fine
 from web environment, throug app admin. There the normalization works
 as expected (the same way as the standard naked Python shell).

 What could be the root of this situation?

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py Italy

2013-09-27 Thread Paolo Caruccio
Ben fatto!

Il giorno venerdì 27 settembre 2013 10:37:23 UTC+2, Gael Princivalle ha 
scritto:

 Hi.

 For web2py users that speak Italian, I've create the web2py-it group. It 
 could be a complementary tool for the Italian web2py community.
 https://groups.google.com/forum/?fromgroups#!forum/web2py-it

 Ciao !


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] International table names

2013-09-27 Thread Vinicius Assef
If you customize the app, yes.

Just show {{=T(tablename)}} instead of {{=tablename}}.
Of course, you need do make the manual translation.

On Fri, Sep 27, 2013 at 7:33 AM, Ruud Schroen r...@formatics.nl wrote:
 Hi, i'm working on a project atm and im using web2admin as the admin
 interface.
 Is there a way to show different table names depending on the language? The
 table names don't actually have to change, but i would like web2py to show
 translations in the grid.

 (BTW: i'm NOT talking about field labels)

 Is this possible?

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: SQLFORM.grid

2013-09-27 Thread Anthony
fields should be a list of Field objects, not field names.

Anthony

On Friday, September 27, 2013 11:17:57 AM UTC-4, Gael Princivalle wrote:

 Hi.

 I want to make a simple SQLFORM.grid test. I have one table. I've tried to 
 make a lot of changes, but it don't works. With this code the ticket is 
 'str' object has no attribute 'tablename'.

 Someone can help me ?

 MY DB:
 db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
 db.define_table('products',
 Field('code', unique=True),
 Field('description'),
 Field('producer'),
 Field('path_pdf'))
 db.products.id.writable = db.products.id.readable = False

 IN MY CONTROLLER
 def test():
 I want all rows
 query=db.products.id0
 fields = 
 ('products.code','products.description','products.producer','products.path_pdf')
 headers = {'products.code':   'Product code',
'products.description': 'Description',
'products.producer': 'Brand',
'products.path_pdf': 'Catalogue' }
 default_sort_order=[db.products.code]
 form = SQLFORM.grid(query=query, fields=fields, headers=headers, 
 orderby=default_sort_order,
 create=False, deletable=False, editable=False, 
 maxtextlength=64, paginate=25)
 return dict(form=form)

 IN MY VIEW test.html:
 {{extend 'layout.html'}}
 {{=form}}


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py Italy

2013-09-27 Thread paolo betti
Iscritto! :-)

Il giorno venerdì 27 settembre 2013 10:37:23 UTC+2, Gael Princivalle ha 
scritto:

 Hi.

 For web2py users that speak Italian, I've create the web2py-it group. It 
 could be a complementary tool for the Italian web2py community.
 https://groups.google.com/forum/?fromgroups#!forum/web2py-it

 Ciao !


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] International table names

2013-09-27 Thread Massimo Di Pierro
Notice there are also

db.table._singular and db.table._plural which are customizable. They should 
still be passed through T(db.table._singular)

On Friday, 27 September 2013 12:50:09 UTC-5, viniciusban wrote:

 If you customize the app, yes. 

 Just show {{=T(tablename)}} instead of {{=tablename}}. 
 Of course, you need do make the manual translation. 

 On Fri, Sep 27, 2013 at 7:33 AM, Ruud Schroen 
 ru...@formatics.nljavascript: 
 wrote: 
  Hi, i'm working on a project atm and im using web2admin as the admin 
  interface. 
  Is there a way to show different table names depending on the language? 
 The 
  table names don't actually have to change, but i would like web2py to 
 show 
  translations in the grid. 
  
  (BTW: i'm NOT talking about field labels) 
  
  Is this possible? 
  
  -- 
  Resources: 
  - http://web2py.com 
  - http://web2py.com/book (Documentation) 
  - http://github.com/web2py/web2py (Source code) 
  - https://code.google.com/p/web2py/issues/list (Report Issues) 
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  web2py-users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to web2py+un...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: grid, smartgrid and ignore_default_filters

2013-09-27 Thread Massimo Di Pierro
Just committed to trunk:

SQLFORM.grid(...,ignore_common_filters=True)

Please check it and let us know if it works as expected. Thanks.

On Friday, 27 September 2013 03:15:18 UTC-5, mweissen wrote:



 Hi,
 I am using default filters at many places. Now I want to bulid a grid or a 
 smartgrid, but I have to set ignore_default_filters=True. How can it be 
 done? The parameterquery seems not be the right way.

 Regards, Martin


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: PyCharm 3.0 Opens to the Community. It supports the Web2py

2013-09-27 Thread Willoughby
To clarify - the open source version doesn't offer integrated framework 
support.

Framework support (including web2py) is a feature of the Paid version:
http://www.jetbrains.com/pycharm/features/editions_comparison_matrix.html

Very well done, I might add - I've been using the EAP releases and have 
been pleasantly surprised.

On Friday, September 27, 2013 9:03:17 AM UTC-4, manuscriptum wrote:

 PyCharm 3.0 Opens
 to the CommunityAn outstanding lineup of new features in v3.0 comes along 
 with the most exciting announcement:
 an open-source version of PyCharm
 is available!
 pyCharm recognizes existing web2py projects and can automatically create 
 new ones. It understands the web2py internal template language, offers 
 framework-specific code completion, helps you easily navigate around your 
 project, and performs all the routine stuff. All that's left for you is to 
 enjoy developing with web2py.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread Massimo Di Pierro
I can confirm the problem and I opened a ticket:

https://code.google.com/p/web2py/issues/detail?id=1692

On Thursday, 19 September 2013 03:49:35 UTC-5, hiro wrote:

 In the book I read:

 *Showing virtual fields in SQLFORM.grid and smartgrid*
 In recent versions of web2py, virtual fields are shown in grids like 
 normal fields: either shown alongside all other fields by default, or by 
 including them in the fields argument. However, virtual fields are not 
 sortable.

 However, if i use the welcome app and define:

 db.define_table('entity',
 Field('entity_name', 'string'),
 Field('slogan', 'string'),
 Field.Virtual('slogan2', lambda row: row.entity.slogan+', it is 
 really the best.')
 )

 and then create a grid:

 def index():
 my_grid = SQLFORM.grid(db.entity)
 return locals()

 Reading the book I expect this to work. However I get the error 'Query 
 Not Supported: no such column: entity.slogan2' in the smartgrid.

 Massimo, is this related to to the same bug I asked about yesterday? (I 
 have not yet updated my web2py to trunk, but did not find anything about 
 this issue in the tracker.)

 One solution might be to change the Virtual Fiels to computed fields.

 A big hug to all web2py contributors!

 Edit: Using stable version of 2.6.4


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: from devel list

2013-09-27 Thread Richard Vézina
:)


On Fri, Sep 27, 2013 at 1:34 PM, Gour g...@atmarama.net wrote:

 On Fri, 27 Sep 2013 12:17:04 -0400
 Richard Vézina
 ml.richard.vez...@gmail.com wrote:

  I don't say re-invent the wheel. If you have a couple of clients, you
  will re-use app, so it get tested overtime.

 Why not contributing such codebase to the web2py community, so that
 others can built on that.

  A basic html page is more then enough for greate number of small
  business because of lack of vision maybe or just because there core
  business doesn't required online tool.

 That's true and I also plan to use some SSG (static site generator) for
 such use cases, but, fortunately, there are plenty of them and they're
 free. :-)

   I setup many CMS for many organisation since 2000 and most of the
   time the client where calling me to update stuff on the site even if
   I give them a formation to show how easy it was to update or add more
   content on their site. That why I say CMS is dead. It will never
   really reach it objective for small business.

 There are tons of sites out built with WordPress, Joomla, Drupal,
 Concre5, CMS Made Simple, SilverStripe, MODx...(not mentioning ones with
 Ruby-powered CMS-es) and I simply do not believe that most of them are
 updated by developers.

  CSM is good for mid to large organisation, but most of the time they
  will build their own solution with a framework today...

 Here I also believe that most of such organization does not care what is
 used to run their site as long as ot provides what they want, so it
 depends on the agency/developer doing the work.

 Here (https://www.django-cms.org/en/case-studies/mercedes-benz/) you can
 see how the agency used e.g. Django-CMS to build the site for Mercedes
 Benz. So, if it's good-enough for Mercedes Benz to have web site built
 upon open-source Django framework and 'general' CMS, why not based on
 web2py and appropriate CMS?

  So, I am not against creating a CMS, but what serve to create another
  pizza shop in town, there is already 3...

 Maybe there is no pizza shop in the town suitable for vegetarians. ;)

  I think it is more pragmatic to combine technology that works, even
  if I where prefere to keep everything simple by doing everthing in
  web2py...

 There is nice quote on web2py site: Please use www.web2py.com when
 using MVC , no PHP/SQL stuff please...its 2011 not 1999!

 It seems to be that, according to your logic, we should leave the users
 with no option except using Windows OS and let all the devs use
 Slackware/Gentoo or LFS. :-)

 Fortunately, someone invented Ubuntu (btw, I use Debian Sid) and it was
 not enough so some brave users went further and provided Linux Mint or
 even PC-BSD. :-)

 I'm encouraged by Massimo's +1 and strongly believe that in order to
 say thank you for his work of providing such a wonderful piece of
 software for *free*, that web2py community should come together and
 give something back in the form of general web2py-ppowered CMS easy
 enough to be used stand-alone by end-users as well as flexible enough to
 allow devs/agencies to build upon it custom solutions.

 I know that if I'd be capable to do it, I wouldn't not think twice.

 However, I'm at the beginning of python-based web development and will
 probably have to start my modifying Mezzaning to build some sites, but I
 won't forget idea of web2py CMS. ;)

  This is just my opinion and only my opinion...

 In my case I'm glad I'm not alone with my opinion. :P


 Sincerely,
 Gour

 --
 Not by merely abstaining from work can one achieve freedom
 from reaction, nor by renunciation alone can one attain perfection.

 http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Richard Vézina
Ha ok, I was miss leading by the linux shell... Could it be that you need
u('éà') ??

don't know normalize

Richard


On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef vinicius...@gmail.comwrote:

 It wasn't a bash script, Richard.

 I made exactly as I described: straight from terminal.

 On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
 ml.richard.vez...@gmail.com wrote:
  Could it be the encoding of the file that content your bash script?
 
  Richard
 
 
  On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef vinicius...@gmail.com
  wrote:
 
  Hey all.
 
  I'm facing a strange problem concerning special characters.
 
  Using web2py shell, through command line (linux shell), I do this:
 
  #   start
  $ python web2py.py -S welcome
  web2py Web Framework
  Created by Massimo Di Pierro, Copyright 2007-2013
  Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
  Database drivers available: SQLite(sqlite3), MySQL(pymysql),
  PostgreSQL(pg8000), IMAP(imaplib)
  WARNING:web2py:import IPython error; use default python shell
  Python 2.7.3 (default, Apr 10 2013, 06:20:15)
  [GCC 4.6.3] on linux2
  Type help, copyright, credits or license for more information.
  (InteractiveConsole)
   print áéíóú   # note the strange chars!
  áéíóú
   from unicodedata import normalize
   normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
 ignore)
   # again!
  'AAuAA3Ao'
  #   end
 
  Note the noisy characters on the last line.
 
 
  Then, at the same machine, I enter into the naked Python shell and:
  #   start
  $ python
  Python 2.7.3 (default, Apr 10 2013, 06:20:15)
  [GCC 4.6.3] on linux2
  Type help, copyright, credits or license for more information.
   print áéíóú # looks ok
  áéíóú
   from unicodedata import normalize
   normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
 ignore)
   # ok again.
  'aeiou'
  #   end
 
  Everything works fine.
 
  The same code.
 
  I found this problem because I'm working to strip special characters
  off of names, with unicodedata.normalize().
 
  If it wan't strange enough, the unicodedata.normalize() works fine
  from web environment, throug app admin. There the normalization works
  as expected (the same way as the standard naked Python shell).
 
  What could be the root of this situation?
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google
 Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send
 an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Virtual Fields and Smartgrid not working as expected

2013-09-27 Thread hiro
Thank you!

On Friday, September 27, 2013 8:14:55 PM UTC+2, Massimo Di Pierro wrote:

 I can confirm the problem and I opened a ticket:

 https://code.google.com/p/web2py/issues/detail?id=1692

 On Thursday, 19 September 2013 03:49:35 UTC-5, hiro wrote:

 In the book I read:

 *Showing virtual fields in SQLFORM.grid and smartgrid*
 In recent versions of web2py, virtual fields are shown in grids like 
 normal fields: either shown alongside all other fields by default, or by 
 including them in the fields argument. However, virtual fields are not 
 sortable.

 However, if i use the welcome app and define:

 db.define_table('entity',
 Field('entity_name', 'string'),
 Field('slogan', 'string'),
 Field.Virtual('slogan2', lambda row: row.entity.slogan+', it is 
 really the best.')
 )

 and then create a grid:

 def index():
 my_grid = SQLFORM.grid(db.entity)
 return locals()

 Reading the book I expect this to work. However I get the error 'Query 
 Not Supported: no such column: entity.slogan2' in the smartgrid.

 Massimo, is this related to to the same bug I asked about yesterday? (I 
 have not yet updated my web2py to trunk, but did not find anything about 
 this issue in the tracker.)

 One solution might be to change the Virtual Fiels to computed fields.

 A big hug to all web2py contributors!

 Edit: Using stable version of 2.6.4



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: contributing patches

2013-09-27 Thread Niphlod
in addition to joining the developers group, there are some (absolutely not 
required, but good to have) main ideas to follow (it's how currently most 
of contributors are dealing with PR):
- github is preferred for their PR system
- make your patch on a topic branch against current master trunk
- it should be a patch that can be fast-forwarded (i.e. merged 
automatically in current master)
- composed of a single commit (unless the patch is long and needs specific 
commit comments to track it later)
- commit message **should** include a thanks to @someone if it was 
someone else that pointed out the bug or raised the request for the feature
- if the commit contains a new feature it should come with the relative 
tests (unittest in gluon/tests)

I have another one, but it seems that I'm the only one (would be good if we 
agree on something consistent):
- every bug-fixing commit should come from a branch named 
issue/number_of_the_issue_on_google_code (like issue/1684)
- every enhancement commit should come in a branch named 
enhancement/title_of_the_enhancement (like enhancement/trapped_links)



On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you. Web2py's 
 very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could be 
 useful to others. I can fork and watch on github, and generate PRs, but... Is 
 there a document with guidelines on doing so? (I don't mean github 
 instructions, more like what you are looking for in good PRs) I saw 
 reference to an agreement that should be signed? Mailing lists one can join 
 to get the hang of etiquette and how the devs currently manage the process?

 best regards -Ricardo


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
 Ha ok, I was miss leading by the linux shell... Could it be that you need
 u('éà') ??

No. the áéíóú.decode(utf-8) should do that.
And really does, in standard Python shell, outside web2py.




 On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef vinicius...@gmail.com
 wrote:

 It wasn't a bash script, Richard.

 I made exactly as I described: straight from terminal.

 On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
 ml.richard.vez...@gmail.com wrote:
  Could it be the encoding of the file that content your bash script?
 
  Richard
 
 
  On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef vinicius...@gmail.com
  wrote:
 
  Hey all.
 
  I'm facing a strange problem concerning special characters.
 
  Using web2py shell, through command line (linux shell), I do this:
 
  #   start
  $ python web2py.py -S welcome
  web2py Web Framework
  Created by Massimo Di Pierro, Copyright 2007-2013
  Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
  Database drivers available: SQLite(sqlite3), MySQL(pymysql),
  PostgreSQL(pg8000), IMAP(imaplib)
  WARNING:web2py:import IPython error; use default python shell
  Python 2.7.3 (default, Apr 10 2013, 06:20:15)
  [GCC 4.6.3] on linux2
  Type help, copyright, credits or license for more information.
  (InteractiveConsole)
   print áéíóú   # note the strange chars!
  áéíóú
   from unicodedata import normalize
   normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
   ignore)
   # again!
  'AAuAA3Ao'
  #   end
 
  Note the noisy characters on the last line.
 
 
  Then, at the same machine, I enter into the naked Python shell and:
  #   start
  $ python
  Python 2.7.3 (default, Apr 10 2013, 06:20:15)
  [GCC 4.6.3] on linux2
  Type help, copyright, credits or license for more information.
   print áéíóú # looks ok
  áéíóú
   from unicodedata import normalize
   normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
   ignore)
   # ok again.
  'aeiou'
  #   end
 
  Everything works fine.
 
  The same code.
 
  I found this problem because I'm working to strip special characters
  off of names, with unicodedata.normalize().
 
  If it wan't strange enough, the unicodedata.normalize() works fine
  from web environment, throug app admin. There the normalization works
  as expected (the same way as the standard naked Python shell).
 
  What could be the root of this situation?
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google
  Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send
  an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google
  Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send
  an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: RSS - storing news in database

2013-09-27 Thread Dave S

On Friday, September 27, 2013 10:43:27 AM UTC-7, lesssugar wrote:

 I'm planning to implement RSS aggregator in my app, using instruction from 
 the book:

 http://web2py.com/books/default/chapter/29/10/services?search=rss#RSS

 The twist is to firstly store the news in my database, and display the 
 feed using the stored data.

 My questions: 

 1) Does anyone know whether it is legal to store this kind of data from 
 external source?


Wouldn't that depend on the copyright(s) of the feed you are watching and 
of its sources?

If everything you're relaying is Creative Commons, than you just have to 
make sure that licensing is visible to your users, I think.  If you're 
aggregating-and-feeding someone's personal blog, then they might not have 
an explicit statement of what sharing is permitted, and that means implicit 
copyright comes into play.  Commercial sources are likely to be explicitly 
restricted to fair-use-or-written-permission.

I'm not sure that having a DB at your site makes a difference to this.  I 
think a redirect site (like Google News) is generally ok, but actually 
copying the content (in either a static page or live content page) could 
get complicated if you don't watch the fine print at the originating site.

But I am not a lawyer, and don't play one on the web (IANAL-ADPOOTW)


 

 2) How do I fetch the data to DB first? Do I use background-running script 
 or web2py's cron?


I would probably have a client that read from the source and POSTed to your 
application via a service interface, but then I'm generally trying to 
monitor hardware.

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Error upload file on 2.6.4

2013-09-27 Thread Niphlod
if your now is 2.6.4, then current trunk adds only bug fixes and no new 
(potentially untested) features.

On Friday, September 27, 2013 4:31:15 PM UTC+2, Relsi Hur Maron wrote:


 Thanks! Now is working. 

 It is a production app, no problem to use the current trunk?

 Em sexta-feira, 27 de setembro de 2013 11h20min01s UTC-3, Niphlod escreveu:

 try current trunk.

 Il giorno venerdì 27 settembre 2013 15:17:54 UTC+2, Relsi Hur Maron ha 
 scritto:


 Hi all, I have a upload javascript in my app that call a function in my 
 controller to upload files. 

 It was working fine until now, so I update my web2py to latest version 
 and now I get te error:  not indexable in my upload function.

 Well, my functions is:

 def upload_callback():
 if 'qqfile' in request.vars:
 filename = request.vars.qqfile
 newfilename = db.realty_photos.photo.store(request.body,filename
 )
 db.realty_photos.insert(photo=newfilename,realty_id=request.args
 (0))
 return response.json({'success': 'true'})


 And I sed to it a url like it:

 /upload_callback/5?qqfile=1.png

 It works fine in my old version 2.5.1, but not now.

 All help is welcome!

 Thanks for all.























-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Richard Vézina
Ok, but why do you need to do that in web2py? I remember have read
something about encoding in the book that was saying don't need to concern
about that in web2py.

Richard


On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef vinicius...@gmail.comwrote:

 On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
 ml.richard.vez...@gmail.com wrote:
  Ha ok, I was miss leading by the linux shell... Could it be that you need
  u('éà') ??

 No. the áéíóú.decode(utf-8) should do that.
 And really does, in standard Python shell, outside web2py.


 
 
  On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef vinicius...@gmail.com
  wrote:
 
  It wasn't a bash script, Richard.
 
  I made exactly as I described: straight from terminal.
 
  On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
  ml.richard.vez...@gmail.com wrote:
   Could it be the encoding of the file that content your bash script?
  
   Richard
  
  
   On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef 
 vinicius...@gmail.com
   wrote:
  
   Hey all.
  
   I'm facing a strange problem concerning special characters.
  
   Using web2py shell, through command line (linux shell), I do this:
  
   #   start
   $ python web2py.py -S welcome
   web2py Web Framework
   Created by Massimo Di Pierro, Copyright 2007-2013
   Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
   Database drivers available: SQLite(sqlite3), MySQL(pymysql),
   PostgreSQL(pg8000), IMAP(imaplib)
   WARNING:web2py:import IPython error; use default python shell
   Python 2.7.3 (default, Apr 10 2013, 06:20:15)
   [GCC 4.6.3] on linux2
   Type help, copyright, credits or license for more
 information.
   (InteractiveConsole)
print áéíóú   # note the strange chars!
   áéíóú
from unicodedata import normalize
normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
ignore)
# again!
   'AAuAA3Ao'
   #   end
  
   Note the noisy characters on the last line.
  
  
   Then, at the same machine, I enter into the naked Python shell and:
   #   start
   $ python
   Python 2.7.3 (default, Apr 10 2013, 06:20:15)
   [GCC 4.6.3] on linux2
   Type help, copyright, credits or license for more
 information.
print áéíóú # looks ok
   áéíóú
from unicodedata import normalize
normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
ignore)
# ok again.
   'aeiou'
   #   end
  
   Everything works fine.
  
   The same code.
  
   I found this problem because I'm working to strip special characters
   off of names, with unicodedata.normalize().
  
   If it wan't strange enough, the unicodedata.normalize() works fine
   from web environment, throug app admin. There the normalization works
   as expected (the same way as the standard naked Python shell).
  
   What could be the root of this situation?
  
   --
   Resources:
   - http://web2py.com
   - http://web2py.com/book (Documentation)
   - http://github.com/web2py/web2py (Source code)
   - https://code.google.com/p/web2py/issues/list (Report Issues)
   ---
   You received this message because you are subscribed to the Google
   Groups
   web2py-users group.
   To unsubscribe from this group and stop receiving emails from it,
 send
   an
   email to web2py+unsubscr...@googlegroups.com.
   For more options, visit https://groups.google.com/groups/opt_out.
  
  
   --
   Resources:
   - http://web2py.com
   - http://web2py.com/book (Documentation)
   - http://github.com/web2py/web2py (Source code)
   - https://code.google.com/p/web2py/issues/list (Report Issues)
   ---
   You received this message because you are subscribed to the Google
   Groups
   web2py-users group.
   To unsubscribe from this group and stop receiving emails from it, send
   an
   email to web2py+unsubscr...@googlegroups.com.
   For more options, visit https://groups.google.com/groups/opt_out.
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google
 Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send
 an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.

 --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - 

[web2py] Re: from devel list

2013-09-27 Thread Gour
On Fri, 27 Sep 2013 17:53:57 +0200
Loïc ESPERN l...@espern.net wrote:

 Neither do I...

:-)

 However I'm open to ideas/contributions to improve it, step by step

Pls. give me some today to learn more about web development in general,
as well as about web2py to be able to give some worthy piece of advice.

For now I can only say that having features set similar to
Mezzanine/Cartridge and easy way to create custom content types
(http://mezzanine.jupo.org/docs/content-architecture.html#creating-custom-content-types)
is something I'd like to see.

Moreover, I like this one: Seamless integration with third-party Django
apps (mentioned here: http://mezzanine.jupo.org/docs/overview.html),
but I'm not 100% sure what is web2py's equivalent of 'django app'.


Sincerely,
Gour

-- 
There is no possibility of one's becoming a yogī, O Arjuna, 
if one eats too much or eats too little, sleeps too much 
or does not sleep enough.

http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Error upload file on 2.6.4

2013-09-27 Thread Relsi Hur Maron
Cool! Thanks!!

2013/9/27 Niphlod niph...@gmail.com

 if your now is 2.6.4, then current trunk adds only bug fixes and no new
 (potentially untested) features.


 On Friday, September 27, 2013 4:31:15 PM UTC+2, Relsi Hur Maron wrote:


 Thanks! Now is working.

 It is a production app, no problem to use the current trunk?

 Em sexta-feira, 27 de setembro de 2013 11h20min01s UTC-3, Niphlod
 escreveu:

 try current trunk.

 Il giorno venerdì 27 settembre 2013 15:17:54 UTC+2, Relsi Hur Maron ha
 scritto:


 Hi all, I have a upload javascript in my app that call a function in my
 controller to upload files.

 It was working fine until now, so I update my web2py to latest version
 and now I get te error:  not indexable in my upload function.

 Well, my functions is:

 def upload_callback():
 if 'qqfile' in request.vars:
 filename = request.vars.qqfile
 newfilename = db.realty_photos.photo.store(r**equest.body,filename
 )
 db.realty_photos.insert(photo=**newfilename,realty_id=request.*
 *args(0))
 return response.json({'success': 'true'})


 And I sed to it a url like it:

 /upload_callback/5?qqfile=1.**png

 It works fine in my old version 2.5.1, but not now.

 All help is welcome!

 Thanks for all.





















  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: web2py Italy

2013-09-27 Thread Dave S
On Friday, September 27, 2013 10:43:46 AM UTC-7, Massimo Di Pierro wrote:

 benissimo!

 On Friday, 27 September 2013 03:37:23 UTC-5, Gael Princivalle wrote:

 Hi.

 For web2py users that speak Italian, I've create the web2py-it group. It 
 could be a complementary tool for the Italian web2py community.
 https://groups.google.com/forum/?fromgroups#!forum/web2py-it

 Ciao !



I hope someone will give notice over here if there's an important thread 
over there that we should know about. 

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
I was making a maintenance in table data through shell.

Despite that, I'm still curious to discover why this behaviour is
different from natural Python behaviour.


On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
 Ok, but why do you need to do that in web2py? I remember have read something
 about encoding in the book that was saying don't need to concern about that
 in web2py.

 Richard


 On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef vinicius...@gmail.com
 wrote:

 On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
 ml.richard.vez...@gmail.com wrote:
  Ha ok, I was miss leading by the linux shell... Could it be that you
  need
  u('éà') ??

 No. the áéíóú.decode(utf-8) should do that.
 And really does, in standard Python shell, outside web2py.


 
 
  On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef vinicius...@gmail.com
  wrote:
 
  It wasn't a bash script, Richard.
 
  I made exactly as I described: straight from terminal.
 
  On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
  ml.richard.vez...@gmail.com wrote:
   Could it be the encoding of the file that content your bash script?
  
   Richard
  
  
   On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef
   vinicius...@gmail.com
   wrote:
  
   Hey all.
  
   I'm facing a strange problem concerning special characters.
  
   Using web2py shell, through command line (linux shell), I do this:
  
   #   start
   $ python web2py.py -S welcome
   web2py Web Framework
   Created by Massimo Di Pierro, Copyright 2007-2013
   Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
   Database drivers available: SQLite(sqlite3), MySQL(pymysql),
   PostgreSQL(pg8000), IMAP(imaplib)
   WARNING:web2py:import IPython error; use default python shell
   Python 2.7.3 (default, Apr 10 2013, 06:20:15)
   [GCC 4.6.3] on linux2
   Type help, copyright, credits or license for more
   information.
   (InteractiveConsole)
print áéíóú   # note the strange chars!
   áéíóú
from unicodedata import normalize
normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
ignore)
# again!
   'AAuAA3Ao'
   #   end
  
   Note the noisy characters on the last line.
  
  
   Then, at the same machine, I enter into the naked Python shell and:
   #   start
   $ python
   Python 2.7.3 (default, Apr 10 2013, 06:20:15)
   [GCC 4.6.3] on linux2
   Type help, copyright, credits or license for more
   information.
print áéíóú # looks ok
   áéíóú
from unicodedata import normalize
normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
ignore)
# ok again.
   'aeiou'
   #   end
  
   Everything works fine.
  
   The same code.
  
   I found this problem because I'm working to strip special characters
   off of names, with unicodedata.normalize().
  
   If it wan't strange enough, the unicodedata.normalize() works fine
   from web environment, throug app admin. There the normalization
   works
   as expected (the same way as the standard naked Python shell).
  
   What could be the root of this situation?
  
   --
   Resources:
   - http://web2py.com
   - http://web2py.com/book (Documentation)
   - http://github.com/web2py/web2py (Source code)
   - https://code.google.com/p/web2py/issues/list (Report Issues)
   ---
   You received this message because you are subscribed to the Google
   Groups
   web2py-users group.
   To unsubscribe from this group and stop receiving emails from it,
   send
   an
   email to web2py+unsubscr...@googlegroups.com.
   For more options, visit https://groups.google.com/groups/opt_out.
  
  
   --
   Resources:
   - http://web2py.com
   - http://web2py.com/book (Documentation)
   - http://github.com/web2py/web2py (Source code)
   - https://code.google.com/p/web2py/issues/list (Report Issues)
   ---
   You received this message because you are subscribed to the Google
   Groups
   web2py-users group.
   To unsubscribe from this group and stop receiving emails from it,
   send
   an
   email to web2py+unsubscr...@googlegroups.com.
   For more options, visit https://groups.google.com/groups/opt_out.
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google
  Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, send
  an
  email to web2py+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 
  --
  Resources:
  - http://web2py.com
  - http://web2py.com/book (Documentation)
  - http://github.com/web2py/web2py (Source code)
  - https://code.google.com/p/web2py/issues/list (Report Issues)
  ---
  You received this message because you are subscribed to the Google
  Groups
  web2py-users group.
  To unsubscribe from this group and stop receiving emails from it, 

Re: [web2py] Re: contributing patches

2013-09-27 Thread Michele Comitini
Massimo, Niphlod
 can we add those instructions to the book? A chapter Contributing to
web2py can be helpful, don't you think?



2013/9/27 Niphlod niph...@gmail.com

 in addition to joining the developers group, there are some (absolutely
 not required, but good to have) main ideas to follow (it's how currently
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs specific
 commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)




 On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you.
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could
 be useful to others. I can fork and watch on github, and generate PRs,
 but... Is there a document with guidelines on doing so? (I don't mean
 github instructions, more like what you are looking for in good PRs) I
 saw reference to an agreement that should be signed? Mailing lists one can
 join to get the hang of etiquette and how the devs currently manage the
 process?

 best regards -Ricardo

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: web2py Italy

2013-09-27 Thread Michele Comitini
Ecco arrivo per ultimo come sempre! ;-)


2013/9/27 Dave S snidely@gmail.com

 On Friday, September 27, 2013 10:43:46 AM UTC-7, Massimo Di Pierro wrote:

 benissimo!

 On Friday, 27 September 2013 03:37:23 UTC-5, Gael Princivalle wrote:

 Hi.

 For web2py users that speak Italian, I've create the web2py-it group. It
 could be a complementary tool for the Italian web2py community.
 https://groups.google.com/forum/?fromgroups#!forum/web2py-it

 Ciao !



 I hope someone will give notice over here if there's an important thread
 over there that we should know about.

 /dps

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: contributing patches

2013-09-27 Thread Dave S
Or at least listed somewhere that 
http://www.web2py.com/init/default/documentation can reference.

/dps


On Friday, September 27, 2013 11:58:40 AM UTC-7, Michele Comitini wrote:

 Massimo, Niphlod
  can we add those instructions to the book? A chapter Contributing to 
 web2py can be helpful, don't you think?



 2013/9/27 Niphlod nip...@gmail.com javascript:

 in addition to joining the developers group, there are some (absolutely 
 not required, but good to have) main ideas to follow (it's how currently 
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged 
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs 
 specific commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was 
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative 
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if 
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named 
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named 
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)




 On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you. 
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could 
 be useful to others. I can fork and watch on github, and generate PRs, 
 but... Is there a document with guidelines on doing so? (I don't mean 
 github instructions, more like what you are looking for in good PRs) I 
 saw reference to an agreement that should be signed? Mailing lists one can 
 join to get the hang of etiquette and how the devs currently manage the 
 process?

 best regards -Ricardo

 -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google Groups 
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: contributing patches

2013-09-27 Thread Niphlod
I guess so, this (documenting how to contribute) has been raised up once 
or twice already but until now there have been no fixed rules. 

On Friday, September 27, 2013 8:58:40 PM UTC+2, Michele Comitini wrote:

 Massimo, Niphlod
  can we add those instructions to the book? A chapter Contributing to 
 web2py can be helpful, don't you think?



 2013/9/27 Niphlod nip...@gmail.com javascript:

 in addition to joining the developers group, there are some (absolutely 
 not required, but good to have) main ideas to follow (it's how currently 
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged 
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs 
 specific commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was 
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative 
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if 
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named 
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named 
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Problem with Does web2py modify python strings?

2013-09-27 Thread Anthony
Which OS are you using? Here's what I get on Ubuntu 12.04:

$ python web2py.py -S welcome
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.6.0-development+timestamp.2013.08.15.17.14.24
Database drivers available: SQLite(sqlite3), MySQL(pymysql), PostgreSQL(
pg8000), MSSQL(pyodbc), DB2(pyodbc), Teradata(pyodbc), Ingres(pyodbc), IMAP(
imaplib)
WARNING:web2py:import IPython error; use default python shell
Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
(InteractiveConsole)
 print áéíóú
áéíóú

But on Windows 7, I get:

 print áéíóú
áéíóú

Note, the web2py shell uses 
code.interact()http://docs.python.org/2/library/code.html#code.interact, 
so that may be the cause of differences in behavior from the standard shell.

Anthony

On Friday, September 27, 2013 12:23:27 PM UTC-4, viniciusban wrote:

 Hey all. 

 I'm facing a strange problem concerning special characters. 

 Using web2py shell, through command line (linux shell), I do this: 

 #   start 
 $ python web2py.py -S welcome 
 web2py Web Framework 
 Created by Massimo Di Pierro, Copyright 2007-2013 
 Version 2.6.4-stable+timestamp.2013.09.22.01.43.37 
 Database drivers available: SQLite(sqlite3), MySQL(pymysql), 
 PostgreSQL(pg8000), IMAP(imaplib) 
 WARNING:web2py:import IPython error; use default python shell 
 Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
 [GCC 4.6.3] on linux2 
 Type help, copyright, credits or license for more information. 
 (InteractiveConsole) 
  print áéíóú   # note the strange chars! 
 áéíóú 
  from unicodedata import normalize 
  normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore) 
 # again! 
 'AAuAA3Ao' 
 #   end 

 Note the noisy characters on the last line. 


 Then, at the same machine, I enter into the naked Python shell and: 
 #   start 
 $ python 
 Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
 [GCC 4.6.3] on linux2 
 Type help, copyright, credits or license for more information. 
  print áéíóú # looks ok 
 áéíóú 
  from unicodedata import normalize 
  normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII, ignore) 
 # ok again. 
 'aeiou' 
 #   end 

 Everything works fine. 

 The same code. 

 I found this problem because I'm working to strip special characters 
 off of names, with unicodedata.normalize(). 

 If it wan't strange enough, the unicodedata.normalize() works fine 
 from web environment, throug app admin. There the normalization works 
 as expected (the same way as the standard naked Python shell). 

 What could be the root of this situation? 


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: contributing patches

2013-09-27 Thread Massimo Di Pierro
we will. We also need a page on how to report security issues.


On Friday, 27 September 2013 13:58:40 UTC-5, Michele Comitini wrote:

 Massimo, Niphlod
  can we add those instructions to the book? A chapter Contributing to 
 web2py can be helpful, don't you think?



 2013/9/27 Niphlod nip...@gmail.com javascript:

 in addition to joining the developers group, there are some (absolutely 
 not required, but good to have) main ideas to follow (it's how currently 
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged 
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs 
 specific commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was 
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative 
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if 
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named 
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named 
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)




 On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you. 
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could 
 be useful to others. I can fork and watch on github, and generate PRs, 
 but... Is there a document with guidelines on doing so? (I don't mean 
 github instructions, more like what you are looking for in good PRs) I 
 saw reference to an agreement that should be signed? Mailing lists one can 
 join to get the hang of etiquette and how the devs currently manage the 
 process?

 best regards -Ricardo

  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google Groups 
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Michele Comitini
On your terminal you have to look at locales setup. Issue the following:

$ locales

You should have utf-8 based locale. For instance:

LANG=en_US.UTF-8

On the browser look on the prefereces, see if you have locale/language
settings supporting UTF-8.
If you have UTF-8 both on terminal and browser, then there is a problem...


2013/9/27 Vinicius Assef vinicius...@gmail.com

 I was making a maintenance in table data through shell.

 Despite that, I'm still curious to discover why this behaviour is
 different from natural Python behaviour.


 On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina
 ml.richard.vez...@gmail.com wrote:
  Ok, but why do you need to do that in web2py? I remember have read
 something
  about encoding in the book that was saying don't need to concern about
 that
  in web2py.
 
  Richard
 
 
  On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef vinicius...@gmail.com
  wrote:
 
  On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
  ml.richard.vez...@gmail.com wrote:
   Ha ok, I was miss leading by the linux shell... Could it be that you
   need
   u('éà') ??
 
  No. the áéíóú.decode(utf-8) should do that.
  And really does, in standard Python shell, outside web2py.
 
 
  
  
   On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef 
 vinicius...@gmail.com
   wrote:
  
   It wasn't a bash script, Richard.
  
   I made exactly as I described: straight from terminal.
  
   On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
   ml.richard.vez...@gmail.com wrote:
Could it be the encoding of the file that content your bash script?
   
Richard
   
   
On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef
vinicius...@gmail.com
wrote:
   
Hey all.
   
I'm facing a strange problem concerning special characters.
   
Using web2py shell, through command line (linux shell), I do this:
   
#   start
$ python web2py.py -S welcome
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
Database drivers available: SQLite(sqlite3), MySQL(pymysql),
PostgreSQL(pg8000), IMAP(imaplib)
WARNING:web2py:import IPython error; use default python shell
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more
information.
(InteractiveConsole)
 print áéíóú   # note the strange chars!
áéíóú
 from unicodedata import normalize
 normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
 ignore)
 # again!
'AAuAA3Ao'
#   end
   
Note the noisy characters on the last line.
   
   
Then, at the same machine, I enter into the naked Python shell
 and:
#   start
$ python
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more
information.
 print áéíóú # looks ok
áéíóú
 from unicodedata import normalize
 normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
 ignore)
 # ok again.
'aeiou'
#   end
   
Everything works fine.
   
The same code.
   
I found this problem because I'm working to strip special
 characters
off of names, with unicodedata.normalize().
   
If it wan't strange enough, the unicodedata.normalize() works fine
from web environment, throug app admin. There the normalization
works
as expected (the same way as the standard naked Python shell).
   
What could be the root of this situation?
   
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google
Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it,
send
an
email to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
   
   
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google
Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it,
send
an
email to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
  
   --
   Resources:
   - http://web2py.com
   - http://web2py.com/book (Documentation)
   - http://github.com/web2py/web2py (Source code)
   - https://code.google.com/p/web2py/issues/list (Report Issues)
   ---
   You received this message because you are subscribed to the Google
   Groups
   web2py-users group.
   To unsubscribe from this group and 

Re: [web2py] Re: contributing patches

2013-09-27 Thread Roberto Perdomo
We speak about that few days ago here:

https://groups.google.com/forum/m/#!topic/web2py-developers/DvRqziEe_GE
El sep 27, 2013 2:28 PM, Michele Comitini michele.comit...@gmail.com
escribió:

 Massimo, Niphlod
  can we add those instructions to the book? A chapter Contributing to
 web2py can be helpful, don't you think?



 2013/9/27 Niphlod niph...@gmail.com

 in addition to joining the developers group, there are some (absolutely
 not required, but good to have) main ideas to follow (it's how currently
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs
 specific commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)




 On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you.
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could
 be useful to others. I can fork and watch on github, and generate PRs,
 but... Is there a document with guidelines on doing so? (I don't mean
 github instructions, more like what you are looking for in good PRs) I
 saw reference to an agreement that should be signed? Mailing lists one can
 join to get the hang of etiquette and how the devs currently manage the
 process?

 best regards -Ricardo

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: contributing patches

2013-09-27 Thread Michele Comitini
My opinion is that we should find a something similar to a wiki integral to
web2py.com and/or web2pyslices.com .  The base of the platform should be
web2py itself.
The blogging would also nice.

The community is growing... ;-)



2013/9/27 Roberto Perdomo roberto...@gmail.com

 We speak about that few days ago here:

 https://groups.google.com/forum/m/#!topic/web2py-developers/DvRqziEe_GE
 El sep 27, 2013 2:28 PM, Michele Comitini michele.comit...@gmail.com
 escribió:

 Massimo, Niphlod
  can we add those instructions to the book? A chapter Contributing to
 web2py can be helpful, don't you think?



  2013/9/27 Niphlod niph...@gmail.com

 in addition to joining the developers group, there are some (absolutely
 not required, but good to have) main ideas to follow (it's how currently
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs
 specific commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)




 On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you.
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could
 be useful to others. I can fork and watch on github, and generate PRs,
 but... Is there a document with guidelines on doing so? (I don't mean
 github instructions, more like what you are looking for in good PRs) I
 saw reference to an agreement that should be signed? Mailing lists one can
 join to get the hang of etiquette and how the devs currently manage the
 process?

 best regards -Ricardo

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
Anthony, I'm using Ubuntu server 12.04 inside a Vagrant machine with
provided by Virtualbox.

Michele, my $LANG is exactly en_US.UTF-8, like yours.

Would it be a problem with my OS? As I explained in first message, it
works with standard Python shell, without web2py environment loaded.

The problem occurs only when I use web2py from shell.



On Fri, Sep 27, 2013 at 4:08 PM, Michele Comitini
michele.comit...@gmail.com wrote:
 On your terminal you have to look at locales setup. Issue the following:

 $ locales

 You should have utf-8 based locale. For instance:

 LANG=en_US.UTF-8

 On the browser look on the prefereces, see if you have locale/language
 settings supporting UTF-8.
 If you have UTF-8 both on terminal and browser, then there is a problem...


 2013/9/27 Vinicius Assef vinicius...@gmail.com

 I was making a maintenance in table data through shell.

 Despite that, I'm still curious to discover why this behaviour is
 different from natural Python behaviour.


 On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina
 ml.richard.vez...@gmail.com wrote:
  Ok, but why do you need to do that in web2py? I remember have read
  something
  about encoding in the book that was saying don't need to concern about
  that
  in web2py.
 
  Richard
 
 
  On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef vinicius...@gmail.com
  wrote:
 
  On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
  ml.richard.vez...@gmail.com wrote:
   Ha ok, I was miss leading by the linux shell... Could it be that you
   need
   u('éà') ??
 
  No. the áéíóú.decode(utf-8) should do that.
  And really does, in standard Python shell, outside web2py.
 
 
  
  
   On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef
   vinicius...@gmail.com
   wrote:
  
   It wasn't a bash script, Richard.
  
   I made exactly as I described: straight from terminal.
  
   On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
   ml.richard.vez...@gmail.com wrote:
Could it be the encoding of the file that content your bash
script?
   
Richard
   
   
On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef
vinicius...@gmail.com
wrote:
   
Hey all.
   
I'm facing a strange problem concerning special characters.
   
Using web2py shell, through command line (linux shell), I do
this:
   
#   start
$ python web2py.py -S welcome
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
Database drivers available: SQLite(sqlite3), MySQL(pymysql),
PostgreSQL(pg8000), IMAP(imaplib)
WARNING:web2py:import IPython error; use default python shell
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more
information.
(InteractiveConsole)
 print áéíóú   # note the strange chars!
áéíóú
 from unicodedata import normalize
 normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
 ignore)
 # again!
'AAuAA3Ao'
#   end
   
Note the noisy characters on the last line.
   
   
Then, at the same machine, I enter into the naked Python shell
and:
#   start
$ python
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more
information.
 print áéíóú # looks ok
áéíóú
 from unicodedata import normalize
 normalize(NFKD, áéuíóú.decode(utf-8)).encode(ASCII,
 ignore)
 # ok again.
'aeiou'
#   end
   
Everything works fine.
   
The same code.
   
I found this problem because I'm working to strip special
characters
off of names, with unicodedata.normalize().
   
If it wan't strange enough, the unicodedata.normalize() works
fine
from web environment, throug app admin. There the normalization
works
as expected (the same way as the standard naked Python shell).
   
What could be the root of this situation?
   
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the
Google
Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it,
send
an
email to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
   
   
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google
Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it,
send
an
email 

Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Anthony
What happens if you run a Python file that includes the following:

import code
code.interact()

Anthony

On Friday, September 27, 2013 3:33:45 PM UTC-4, viniciusban wrote:

 Anthony, I'm using Ubuntu server 12.04 inside a Vagrant machine with 
 provided by Virtualbox. 

 Michele, my $LANG is exactly en_US.UTF-8, like yours. 

 Would it be a problem with my OS? As I explained in first message, it 
 works with standard Python shell, without web2py environment loaded. 

 The problem occurs only when I use web2py from shell. 



 On Fri, Sep 27, 2013 at 4:08 PM, Michele Comitini 
 michele@gmail.com javascript: wrote: 
  On your terminal you have to look at locales setup. Issue the following: 
  
  $ locales 
  
  You should have utf-8 based locale. For instance: 
  
  LANG=en_US.UTF-8 
  
  On the browser look on the prefereces, see if you have locale/language 
  settings supporting UTF-8. 
  If you have UTF-8 both on terminal and browser, then there is a 
 problem... 
  
  
  2013/9/27 Vinicius Assef vinic...@gmail.com javascript: 
  
  I was making a maintenance in table data through shell. 
  
  Despite that, I'm still curious to discover why this behaviour is 
  different from natural Python behaviour. 
  
  
  On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina 
  ml.richa...@gmail.com javascript: wrote: 
   Ok, but why do you need to do that in web2py? I remember have read 
   something 
   about encoding in the book that was saying don't need to concern 
 about 
   that 
   in web2py. 
   
   Richard 
   
   
   On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef 
   vinic...@gmail.comjavascript: 

   wrote: 
   
   On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina 
   ml.richa...@gmail.com javascript: wrote: 
Ha ok, I was miss leading by the linux shell... Could it be that 
 you 
need 
u('éà') ?? 
   
   No. the áéíóú.decode(utf-8) should do that. 
   And really does, in standard Python shell, outside web2py. 
   
   


On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef 
vinic...@gmail.com javascript: 
wrote: 

It wasn't a bash script, Richard. 

I made exactly as I described: straight from terminal. 

On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina 
ml.richa...@gmail.com javascript: wrote: 
 Could it be the encoding of the file that content your bash 
 script? 
 
 Richard 
 
 
 On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef 
 vinic...@gmail.com javascript: 
 wrote: 
 
 Hey all. 
 
 I'm facing a strange problem concerning special characters. 
 
 Using web2py shell, through command line (linux shell), I do 
 this: 
 
 #   start 
 $ python web2py.py -S welcome 
 web2py Web Framework 
 Created by Massimo Di Pierro, Copyright 2007-2013 
 Version 2.6.4-stable+timestamp.2013.09.22.01.43.37 
 Database drivers available: SQLite(sqlite3), MySQL(pymysql), 
 PostgreSQL(pg8000), IMAP(imaplib) 
 WARNING:web2py:import IPython error; use default python shell 
 Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
 [GCC 4.6.3] on linux2 
 Type help, copyright, credits or license for more 
 information. 
 (InteractiveConsole) 
  print áéíóú   # note the strange chars! 
 áéíóú 
  from unicodedata import normalize 
  normalize(NFKD, 
 áéuíóú.decode(utf-8)).encode(ASCII, 
  ignore) 
  # again! 
 'AAuAA3Ao' 
 #   end 
 
 Note the noisy characters on the last line. 
 
 
 Then, at the same machine, I enter into the naked Python shell 
 and: 
 #   start 
 $ python 
 Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
 [GCC 4.6.3] on linux2 
 Type help, copyright, credits or license for more 
 information. 
  print áéíóú # looks ok 
 áéíóú 
  from unicodedata import normalize 
  normalize(NFKD, 
 áéuíóú.decode(utf-8)).encode(ASCII, 
  ignore) 
  # ok again. 
 'aeiou' 
 #   end 
 
 Everything works fine. 
 
 The same code. 
 
 I found this problem because I'm working to strip special 
 characters 
 off of names, with unicodedata.normalize(). 
 
 If it wan't strange enough, the unicodedata.normalize() works 
 fine 
 from web environment, throug app admin. There the 
 normalization 
 works 
 as expected (the same way as the standard naked Python shell). 
 
 What could be the root of this situation? 
 
 -- 
 Resources: 
 - http://web2py.com 
 - http://web2py.com/book (Documentation) 
 - http://github.com/web2py/web2py (Source code) 
 - https://code.google.com/p/web2py/issues/list (Report 
 Issues) 
 --- 
 You received this message because you are subscribed to the 
 Google 
 Groups 
 web2py-users group. 
 To unsubscribe from this group and stop receiving emails from 
 it, 
 

[web2py] Problem with SQLFORM to add a record with some known field

2013-09-27 Thread Tao Wang
I'm just beginning to learn web2py. A beginner question about how to insert 
a record using sqlform

form = SQLFORM(db.filecomment, fields=['file_id', 'filecomment'])

I can get the file_id, so I do not need user to file this field. What the 
user only need to file the 'filecomment' field. How could I do this? In the 
above code, the user need to file both file_id and filecomment.
After form.process.accepted, the record will be inserted. 

Thanks

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: contributing patches

2013-09-27 Thread Anthony
For enhancements, many bonus points if you also simultaneously or shortly 
thereafter submit a PR adding documentation of the new feature to the book: 
https://github.com/mdipierro/web2py-book. At the very least, post some 
details and example code so that someone else can easily update the book.

Anthony

On Friday, September 27, 2013 2:45:45 PM UTC-4, Niphlod wrote:

 in addition to joining the developers group, there are some (absolutely 
 not required, but nice to have) main ideas to follow (it's how currently 
 most of contributors are dealing with PR):
 - github is preferred for their PR system
 - make your patch on a topic branch against current master trunk
 - it should be a patch that can be fast-forwarded (i.e. merged 
 automatically in current master)
 - composed of a single commit (unless the patch is long and needs specific 
 commit comments to track it later)
 - commit message **should** include a thanks to @someone if it was 
 someone else that pointed out the bug or raised the request for the feature
 - if the commit contains a new feature it should come with the relative 
 tests (unittest in gluon/tests)

 I have another one, but it seems that I'm the only one (would be good if 
 we agree on something consistent):
 - every bug-fixing commit should come from a branch named 
 issue/number_of_the_issue_on_google_code (like issue/1684)
 - every enhancement commit should come in a branch named 
 enhancement/title_of_the_enhancement (like enhancement/trapped_links)



 On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:

 (Apologies if this has been asked before.)

 Kudos for web2py and for this community; happy to have found you. 
 Web2py's very useful for my projects; even enjoyable!

 I'd like to pay it back, starting with minor patches that I think could 
 be useful to others. I can fork and watch on github, and generate PRs, 
 but... Is there a document with guidelines on doing so? (I don't mean 
 github instructions, more like what you are looking for in good PRs) I 
 saw reference to an agreement that should be signed? Mailing lists one can 
 join to get the hang of etiquette and how the devs currently manage the 
 process?

 best regards -Ricardo



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
Anthony, I think you're in the right direction.
See:
#  begin
$ python
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
 print á
á
 import code
 print á
á
 code.interact()
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
(InteractiveConsole)
 print á
á
 exit()
#  end

The problem occurs after code.interact() call.




On Fri, Sep 27, 2013 at 4:38 PM, Anthony abasta...@gmail.com wrote:
 What happens if you run a Python file that includes the following:

 import code
 code.interact()

 Anthony


 On Friday, September 27, 2013 3:33:45 PM UTC-4, viniciusban wrote:

 Anthony, I'm using Ubuntu server 12.04 inside a Vagrant machine with
 provided by Virtualbox.

 Michele, my $LANG is exactly en_US.UTF-8, like yours.

 Would it be a problem with my OS? As I explained in first message, it
 works with standard Python shell, without web2py environment loaded.

 The problem occurs only when I use web2py from shell.



 On Fri, Sep 27, 2013 at 4:08 PM, Michele Comitini
 michele@gmail.com wrote:
  On your terminal you have to look at locales setup. Issue the following:
 
  $ locales
 
  You should have utf-8 based locale. For instance:
 
  LANG=en_US.UTF-8
 
  On the browser look on the prefereces, see if you have locale/language
  settings supporting UTF-8.
  If you have UTF-8 both on terminal and browser, then there is a
  problem...
 
 
  2013/9/27 Vinicius Assef vinic...@gmail.com
 
  I was making a maintenance in table data through shell.
 
  Despite that, I'm still curious to discover why this behaviour is
  different from natural Python behaviour.
 
 
  On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina
  ml.richa...@gmail.com wrote:
   Ok, but why do you need to do that in web2py? I remember have read
   something
   about encoding in the book that was saying don't need to concern
   about
   that
   in web2py.
  
   Richard
  
  
   On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef vinic...@gmail.com
   wrote:
  
   On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
   ml.richa...@gmail.com wrote:
Ha ok, I was miss leading by the linux shell... Could it be that
you
need
u('éà') ??
  
   No. the áéíóú.decode(utf-8) should do that.
   And really does, in standard Python shell, outside web2py.
  
  
   
   
On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef
vinic...@gmail.com
wrote:
   
It wasn't a bash script, Richard.
   
I made exactly as I described: straight from terminal.
   
On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
ml.richa...@gmail.com wrote:
 Could it be the encoding of the file that content your bash
 script?

 Richard


 On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef
 vinic...@gmail.com
 wrote:

 Hey all.

 I'm facing a strange problem concerning special characters.

 Using web2py shell, through command line (linux shell), I do
 this:

 #   start
 $ python web2py.py -S welcome
 web2py Web Framework
 Created by Massimo Di Pierro, Copyright 2007-2013
 Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
 Database drivers available: SQLite(sqlite3), MySQL(pymysql),
 PostgreSQL(pg8000), IMAP(imaplib)
 WARNING:web2py:import IPython error; use default python shell
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more
 information.
 (InteractiveConsole)
  print áéíóú   # note the strange chars!
 áéíóú
  from unicodedata import normalize
  normalize(NFKD,
  áéuíóú.decode(utf-8)).encode(ASCII,
  ignore)
  # again!
 'AAuAA3Ao'
 #   end

 Note the noisy characters on the last line.


 Then, at the same machine, I enter into the naked Python shell
 and:
 #   start
 $ python
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more
 information.
  print áéíóú # looks ok
 áéíóú
  from unicodedata import normalize
  normalize(NFKD,
  áéuíóú.decode(utf-8)).encode(ASCII,
  ignore)
  # ok again.
 'aeiou'
 #   end

 Everything works fine.

 The same code.

 I found this problem because I'm working to strip special
 characters
 off of names, with unicodedata.normalize().

 If it wan't strange enough, the unicodedata.normalize() works
 fine
 from web environment, throug app admin. There the
 normalization
 works
 as expected (the same way as the standard naked Python shell).

 What could be the root of this situation?

 --
 Resources:
 - http://web2py.com
 - 

Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Vinicius Assef
A new situation.

Before calling code.interact():
 len(á)  # len() == 2 is OK
2
 á # 2 bytes: ok
'\xc3\xa1'
 code.interact()
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
(InteractiveConsole)
 len(á)  # len() == 4 is not OK
4
 á # 4 bytes: strange.
'\xc3\x83\xc2\xa1'
 # here I pressed CTRL-D to return from code.interact()
 á # 2 bytes, ok again.
'\xc3\xa1'


Any ideas?




On Fri, Sep 27, 2013 at 4:53 PM, Vinicius Assef vinicius...@gmail.com wrote:
 Anthony, I think you're in the right direction.
 See:
 #  begin
 $ python
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
 print á
 á
 import code
 print á
 á
 code.interact()
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more information.
 (InteractiveConsole)
 print á
 á
 exit()
 #  end

 The problem occurs after code.interact() call.




 On Fri, Sep 27, 2013 at 4:38 PM, Anthony abasta...@gmail.com wrote:
 What happens if you run a Python file that includes the following:

 import code
 code.interact()

 Anthony


 On Friday, September 27, 2013 3:33:45 PM UTC-4, viniciusban wrote:

 Anthony, I'm using Ubuntu server 12.04 inside a Vagrant machine with
 provided by Virtualbox.

 Michele, my $LANG is exactly en_US.UTF-8, like yours.

 Would it be a problem with my OS? As I explained in first message, it
 works with standard Python shell, without web2py environment loaded.

 The problem occurs only when I use web2py from shell.



 On Fri, Sep 27, 2013 at 4:08 PM, Michele Comitini
 michele@gmail.com wrote:
  On your terminal you have to look at locales setup. Issue the following:
 
  $ locales
 
  You should have utf-8 based locale. For instance:
 
  LANG=en_US.UTF-8
 
  On the browser look on the prefereces, see if you have locale/language
  settings supporting UTF-8.
  If you have UTF-8 both on terminal and browser, then there is a
  problem...
 
 
  2013/9/27 Vinicius Assef vinic...@gmail.com
 
  I was making a maintenance in table data through shell.
 
  Despite that, I'm still curious to discover why this behaviour is
  different from natural Python behaviour.
 
 
  On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina
  ml.richa...@gmail.com wrote:
   Ok, but why do you need to do that in web2py? I remember have read
   something
   about encoding in the book that was saying don't need to concern
   about
   that
   in web2py.
  
   Richard
  
  
   On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef vinic...@gmail.com
   wrote:
  
   On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina
   ml.richa...@gmail.com wrote:
Ha ok, I was miss leading by the linux shell... Could it be that
you
need
u('éà') ??
  
   No. the áéíóú.decode(utf-8) should do that.
   And really does, in standard Python shell, outside web2py.
  
  
   
   
On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef
vinic...@gmail.com
wrote:
   
It wasn't a bash script, Richard.
   
I made exactly as I described: straight from terminal.
   
On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina
ml.richa...@gmail.com wrote:
 Could it be the encoding of the file that content your bash
 script?

 Richard


 On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef
 vinic...@gmail.com
 wrote:

 Hey all.

 I'm facing a strange problem concerning special characters.

 Using web2py shell, through command line (linux shell), I do
 this:

 #   start
 $ python web2py.py -S welcome
 web2py Web Framework
 Created by Massimo Di Pierro, Copyright 2007-2013
 Version 2.6.4-stable+timestamp.2013.09.22.01.43.37
 Database drivers available: SQLite(sqlite3), MySQL(pymysql),
 PostgreSQL(pg8000), IMAP(imaplib)
 WARNING:web2py:import IPython error; use default python shell
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more
 information.
 (InteractiveConsole)
  print áéíóú   # note the strange chars!
 áéíóú
  from unicodedata import normalize
  normalize(NFKD,
  áéuíóú.decode(utf-8)).encode(ASCII,
  ignore)
  # again!
 'AAuAA3Ao'
 #   end

 Note the noisy characters on the last line.


 Then, at the same machine, I enter into the naked Python shell
 and:
 #   start
 $ python
 Python 2.7.3 (default, Apr 10 2013, 06:20:15)
 [GCC 4.6.3] on linux2
 Type help, copyright, credits or license for more
 information.
  print áéíóú # looks ok
 áéíóú
  from unicodedata import normalize
  normalize(NFKD,
  áéuíóú.decode(utf-8)).encode(ASCII,
  ignore)
  # ok again.
 'aeiou'
 #   

Re: [web2py] Problem with Does web2py modify python strings?

2013-09-27 Thread Anthony
I'm not sure what's wrong -- I cannot reproduce it on an Ubuntu 12.04 
desktop or server.

Anthony

On Friday, September 27, 2013 4:03:00 PM UTC-4, viniciusban wrote:

 A new situation. 

 Before calling code.interact(): 
  len(á)  # len() == 2 is OK 
 2 
  á # 2 bytes: ok 
 '\xc3\xa1' 
  code.interact() 
 Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
 [GCC 4.6.3] on linux2 
 Type help, copyright, credits or license for more information. 
 (InteractiveConsole) 
  len(á)  # len() == 4 is not OK 
 4 
  á # 4 bytes: strange. 
 '\xc3\x83\xc2\xa1' 
  # here I pressed CTRL-D to return from code.interact() 
  á # 2 bytes, ok again. 
 '\xc3\xa1' 


 Any ideas? 




 On Fri, Sep 27, 2013 at 4:53 PM, Vinicius Assef 
 vinic...@gmail.comjavascript: 
 wrote: 
  Anthony, I think you're in the right direction. 
  See: 
  #  begin 
  $ python 
  Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
  [GCC 4.6.3] on linux2 
  Type help, copyright, credits or license for more information. 
  print á 
  á 
  import code 
  print á 
  á 
  code.interact() 
  Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
  [GCC 4.6.3] on linux2 
  Type help, copyright, credits or license for more information. 
  (InteractiveConsole) 
  print á 
  á 
  exit() 
  #  end 
  
  The problem occurs after code.interact() call. 
  
  
  
  
  On Fri, Sep 27, 2013 at 4:38 PM, Anthony abas...@gmail.comjavascript: 
 wrote: 
  What happens if you run a Python file that includes the following: 
  
  import code 
  code.interact() 
  
  Anthony 
  
  
  On Friday, September 27, 2013 3:33:45 PM UTC-4, viniciusban wrote: 
  
  Anthony, I'm using Ubuntu server 12.04 inside a Vagrant machine with 
  provided by Virtualbox. 
  
  Michele, my $LANG is exactly en_US.UTF-8, like yours. 
  
  Would it be a problem with my OS? As I explained in first message, it 
  works with standard Python shell, without web2py environment loaded. 
  
  The problem occurs only when I use web2py from shell. 
  
  
  
  On Fri, Sep 27, 2013 at 4:08 PM, Michele Comitini 
  michele@gmail.com wrote: 
   On your terminal you have to look at locales setup. Issue the 
 following: 
   
   $ locales 
   
   You should have utf-8 based locale. For instance: 
   
   LANG=en_US.UTF-8 
   
   On the browser look on the prefereces, see if you have 
 locale/language 
   settings supporting UTF-8. 
   If you have UTF-8 both on terminal and browser, then there is a 
   problem... 
   
   
   2013/9/27 Vinicius Assef vinic...@gmail.com 
   
   I was making a maintenance in table data through shell. 
   
   Despite that, I'm still curious to discover why this behaviour is 
   different from natural Python behaviour. 
   
   
   On Fri, Sep 27, 2013 at 3:53 PM, Richard Vézina 
   ml.richa...@gmail.com wrote: 
Ok, but why do you need to do that in web2py? I remember have 
 read 
something 
about encoding in the book that was saying don't need to concern 
about 
that 
in web2py. 

Richard 


On Fri, Sep 27, 2013 at 2:46 PM, Vinicius Assef 
 vinic...@gmail.com 
wrote: 

On Fri, Sep 27, 2013 at 3:37 PM, Richard Vézina 
ml.richa...@gmail.com wrote: 
 Ha ok, I was miss leading by the linux shell... Could it be 
 that 
 you 
 need 
 u('éà') ?? 

No. the áéíóú.decode(utf-8) should do that. 
And really does, in standard Python shell, outside web2py. 


 
 
 On Fri, Sep 27, 2013 at 1:47 PM, Vinicius Assef 
 vinic...@gmail.com 
 wrote: 
 
 It wasn't a bash script, Richard. 
 
 I made exactly as I described: straight from terminal. 
 
 On Fri, Sep 27, 2013 at 2:23 PM, Richard Vézina 
 ml.richa...@gmail.com wrote: 
  Could it be the encoding of the file that content your bash 
  script? 
  
  Richard 
  
  
  On Fri, Sep 27, 2013 at 12:23 PM, Vinicius Assef 
  vinic...@gmail.com 
  wrote: 
  
  Hey all. 
  
  I'm facing a strange problem concerning special 
 characters. 
  
  Using web2py shell, through command line (linux shell), I 
 do 
  this: 
  
  #   start 
  $ python web2py.py -S welcome 
  web2py Web Framework 
  Created by Massimo Di Pierro, Copyright 2007-2013 
  Version 2.6.4-stable+timestamp.2013.09.22.01.43.37 
  Database drivers available: SQLite(sqlite3), 
 MySQL(pymysql), 
  PostgreSQL(pg8000), IMAP(imaplib) 
  WARNING:web2py:import IPython error; use default python 
 shell 
  Python 2.7.3 (default, Apr 10 2013, 06:20:15) 
  [GCC 4.6.3] on linux2 
  Type help, copyright, credits or license for more 
  information. 
  (InteractiveConsole) 
   print áéíóú   # note the strange chars! 
  áéíóú 
   from unicodedata import normalize 
   normalize(NFKD, 
   áéuíóú.decode(utf-8)).encode(ASCII, 
   ignore) 
   # again! 
  'AAuAA3Ao' 
  #   end 
 

[web2py] Re: Problem with SQLFORM to add a record with some known field

2013-09-27 Thread Jim S
Are you using SQLFORM.grid?

-Jim

On Friday, September 27, 2013 2:38:01 PM UTC-5, Tao Wang wrote:

 I'm just beginning to learn web2py. A beginner question about how to 
 insert a record using sqlform

 form = SQLFORM(db.filecomment, fields=['file_id', 'filecomment'])

 I can get the file_id, so I do not need user to file this field. What the 
 user only need to file the 'filecomment' field. How could I do this? In the 
 above code, the user need to file both file_id and filecomment.
 After form.process.accepted, the record will be inserted. 

 Thanks


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: custom form validation doesn't work

2013-09-27 Thread Massimo Di Pierro
The problems was identified by Anthony in this thread:

https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ

On Saturday, 15 December 2012 17:27:51 UTC-6, jonas wrote:

 Hi. 

 I have a default form that is passed in view: {{=form}}
 using this validation and insertion works. but when I use a custom form 
 none of that works. why?
 Also form.process().accepted works only when using default form. 

 My second question is: when submitting the form I redirect to index, and 
 all entries in the db are returned. Is that because i reuse the index 
 function? Is there any way to clear all fields after a successful submit?

 the code: 

 default.py:

 def index():

 query=db.blog.id0
 res=db(query).select(orderby=~db.blog.date)
 query=db.about.id0
 about=db(query).select()
 query=db.comments.post_id0
 com=db(query).select(orderby=~db.comments.created_on)
 
 return dict(res=res,about=about,com=com,message=T('Everything should 
 be made as simple as possible, but not simpler'))

 def comment():

  create comment form. Every comment is id locked to the specific 
 post 

 post=db(db.blog.id==request.args(0)).select().first()
 db.comments.post_id.default=post.id
 form=crud.create(db.comments)
 if form.process().accepted:
 print 'form accepted'
 redirect(URL('index'))
 else:
 print 'not accepted'
 return dict(form=form)

 index.html:

 {{=A(TAG.i(_class=icon-plus-sign), _rel=tooltip, _title=testing, 
 _class=btn, _href='#', _onclick=jQuery('#uc').toggle();)}}
 div id=uc
   {{=LOAD('default','comment.load',args=result.id,ajax=True)}}
 /div

 comment.load:

 {{=form}}

 thanks


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Re: Custom form with jquery acts weird

2013-09-27 Thread Massimo Di Pierro
Actually the problem you have is different. The links you refer to both had 
the same problem and it was addressed by Anthony in his post. You cannot do:

form=crud.create(db.comments)
if form.process().accepted

because crud.create already calls process() internally, you it was called 
twice.

You problem is different. You have a button inside a form and if you click 
it, it will submit the form. Unless you tell it not to:

button 
onclick=event.preventDefault();window.location='{{=URL('index')}}'Cancel/button




On Thursday, 26 September 2013 14:44:49 UTC-5, Jordan Ladora wrote:

 Hello again,

 I've attached an app with the problem I have.. if you click on the button 
 and go to 'debug_js' view, you'll see that hitting the 'cancel' button 
 there causes a POST request, form reload, and validation. This is par for 
 the problems I've been having with custom forms.. if you move that button 
 outside the custom form, everything behaves normally..

 Thanks again for help with this!
 -jl



 On Fri, Sep 20, 2013 at 2:39 PM, Marin Pranjić 
 marin@gmail.comjavascript:
  wrote:

 Can you pack a minimal application that reproduces this?


 On Fri, Sep 20, 2013 at 11:18 PM, Jordan Ladora 
 vicepres...@gmail.comjavascript:
  wrote:

 Ahhh f*ck it, then...




 On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote:

 Hi,

 I have the same problem as 

 https://groups.google.com/**forum/?fromgroups#!searchin/**
 web2py/custom$20form$20jquery/**web2py/7Meea7Ul0o8/**4ZdrD9hP5MEJhttps://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ
 https://groups.google.com/**forum/?fromgroups#!searchin/**
 web2py/custom$20form$20jquery/**web2py/E9RyEqh01RQ/**6duW4RmALvcJhttps://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/E9RyEqh01RQ/6duW4RmALvcJ

 From the first thread/link above, ...if I use a regular form, 
 {{=form}}, then validation works but not if I use the custom form. Also 
 form.process() works, so the problem seems to be related to custom forms..

 Those threads seemed to end without finding a solution. I think the 
 author of those threads didn't realize that the form is actually being 
 validated, but it doesn't seem like it b/c the error messages do not show 
 with the custom form. 

 In my hands, if I use a custom form, it validates OK but form errors do 
 not display and, quite often, any jquery code in the view misbehaves 
 (which 
 is the real problem). This behavior turns on and off depending ONLY on 
 whether I have a custom form. I used {{=custom.form.begin}} and 
 {{=custom.form.end}} and {{=form.custom.widget.xyz}} and 
 {{=form.custom.label.xyz}} in the view. If I replace it with {{=form}} 
 then 
 everything works perfectly. 

 In the controller, I used 

 if form.accepts(request, session, onvalidation=abc):
   ...


 Thanks for any help. I love the custom forms and it really stinks not 
 being able to use them with jQuery!!

 -jl

 ps - I previously posted with more details about this problem, before I 
 realized the problem seems related more generally to javascript/jquery + 
 custom forms -

 https://groups.google.com/**forum/?fromgroups=#!topic/**
 web2py/rPHKPqqHbsghttps://groups.google.com/forum/?fromgroups=#!topic/web2py/rPHKPqqHbsg
 https://groups.google.com/**forum/?fromgroups=#!topic/**
 web2py/0LpfMJPwSsIhttps://groups.google.com/forum/?fromgroups=#!topic/web2py/0LpfMJPwSsI


  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google 
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com javascript:.

 For more options, visit https://groups.google.com/groups/opt_out.


  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/web2py/rHwdHamBjHI/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit 

[web2py] Re: Not indexable error when disabling app from admin

2013-09-27 Thread Massimo Di Pierro
Should be fixed in trunk.

On Wednesday, 18 September 2013 18:14:36 UTC-5, HittingSmoke wrote:

 Apologies. It is: 2.6.3-stable+timestamp.2013.09.15.17.01.20

 On Wednesday, September 18, 2013 4:08:48 PM UTC-7, Massimo Di Pierro wrote:

 Which version?

 On Wednesday, 18 September 2013 15:56:28 UTC-5, HittingSmoke wrote:

 I'm getting:

 type 'exceptions.TypeError' not indexable

 ...when trying to disable my Welcome app from the admin interface.

 Code listing:

 577.
 578.
 579.
 580.
 581.
 582.

 583.
 584.
 585.
 586.

 return []

 def keys(self):
 Dictionary style keys() method.
 if self.list is None:
 raise TypeError, not indexable

 return list(set(item.name for item in self.list))

 def has_key(self, key):
 Dictionary style has_key() method.



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Custom form with jquery acts weird

2013-09-27 Thread Jordan Ladora
Hi Massimo,

Thanks for your help. I think I'm crystal clear on your explanation 
regarding the button, but I'm still confused on the other issue that 
Anthony answered previously, despite his and your posts.. 

In my controller I used:

  form = SQLFORM.factory(*fields)

  if form.accepts(request, session): 


Could you please be a little more specific? What should I use here instead 
of 'form.accepts' ? I think this is causing me trouble elsewhere in my 
application, too, and it would be really helpful if I knew a little bit 
more..

Thanks again,
-J



On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote:

 Hi,

 I have the same problem as 


 https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ

 https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/E9RyEqh01RQ/6duW4RmALvcJ

 From the first thread/link above, ...if I use a regular form, {{=form}}, 
 then validation works but not if I use the custom form. Also form.process() 
 works, so the problem seems to be related to custom forms..

 Those threads seemed to end without finding a solution. I think the author 
 of those threads didn't realize that the form is actually being validated, 
 but it doesn't seem like it b/c the error messages do not show with the 
 custom form. 

 In my hands, if I use a custom form, it validates OK but form errors do 
 not display and, quite often, any jquery code in the view misbehaves (which 
 is the real problem). This behavior turns on and off depending ONLY on 
 whether I have a custom form. I used {{=custom.form.begin}} and 
 {{=custom.form.end}} and {{=form.custom.widget.xyz}} and 
 {{=form.custom.label.xyz}} in the view. If I replace it with {{=form}} then 
 everything works perfectly. 

 In the controller, I used 

 if form.accepts(request, session, onvalidation=abc):
   ...


 Thanks for any help. I love the custom forms and it really stinks not 
 being able to use them with jQuery!!

 -jl

 ps - I previously posted with more details about this problem, before I 
 realized the problem seems related more generally to javascript/jquery + 
 custom forms -

 https://groups.google.com/forum/?fromgroups=#!topic/web2py/rPHKPqqHbsg
 https://groups.google.com/forum/?fromgroups=#!topic/web2py/0LpfMJPwSsI




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: contributing patches

2013-09-27 Thread Tim Richardson
I've started Chapter 15 and when the skeleton is a bit fleshed out I'll 
submit a PR for the book. I'll include in the contents all the points 
raised here.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [web2py] Multiple buttons in links of smartgrid

2013-09-27 Thread 黄祥
how to add the header for multiple buttons? i mean 1 header field that have 
multiple buttons on the body.

when i try it return an error :

TypeError: 'list' object is not callable


my code :
invoice_links=[dict(header=T('Print'), 
body=[lambda row: A(I(_class='icon-print'), _title=T(Print Invoice), 
_target=_blank, _class=button, _href=URL(print, print_invoice, 
args=[row.id])), 
  lambda row: A(I(_class='icon-print'), _title=T(Print Invoice), 
_target=_blank, _class=button, _href=URL(print, print_invoice, 
args=[row.id]))])]

thanks and best regards,
stifan

  

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Re: Custom form with jquery acts weird

2013-09-27 Thread Anthony
If you follow Massimo's suggestion:

button onclick=event.preventDefault();window.location='{{=URL('index')}}'
Cancel/button

everything seems to work fine. What problem do you have after making that 
change?

Anthony

On Friday, September 27, 2013 9:00:47 PM UTC-4, Jordan Ladora wrote:

 Hi Massimo,

 Thanks for your help. I think I'm crystal clear on your explanation 
 regarding the button, but I'm still confused on the other issue that 
 Anthony answered previously, despite his and your posts.. 

 In my controller I used:

   form = SQLFORM.factory(*fields)

   if form.accepts(request, session): 


 Could you please be a little more specific? What should I use here instead 
 of 'form.accepts' ? I think this is causing me trouble elsewhere in my 
 application, too, and it would be really helpful if I knew a little bit 
 more..

 Thanks again,
 -J



 On Tuesday, September 17, 2013 12:15:01 PM UTC-7, Jordan Ladora wrote:

 Hi,

 I have the same problem as 


 https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/7Meea7Ul0o8/4ZdrD9hP5MEJ

 https://groups.google.com/forum/?fromgroups#!searchin/web2py/custom$20form$20jquery/web2py/E9RyEqh01RQ/6duW4RmALvcJ

 From the first thread/link above, ...if I use a regular form, {{=form}}, 
 then validation works but not if I use the custom form. Also form.process() 
 works, so the problem seems to be related to custom forms..

 Those threads seemed to end without finding a solution. I think the 
 author of those threads didn't realize that the form is actually being 
 validated, but it doesn't seem like it b/c the error messages do not show 
 with the custom form. 

 In my hands, if I use a custom form, it validates OK but form errors do 
 not display and, quite often, any jquery code in the view misbehaves (which 
 is the real problem). This behavior turns on and off depending ONLY on 
 whether I have a custom form. I used {{=custom.form.begin}} and 
 {{=custom.form.end}} and {{=form.custom.widget.xyz}} and 
 {{=form.custom.label.xyz}} in the view. If I replace it with {{=form}} then 
 everything works perfectly. 

 In the controller, I used 

 if form.accepts(request, session, onvalidation=abc):
   ...


 Thanks for any help. I love the custom forms and it really stinks not 
 being able to use them with jQuery!!

 -jl

 ps - I previously posted with more details about this problem, before I 
 realized the problem seems related more generally to javascript/jquery + 
 custom forms -

 https://groups.google.com/forum/?fromgroups=#!topic/web2py/rPHKPqqHbsg
 https://groups.google.com/forum/?fromgroups=#!topic/web2py/0LpfMJPwSsI




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[web2py] Getting started with routes.py error: type 'exceptions.ImportError' No module named fileutils ?

2013-09-27 Thread User
Using web2py  Version 2.6.4-stable+timestamp.2013.09.22.17.43.26 with 
Python 2.7.  I've got web2py up and running with a simple app.  Now I'm 
trying to get routes working.  What I did was copy 
routes.patterns.example.py from web2pyroot/examples to the web2pyroot 
folder and rename to routes.py.  Reloading routes from admin at this point 
works.  Then in my app I copied routes.example.py to routes.py.  I reloaded 
routes from admin and an error is generated with a ticket.  Note I did not 
edit either routes file at all yet.  The ticket says:
 
Error ticket for admin Ticket ID 

127.0.0.1.2013-09-27.22-20-40

type 'exceptions.ImportError' No module named fileutils
Version  web2py™ Version 2.6.4-stable+timestamp.2013.09.22.17.43.26  Python 
Python 
2.7: C:\www\web2py\web2py_no_console.exe (prefix: C:\www\web2py)  Traceback 

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.

Traceback (most recent call last):
  File /home/mdipierro/make_web2py/web2py/gluon/restricted.py, line 217, in 
restricted
  File *C:/www/web2py/applications/admin/controllers/default.py* 
http://127.0.0.1:8000/admin/default/edit/admin/controllers/default.py, line 
1795, in module
  File /home/mdipierro/make_web2py/web2py/gluon/globals.py, line 371, in 
lambda
  File *C:/www/web2py/applications/admin/controllers/default.py* 
http://127.0.0.1:8000/admin/default/edit/admin/controllers/default.py, line 
1700, in reload_routes
  File /home/mdipierro/make_web2py/web2py/gluon/rewrite.py, line 381, in load
  File /home/mdipierro/make_web2py/web2py/gluon/rewrite.py, line 321, in load
  File string, line 21, in module
  File /home/mdipierro/make_web2py/web2py/gluon/custom_import.py, line 86, in 
custom_importer
ImportError: No module named fileutils

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.