[web2py] Re: plugin_lazy_options_widget trigger event

2012-05-16 Thread kenji4569
Hi Jim,

In puling_suggest_widget, trigger events are invoked from a js file:
https://github.com/sqlabs/sqlabs/blob/master/static/plugin_suggest_widget/suggest.js
by
$input.trigger($input.attr('id') + '__unselected');
$input.trigger($input.attr('id') + '__selected', [val]);
methods.
To setup your trigger events, first you need to create a custom widget for 
a field, and then trigger events inside the widget using the jQuery trigger 
method.

Regards,
Kenji

2012年5月16日水曜日 4時46分20秒 UTC+9 Jim S:

 Hi 

 I'm trying to use the plugin_lazy_options_widget to build a dependent 
 select list.  I have to fields on the screen, both with the IS_IN_DB 
 validator and values available in the second depend on what is selected 
 in the first.  This widget from s-cubism seems like just the thing, but 
 I can't figure out how to pass the right event that will trigger the 
 population of the second widget. 

 The example shows it working with another widget from s-cubism which 
 triggers an event on the 'body' element but I can't see how to trigger 
 the right event to get mien working off another SELECT element. 

 Can someone give me some pointers on how to determine the event to watch 
 for? 

  -Jim 




[web2py] Re: plugin from dev.s-cubism.com question

2012-05-05 Thread kenji4569
The direct submit command $('.dialog-front').find('form').submit()
still produces the same result. So the problem might be not the uploadify 
widget but the form processing it self. Could you debug inside the 
form.accepts method and check its passed variables such as request.vars and 
session.

2012年5月5日土曜日 16時24分27秒 UTC+9 CtrlSoft:

 u can check above links, still not solved problem



[web2py] Re: plugin from dev.s-cubism.com question

2012-05-05 Thread kenji4569
I think so, but I don't have any clue for this session problem..

2012年5月5日土曜日 19時58分19秒 UTC+9 CtrlSoft:

 on localhost works fine beacause, it is using the same session, but on 
 server, when i acces page app creates one session and when i submit the 
 upload form it creates another one session, i think the problem is that 
 there is different sessions. app remember previous session but form pass 
 another session? it is right? 



[web2py] Re: plugin from dev.s-cubism.com question

2012-05-04 Thread kenji4569
I'm sorry I couldn't guess what's happened inside. At least for me, I 
haven't encountered that problem. Could you inspect more details for that 
(by such as pdb debugger). The process of the uploadify plugin is as 
follows. First the client uploads a file via ajax using a flash and the 
server saves the file and returns the new filename of the file. Then, the 
client post the new filename with other filed values.

Regards,
Kenji


2012年5月4日金曜日 19時02分55秒 UTC+9 CtrlSoft:

 hi i installed this plugin from dev.s-cubism.com
 http://dev.s-cubism.com/plugin_elrte_widget 

 i have a problem with upload/list uploaded files
 on local host works fine, but when i upload it to server, upload is done, 
 but the uploaded file is not listing/appear in dialog 
 anybody  used it? to give me some suggetsions. thx in advance 



[web2py] Re: syncing plugins across apps and with github -- again

2012-04-07 Thread kenji4569
I met the same issue, and took the following approach:

- Create a centralized plugin app
For me, this is the following app:
https://github.com/sqlabs/sqlabs/tree/master/modules

- Reference the modules of the app from other apps like:
import applications.sqlabls.modules.plugin_color_widget

In this approach, you have to take care of static and view file pathes for 
referencing the ones in the centralized plugin app in individual plugins. 
For instance:

APP = os.path.basename(os.path.dirname(os.path.dirname(__file__)))
URL(APP, 'static', 'plugin_color_widget/css/colorpicker.css')
(see actual example: 
https://github.com/sqlabs/sqlabs/blob/master/modules/plugin_color_widget.py)

Also, you can't reuse model and controller files in the centralized plugin 
app. They should be just for demos or tests.

I'm not sure this approach is the best way to go, but it works fine for me 
for now. What do you think?

Kenji

2012年4月8日日曜日 2時32分47秒 UTC+9 monotasker:

 I want to float a proposal for plugin infrastructure that I'd love to see 
 made part of the web2py core. It takes a bit of explanation, so bear with 
 the long post.

 I'm starting to find that the syncing issue is a major one with the 
 (otherwise great) plugin infrastructure. I have a growing series of plugins 
 that I'm using in a number of my apps. Most are custom, written by me, but 
 most are in a major state of flux. I use most of plugins in multiple apps, 
 and I tend (because of time constraints) to debug and add features as 
 necessary for whatever app I'm actively developing at the moment. Right 
 now, the only built-in option for keeping these plugins up-to-date is to 
 pack and export them constantly, and constantly be importing them into 
 other apps. What I need is a centralized way to sync plugins. At the same 
 time, I'd like to be able to conveniently isolate the development of a 
 plugin to a dedicated git repo, both for versioning and so that the source 
 files can be quickly made available to the community on github.

 I see three ways of approaching this problem:

 1. Run a script that searches my apps for a given plugin and uses a 
 file-syncing library to update older versions. This introduces the 
 possibility of the syncing algorithm overwriting the wrong folder. It also 
 makes it more awkward to use github for plugin development. Since the 
 plugin files are spread across several folders, intermixed with non-plugin 
 files, it's practically impossible to have one git repo for the app and a 
 second for the plugin.

 or 

 2. Move plugin files to a central location (maybe web2py/plugins) and 
 create symlinks in the app directories. This avoids the hazards of syncing 
 across apps and makes it easy to set up a git repo (since the plugin folder 
 is outside the app folder and all the plugin files are in a single folder). 
 Setting up and moving the symlinks, though, is time consuming and 
 error-prone if it's done by hand. It also seems redundant to keep symlinks 
 in the app folders at all. Why not just give the app a list of plugins to 
 look for in the 'web2py/plugins' directory?

 3. Change the web2py internals so that plugins can be installed either on 
 a per-app basis (as it is now) or on an installation-wide basis (in 
 web2py/plugins). When a plugin is installed centrally, its name is just 
 added to a list in the default model file and its files are imported into 
 the web2py python environment. No symlinks are needed. This would not break 
 backward compatibility (since the current plugin system could co-exist with 
 this central one side-by-side). But it would make plugins much more useful 
 for me. It also seems to me that this option actually requires the least 
 coding.

 So I have two questions. First, do others agree that #3 is the best way to 
 go? Am I missing some key issues? Second, while I'm happy to help implement 
 #3, it's also the solution that I'm least qualified to implement. I'm not 
 sure exactly how the web2py env works and how to make sure that gluon can 
 find, e.g., model and controller files if they're not in the app folders. I 
 think we could ease the problem by requiring that the app folder structure 
 be duplicated in each plugin folder 
 (web2py/plugins/plugin_parrot/controllers/plugin_parrot.py, etc.) but does 
 anyone else know how easy/difficult this would be? If you can point me in 
 the right direction I could try to figure the rest out. But if there's 
 anyone else willing to work on the problem I'd be glad for that too.

 Ian



[web2py] Re: CSV Import performance improvement idea

2012-02-14 Thread kenji4569
I use gluon.scheduler to import large csv files for production
environment, and execute db.commit() by 100 records in the task. This
works well for me.

Kenji

On 2月14日, 午後4:34, Johann Spies johann.sp...@gmail.com wrote:
 On 14 February 2012 00:54, Omi Chiba ochib...@gmail.com wrote:

  I have a problem with the performance of CSV import and I assume it
  generate INSERT statement for every record so it will be 8000
  statement if you have 8000 records in csv file.

  Can we use bulk_insert method instead so there will be always only one
  INSERT statement  which should reduce the performance significantly ?

  As I understand it the database (at least Postgresql) uses the COPY

 statement to import csv-files.  That is much quicker than a series of
 individual inserts.

 Regards
 Johann

 --
 Because experiencing your loyal love is better than life itself,
 my lips will praise you.  (Psalm 63:3)


[web2py] Re: CSV Import performance improvement idea

2012-02-14 Thread kenji4569
@ Niphlod: The situation for me is that non-programmer operators
upload 10,000-100,000 product records mainly for inventory updates via
an admin interface. It's not so huge but large enoght to exceed a
server resposne time limit. The upload is not a bulk copy operation,
but insert/update operations for each record which has a pkey. I think
the upload keeps consistency when it aborted halfway. I am concerned
that the single commit would cause high memory usage which should be
avoided for live environment.

Regards,
Kenji

On 2月15日, 午前8:23, Niphlod niph...@gmail.com wrote:
 you need to make differences between methods .

 web2py stand in the middle, not all databases have facilities like the COPY
 command of postgresql.

 Also, there are methods to export/import from csv at the database level and
 at the table level. If you need to restore a table from the admin app, you
 have to take into account the time to phisically transfer the csv file.
 web2py methods also can use uuid fields to do upserts , deals with
 reference, list:* types, etc.

 If you have huge tables, or machines not performant enough, you shouldn't
 use web2py methods and code something tailored to your needsI don't
 have issues for normal tables with 50 records (file uploaded to remote,
 import from local file directly from the code, using DAL) .
 Of course, if your table contains several columns or large blobs, YMMV.

 PS @ Kenji: normally if you restore a table or import something, you want
 to know what records were committed and what records weren't, if you're not
 using pkeys or uuids for every single record committing 100 records at
 a time is normally considered a bad behaviour: if your file contain a bad
 record, you can't assure the consistency of the table
 The time taken to import 8000 records with a commit every 100 is more than
 importing 8000 records and doing a single final commit, and you'll retain
 consistency, e.g. if something falls apart, you have a functioning table
 instead of a broken one.

 Again, @ all, YMMV: if your csv's are millions of records and you don't
 mind database consistency (e.g., all records in the tables are then
 polished or filtered in a smart way), you can commit every n records and
 store the last committed line in some place else, so if your import
 crashes, you know where to start (be aware, writing performant checks and
 logics to import incrementally something to dbs and make it work in every
 possible condition is a quite daunting task).
 My point is: don't be shy using transactions, commits and rollbacks, they
 are simpler to use, very performant and maybe the most wonderful features
 in a relational database!


[web2py] Re: Need a instruction for Rating Plugin

2012-01-13 Thread kenji4569
Thanks for your blog post!

On 1月14日, 午前3:55, Omi Chiba ochib...@gmail.com wrote:
 It easy to use and works great !!

 Here's my blog 
 posthttp://ochiba77.blogspot.com/2012/01/web2py-plugin-rating-widget.html

 On Jan 12, 7:08 pm, kenji4569 hos...@s-cubism.jp wrote:







  I made a similar plugin before, and now uploaded it to my plugin site:

 http://dev.s-cubism.com/plugin_rating_widget

  The plugin provide a form widget to generate the rating chooser.

  Just give it a try.

  (Note that the plugin has some boilerplate codes for dealing with ajax
  form and for customizing css and js files.)

  Kenji

  On 1月13日, 午前4:56, Chris Hawkes chrshawke...@gmail.com wrote:

   I did take a look at that myself.   I find it much harder to figure out 
   how to apply a plugin to my design then to just do it all over myself 
   specific to my design.  If you are beginner it will be a nightmare.  You 
   should prabably make your own with simple form variables using jquery and 
   CSS to create roll over effects

   Sent from my Samsung smartphone on ATT

   Omi Chiba ochib...@gmail.com wrote:
   I'm trying to use the plugin but it doesn't provide me much
   information.
   http://www.web2py.com/plugins/default/rating

   Is there anyone who use it and who can provide me a little bit more
   details ?


[web2py] Re: Need a instruction for Rating Plugin

2012-01-12 Thread kenji4569
I made a similar plugin before, and now uploaded it to my plugin site:


http://dev.s-cubism.com/plugin_rating_widget


The plugin provide a form widget to generate the rating chooser.


Just give it a try.


(Note that the plugin has some boilerplate codes for dealing with ajax
form and for customizing css and js files.)


Kenji

On 1月13日, 午前4:56, Chris Hawkes chrshawke...@gmail.com wrote:
 I did take a look at that myself.   I find it much harder to figure out how 
 to apply a plugin to my design then to just do it all over myself specific to 
 my design.  If you are beginner it will be a nightmare.  You should prabably 
 make your own with simple form variables using jquery and CSS to create roll 
 over effects

 Sent from my Samsung smartphone on ATT







 Omi Chiba ochib...@gmail.com wrote:
 I'm trying to use the plugin but it doesn't provide me much
 information.
 http://www.web2py.com/plugins/default/rating

 Is there anyone who use it and who can provide me a little bit more
 details ?


[web2py] Re: LOAD, javascript and a loading gif

2012-01-10 Thread kenji4569
How do I get javascript in a component plugin to execute each time after the 
component is loaded so the javascript is applied to the loaded component 
elements?

I'd encountered the similar problem and discussed before:

http://groups.google.com/group/web2py-developers/browse_thread/thread/fe66558085294456/210e0c8a2e007ecc?lnk=gstq=plugins#210e0c8a2e007ecc

Although  in this case, the above final solution would be good enough,
could you have a look my solution mentioned in the discussion?


Besides, jquery.spinner.js might be a good option  for a preloader:

http://www.jqueryin.com/projects/spinner-jquery-preloader-plugin/#demos

I extensively use it for my projects (ex: 
http://dev.s-cubism.com/plugin_jstree).


Kenji


On 1月10日, 午後7:37, Liam childs...@googlemail.com wrote:
 I got it working towards the end of this post. I've included to original
 text because I thinks it explains my problem better. Solution is in red.

 I obviously didn't state my problem clearly. The issue isn't replacing all
 of the loaded html with an image, just the link that gets clicked. A more
 specific question related to the way I tried to solve it is: How do I get
 javascript in a component plugin to execute each time after the component
 is loaded so the javascript is applied to the loaded component elements?
 The javascript belongs in the plugin and can not be put in the application,
 this would break the modularity.

 Hopefully some code will clear things up.

 plugin_test controller:
 def overview():
     if len(request.args)  0 and request.args[0] == 'refresh'
         time.sleep(4) # In place of the plugin's data processing code
     grid = SQLFORM.grid(db.plugin_test_tablename)
     refresh = DIV(A('Refresh', _class='button replacewloading',
 _href=URL(c='plugin_test', f='overview.load', args=['refresh']),
 cid=request.cid))
     return dict(grid=grid, refresh=refresh)

 plugin_test view:
 {{=grid}}
 {{=refresh}}

 application view:
 {{extend 'layout.html'}}
 {{=LOAD('plugin_test', 'overview.load', ajax=True)}}

 the javascript I'm trying to execute:
 $(function() {
     $(.replacewloading).click(function() {
         $(this).parent().html('spanimg
 src=static/plugin_test/images/loading.gif/Refreshing.../span')
     } );

 } );

 So far I've tried:

    1. Creating a javascript file in the plugin static directory called
    loading.js and writing response.files.append(URL('static',
    'plugin_test/js/loading.js')) in the plugin controller. If it worked,
    this would nevertheless be a poor solution as the image isn't configurable.
    2. Removing all line breaks from the script and writing 
    response.js(script) in the plugin controller. Again no luck.
    3. Including the script directly into the view html via the view and
    controller. This is the case where the script seems to disappear. When I
    inspect the html using Firebug, there's no trace of it. It also leaves open
    the question of how it will get executed when the component is finished
    loading. It turns out that this is the working solution. The script
    doesn't disappear, it can be found in jquery.js/eval/seq. I'm not
    knowledgable about javascript/jquery so I have no idea where that actually
    is. It isn't part of the filesystem. Some sort of virtual client-side
    storage perhaps? I'm still not sure why it wasn't working earlier, perhaps
    I made a syntax error somewhere.

 The refresh button should get replaced while the page reloads so the user
 can't click it again, and they know that something is still happening in
 the background.

 Sorry for the confusion and thanks for the help from all of you,
 Liam

 Final solution for those who are interested:

 plugin_test controller:
 def overview():
     from gluon.tools import PluginManager
     plugins = PluginManager('test', loading_gif=URL('static',
 'plugin_test/images/loading.gif'))

     if len(request.args)  0 and request.args[0] == 'refresh'
         time.sleep(4) # In place of the plugin's data processing code
     grid = SQLFORM.grid(db.plugin_test_tablename)
     refresh = DIV(A('Refresh', _class='button replacewloading',
 _href=URL(c='plugin_test', f='overview.load', args=['refresh']),
 cid=request.cid))
     return dict(src=plugins.test.loading_gif, grid=grid, refresh=refresh)

 plugin_test view:
 script
 $(function() {
     $(.replacewloading).click(function() {
         $(this).parent().html('spanimg
 src={{=src}}/Refreshing.../span')
     } );} );

 /script
 {{=grid}}
 {{=refresh}}

 application view:
 {{extend 'layout.html'}}
 {{=LOAD('plugin_test', 'overview.load', ajax=True)}}


[web2py] Re: web2py wins an InfoWorld 2012 Technology of the Year Award

2012-01-09 Thread kenji4569
Congratulations!

On 1月10日, 午前7:24, Niphlod niph...@gmail.com wrote:
 kudos to all devs. I'm happy to be a web2py user for the last couple
 of years.


[web2py] Published jsTree and MPTT plugins

2011-12-29 Thread kenji4569
Hi all, I and Yusuke Kishita had developed jsTree and MPTT plugins
which manages tree structured data, and now published them on our
web2py plugin site with demos and codes:


[jsTree Plugin]
http://dev.s-cubism.com/plugin_jstree


[MPTT Plugin]
http://dev.s-cubism.com/plugin_mptt



The MPTT plugin is originated in django-mptt, and is a web2py
implemntation of Modified Preorder Tree Traversal (MPTT) algorithm
which manages tree structured data stored in db with faster selects.


The jsTree plugin allows you to create, read, update, delete and
further move tree structured data in a fancy ui by using jsTree
library. Then, the MPTT plugin could be injected into the jsTree
plugin as a base tree model.


I have noticed some discussions about the MPTT here, and definitely
wanted something like django-mptt in web2py:)


Yusuke, one of my colleagues, did a great job of developing for a
large part of both plugins. I really appreciate it.


We would be glad if you could try the plugins, and welcome your
feedback.


Yours,
Kenji


[web2py] Re: Published jsTree and MPTT plugins

2011-12-29 Thread kenji4569
 after installing and navigating to myapp/plugin_jstree I got this 
 errorinvalid view (plugin_jstree/index.html)Sorry, I should have noted that 
 the plugin requires response.generic_patterns = ['*'] (See db.py in 
 welcome application of the latest version of web2py) to show the demo. (And 
 also the jstree plugin requires the mptt plugin for demo.)
I'm currently using solidtable, paginator, suggest widget and tablecheckbox on 
a project and these have simplified my work tremendously.Thanks a lot for 
using them!
Kenji

On 12月30日, 午前2:07, Vasile Ermicioi elff...@gmail.com wrote:
 after installing and navigating to myapp/plugin_jstree I got this errorinvalid
 view (plugin_jstree/index.html)


[web2py] Re: Published jsTree and MPTT plugins

2011-12-29 Thread kenji4569
 after installing and navigating to myapp/plugin_jstree I got this 
 errorinvalid view (plugin_jstree/index.html)


Sorry, I should have noted that the plugin requires
response.generic_patterns = ['*'] (See db.py in welcome
application of the latest version of web2py) to show the demo. (And
also the jstree plugin requires the mptt plugin for demo.)



I'm currently using solidtable, paginator, suggest widget and tablecheckbox on 
a project and these have simplified my work tremendously.


Thanks a lot for using them!

Kenji
On 12月30日, 午前2:07, Vasile Ermicioi elff...@gmail.com wrote:
 after installing and navigating to myapp/plugin_jstree I got this errorinvalid
 view (plugin_jstree/index.html)


[web2py] Re: Solidform: key-error

2011-12-20 Thread kenji4569
Thanks for your feedback. I'm relieved:)

On 12月20日, 午後5:15, Johann Spies johann.sp...@gmail.com wrote:
 Dear Kenji,

 The form is working now without the previous problems.  Thank you very much
 for making life easier for us!

 Regards
 Johann
 --
 Because experiencing your loyal love is better than life itself,
 my lips will praise you.  (Psalm 63:3)


[web2py] Re: Solidform: key-error

2011-12-19 Thread kenji4569
Thanks for your details.

I found a bug in the plugin, which occurs when using fields with hide
properties such as readonly. Then I fixed the bug. Could you test the
new version of the plugin?: http://dev.s-cubism.com/plugin_solidform

Regards,
Kenji

On 12月19日, 午後5:51, Johann Spies johann.sp...@gmail.com wrote:
 Dear Kenji,

 Apologies for the late reply.  I was away for a few days.

 Do you use virtual fields for computing the article_eq and ltitle?

 No.

 Here is my model:

 akb_signature_uuid = db.Table(db, 'akb_signature_uuid',
                      Field('uuid', length = 64, default =
 lambda:str(uuid.uuid4()),
                            notnull = True, writable = False, readable =
 False,
                            unique = True, ondelete = 'CASCADE'),
                      Field('created_on', 'datetime', default = request.now,
                            readable = False, writable = False),
                      Field('created_by', db.auth_user, default =
 auth.user_id,
                            readable = False, writable = False),
                      Field('updated_on', 'datetime', default = request.now,
                            readable = False, writable = False),
                      Field('updated_by', db.auth_user, update =
 auth.user_id,
                            readable = False, writable = False)

 ## The following two functions are used to calculate article_eq:

 def au_cleanup(au):
     au1 = re.sub(',', '', au.strip())
     au2 = re.sub('[ ]+', ' ', au1)
     return au2.upper()

 def art_ekw(art):
     skrywers = set ([])
     if art.primaryauthor:
         skrywers.add (au_cleanup(art.primaryauthor))
     if art.authors:
         for au in art.authors.split(';'):
             skrywers.add(au_cleanup(au))
     if len(skrywers):
         ekw = 1.0 / len(skrywers)
     else:
         ekw = 0
     return ekw

 db.define_table('akb_articles',
                 Field('title'),
                 Field('primaryauthor'),
                 Field('authors', 'text'),
                 Field('rp_author', length = 64,
                        requires = IS_EMPTY_OR(IS_IN_DB(db,
 'akb_reprint.uuid', '%(rp_author)s'))),
                 Field('journal',
                       requires = IS_IN_DB(db, 'akb_journal.uuid',
 '%(title)s')),
                 Field('bib_id'),
                 Field('bib_pages'),
                 Field('doctype'),
                 Field('language'),
                 Field('abstract', 'text'),
                 Field('bib_vol'),
                 Field('bib_date'),
                 Field('url'),
                 Field('pubyear', compute = lambda x: x['bib_date'][-4:]),
                 Field('ut', # isi-unieke rekordnommer
                       requires = IS_EMPTY_OR(IS_NOT_IN_DB(db,
 'akb_articles.ut'))),
                 Field('scopus_id', requires = IS_EMPTY_OR(IS_NOT_IN_DB(db,
 'akb_articles.scopus_id'))),
                 Field('sabinet_id', requires = IS_EMPTY_OR(IS_NOT_IN_DB(db,
 'akb_articles.sabinet_id'))),
                 Field('isap_id', requires = IS_EMPTY_OR(IS_NOT_IN_DB(db,
 'akb_articles.isap_id'))),
                 Field('ltitle', compute = lambda x:
 re.sub('[iI]|[/][iI]|[sS][uU][pbBP]|/[sS][uU][pPbB]|\W',
                                                            '',
 x['title'].lower())),
                 Field('article_eq', 'double' , compute = lambda x:
 art_ekw(x)),
                 akb_signature_uuid,
                 format = '%(title)s'
                 )

 If it didn't work, please let me know more details.



 As I am not using virtualfields, I did not try your suggestion.

 Thanks for your attention.

 Regards
 Johann

 --
 Because experiencing your loyal love is better than life itself,
 my lips will praise you.  (Psalm 63:3)

[web2py] Re: Solidform: key-error

2011-12-17 Thread kenji4569
Hi Johann,
I've just investigated the problem.

Do you use virtual fields for computing the article_eq and ltitle?

If so, SOLIDFORM as well as SQLFORM need to know the filed properties
of the virtual fields, such as labels and representation. Then, one
solution would be to define a virtual table in which the Fields of
the virtual fields are defined, and pass it to the SOLIDFORM as
follows:

form = SOLIDFORM(
DAL(None).define_table('no_table',
db.akb_articles,
*[Field('article_eq', label='xxx'),
  Field('ltitle', represent=yyy)]),
record=rekord,
fields=fields_read,
showid=False,
readonly=True)

If it didn't work, please let me know more details.

Regards,
Kenji

On 12月16日, 午後9:46, luismurciano luismurci...@gmail.com wrote:
 may be you should as Hosoda Kenji himself, he's a kind guy, and solve
 a bug i found in just few days. you can ask him in the comments
 section in the plugin page.

 On 15 dic, 11:17, Johann Spies johann.sp...@gmail.com wrote:







  I get

    table = self.createform(xfields)
    File applications/init/modules/plugin_solidform.py, line 96, in 
  createform
      n = len(self.flat_fields)
  KeyError: 'article_eq'

  when I use the following code:

  fields = ['id',
                'title',
                'primaryauthor',
                'authors',
                'rp_author',
                'journal',
                'bib_id',
                'bib_pages',
                'doctype',
                'language',
                'abstract',
                'bib_vol',
                'bib_date',
                'url',
                'pubyear',
                'ut',
                'scopus_id',
                'sabinet_id',
                'isap_id',
                'ltitle',
                'article_eq',
                'uuid',
                'created_on',
                'created_by',
                'updated_on',
                'updated_by']

      fields_read = [['id', None],
                     'title',
                     ['primaryauthor', None],
                     'authors',
                     ['rp_author', 'journal'],
                     ['bib_id', 'bib_pages' ],
                     ['doctype', 'language' ],
                     'abstract',
                     ['bib_vol', 'bib_date'],
                     'url',
                     ['pubyear', 'ut' ],
                     ['scopus_id', 'sabinet_id', 'isap_id' ],
                     'ltitle',
                     ['article_eq', 'uuid' ] ,
                     ['created_on', 'created_by'],
                     ['updated_on', 'updated_by']
                     ]

        form = SOLIDFORM(db.akb_articles, rekord, fields = fields, showid =
  False, readonly = True)

  The error occurs when I use fields = fields as well as the original one I
  have tried: fields = fields_read.

  The list as in 'fields'  is the result of db[table].fields().  So the
  fieldnames are correct.

  The following fields are computed fields: article_eq and ltitle.

  Any idea what is causing the key-error?

  The version of solidtable is one I downloaded today 
  fromhttp://dev.s-cubism.com/web2py_plugins/pack_plugin/solidform

  Regards
  Johann
  --
  Because experiencing your loyal love is better than life itself,
  my lips will praise you.  (Psalm 63:3)

[web2py] Re: Best practices: When to use classes

2011-12-02 Thread kenji4569
I think there are two types of web applications; one is for admin-
site, and the other is for front-site. For admin-site, CPU-usage would
be relatively not so critical, and rich man's programming (fat models
in web2py) could be allowed. Front-site, on the other hand, needs
optimization as far as possible, which put developers some works.

Kenji

On 12月2日, 午後1:43, Bruno Rocha rochacbr...@gmail.com wrote:
 Actually you dont need even an ajax callback.

 Take this example:

 ## models/script.py ##

 db.define_table(mytable, Field(picture, upload))
 print models executed!

 ## controllers/default.py ##

 def index():
     pictures = db(db.mytable).select()
     return dict(pictures=pictures)

 def download():
     return response.download(request, db)

 ## views/default/index.html ##

 {{for picture in pictures:}}
     img src={{=URL('default', 'download', args=picture.picture)}}
 {{pass}}

 Let's say the table has 200 records and I want to show 200 thumbnails in
 the page.

 Q: How many times you will see models executed! in terminal? and how many
 times the table will be defined? the Auth, Crud, Service etc will be
 instantiated?

 A: 201 times. 1 for the first request and 200 for each image which calls
 the 'download' function.

 Now imagine a system which huge model files, too many tables and calling
 long running funtions.

 my tips:

 1. Avoid models, use modules and import what you need in controller.

 2. Avoid the download function, put uploadfolder='static' and build
 URL('static') when need an image. Or put your download function in a
 separate application which have access to the file system and database.
 --

 Bruno Rocha
 [http://rochacbruno.com.br]


[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-13 Thread kenji4569
 I think you should host the plugins at your site and if you can provide a 
 .json for accessing the plugins information it will be included from your 
 index to web2pyslices in future.
Thanks for the information. I'm looking forward to the new site:)

Kenji


On 11月12日, 午後12:51, Bruno Rocha rochacbr...@gmail.com wrote:
  I've heard that Bruno is rewriting the web2pyslices.com and plugins
  will be able to be hosted. Should I host my plugins at the current
  plugin site, or wait until the new site open?

 Hi, the new web2pyslices is 90% just few adjustments, but, I am working on
 another projects now and it will take a bit more time.

 I think you should host the plugins at your site and if you can provide a
 .json for accessing the plugins information it will be included from your
 index to web2pyslices in future.

 --

 Bruno Rocha
 [http://rochacbruno.com.br]


[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-11 Thread kenji4569
I cannot help presenting my developing plugin, which has a concrete5-
like wysiwyg functionality:
http://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_edit(note:
use chrome or FF)
In this page, you can click highlighed blocks and edit their texts,
images, and htmls, and move specified blocks, and also check
corresponding the preview and live page.
These editable blocks are defined in web2py views using functions and
decorators:
https://github.com/sqlabs/sqlabs/blob/master/views/plugin_managed_html/page1.html
Although it's very experimental and plenty remains to be done, the
core logic may be closely related to this discussions.
Give it a try and welcome any feedback.

On 11月11日, 午後6:28, Bruno Rocha rochacbr...@gmail.com wrote:
 This one:http://ourway.ir/pages/blog?u=blouweb

 IS a very nice facebook clone app! can be extended for a cms. is it open
 source?


[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-11 Thread kenji4569
I cannot help presenting my developing plugin, which has a concrete5-
like wysiwyg functionality:


http://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_edit

(note: use chrome or FF)

In this page, you can click highlighed blocks and edit their texts,
images, and htmls, and move specified blocks, and also check
corresponding the preview and live page.

These editable blocks are defined in web2py views using functions and
decorators:

https://github.com/sqlabs/sqlabs/blob/master/views/plugin_managed_html/page1.html


Although it's very experimental and plenty remains to be done, the
core logic may be closely related to this discussions.
Give it a try and welcome any feedback.
On 11月11日, 午後6:28, Bruno Rocha rochacbr...@gmail.com wrote:
 This one:http://ourway.ir/pages/blog?u=blouweb

 IS a very nice facebook clone app! can be extended for a cms. is it open
 source?


[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-11 Thread kenji4569
Anthony
Thank you for your response.
How far along is that? Does it/will it use this plugin_managed_html? I am now 
developing several core plugins for the product, and will publish them soon. 
The product itself is currently for domestic, though.
On 11月11日, 午後10:46, Anthony abasta...@gmail.com wrote:
 This is great. By the way,http://dev.s-cubism.com/mentions nanahoshi-cms
 as a web2py based CMS under development. How far along is that? Does
 it/will it use this plugin_managed_html?

 Anthony







 On Friday, November 11, 2011 8:23:24 AM UTC-5, kenji4569 wrote:

  I cannot help presenting my developing plugin, which has a concrete5-
  like wysiwyg functionality:

 http://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_edit

  (note: use chrome or FF)

  In this page, you can click highlighed blocks and edit their texts,
  images, and htmls, and move specified blocks, and also check
  corresponding the preview and live page.

  These editable blocks are defined in web2py views using functions and
  decorators:

 https://github.com/sqlabs/sqlabs/blob/master/views/plugin_managed_htm...

  Although it's very experimental and plenty remains to be done, the
  core logic may be closely related to this discussions.
  Give it a try and welcome any feedback.
  On 11月11日, 午後6:28, Bruno Rocha rocha...@gmail.com wrote:
   This one:http://ourway.ir/pages/blog?u=blouweb

   IS a very nice facebook clone app! can be extended for a cms. is it open
   source?


[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-11 Thread kenji4569
Anthony


Thank you for your response.


How far along is that? Does it/will it use this plugin_managed_html?


I am now developing several core plugins for the product, and will
publish them soon. The product itself is currently for domestic,
though.
On 11月11日, 午後10:46, Anthony abasta...@gmail.com wrote:
 This is great. By the way,http://dev.s-cubism.com/mentions nanahoshi-cms
 as a web2py based CMS under development. How far along is that? Does
 it/will it use this plugin_managed_html?

 Anthony







 On Friday, November 11, 2011 8:23:24 AM UTC-5, kenji4569 wrote:

  I cannot help presenting my developing plugin, which has a concrete5-
  like wysiwyg functionality:

 http://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_edit

  (note: use chrome or FF)

  In this page, you can click highlighed blocks and edit their texts,
  images, and htmls, and move specified blocks, and also check
  corresponding the preview and live page.

  These editable blocks are defined in web2py views using functions and
  decorators:

 https://github.com/sqlabs/sqlabs/blob/master/views/plugin_managed_htm...

  Although it's very experimental and plenty remains to be done, the
  core logic may be closely related to this discussions.
  Give it a try and welcome any feedback.
  On 11月11日, 午後6:28, Bruno Rocha rocha...@gmail.com wrote:
   This one:http://ourway.ir/pages/blog?u=blouweb

   IS a very nice facebook clone app! can be extended for a cms. is it open
   source?


[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-11 Thread kenji4569
Massimo


I've heard that Bruno is rewriting the web2pyslices.com and plugins
will be able to be hosted. Should I host my plugins at the current
plugin site, or wait until the new site open?


Kenji

On 11月12日, 午前1:54, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Kenji,

 as you know we are building the new web2py web page. I'd rather link
 your plugins than mine. Would you be able to host some of plugins at

 http://web2py.com/plugins

 and provide a service like this:

 http://web2py.com/plugins/default/plugins.json

 I would still act as proxy for the service since it is linked by the
 wizard.

 Massimo

 On Nov 11, 8:20 am, kenji4569 hos...@s-cubism.jp wrote:







  Anthony

  Thank you for your response.

  How far along is that? Does it/will it use this plugin_managed_html?

  I am now developing several core plugins for the product, and will
  publish them soon. The product itself is currently for domestic,
  though.
  On 11月11日, 午後10:46, Anthony abasta...@gmail.com wrote:

   This is great. By the way,http://dev.s-cubism.com/mentionsnanahoshi-cms
   as a web2py based CMS under development. How far along is that? Does
   it/will it use this plugin_managed_html?

   Anthony

   On Friday, November 11, 2011 8:23:24 AM UTC-5, kenji4569 wrote:

I cannot help presenting my developing plugin, which has a concrete5-
like wysiwyg functionality:

   http://dev.s-cubism.com/plugin_managed_html/page1/_managed_html_edit

(note: use chrome or FF)

In this page, you can click highlighed blocks and edit their texts,
images, and htmls, and move specified blocks, and also check
corresponding the preview and live page.

These editable blocks are defined in web2py views using functions and
decorators:

   https://github.com/sqlabs/sqlabs/blob/master/views/plugin_managed_htm...

Although it's very experimental and plenty remains to be done, the
core logic may be closely related to this discussions.
Give it a try and welcome any feedback.
On 11月11日, 午後6:28, Bruno Rocha rocha...@gmail.com wrote:
 This one:http://ourway.ir/pages/blog?u=blouweb

 IS a very nice facebook clone app! can be extended for a cms. is it 
 open
 source?


[web2py] Re: date picker on v1.99

2011-10-10 Thread kenji4569
The behavior of the date picker seems to have changed from a certain
version.

For now, we should apply a patch to the anytime.js:

545 - this.showPkr(null);event.preventDefault();},keyAhead:function()
545 + return;event.preventDefault();},keyAhead:function()

[for readable version (http://www.ama3.com/anytime/AnyTime/
anytime.js)]
2696 - this.showPkr(null);
2696 + return;

I think it is critical since it is difficult to turn the input back to
empty.

Regards,
Kenji

On 10月10日, 午前11:45, Nik Go nikolai...@gmail.com wrote:
 manual entry doesn't work on the ff browsers:

     - Chromium 15.0.871.0
       - Epiphany/GNOME Web Browser 2.30.2
       - Mozilla Firefox 3.6.22

 I'm running ubuntu 10.04







 On Friday, October 7, 2011, Massimo Di Pierro wrote:
  Which browser? When I tried it, if I remember, I was able to type.

  On Oct 6, 8:48 pm, niknok nikolai...@gmail.com javascript:; wrote:
   The new date picker looks very good. Is there a way to input dates by
   typing it directly (similar to default behaviour in older versions), in
   addition to selecting dates thru the calendar interface?

   /r
   Nik

   P.S.
   Though I couldn't type in a date, I could paste one.  (which is a
   behavior I don't expect from users)


[web2py] Re: date picker on v1.99

2011-10-10 Thread kenji4569
Massimo,

I sent a patch with two more minor updates.

On 10月11日, 午前3:17, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Can you please email me the patch?

 On Oct 10, 11:35 am, kenji4569 hos...@s-cubism.jp wrote:







  The behavior of the date picker seems to have changed from a certain
  version.

  For now, we should apply a patch to the anytime.js:

  545 - this.showPkr(null);event.preventDefault();},keyAhead:function()
  545 + return;event.preventDefault();},keyAhead:function()

  [for readable version (http://www.ama3.com/anytime/AnyTime/
  anytime.js)]
  2696 - this.showPkr(null);
  2696 + return;

  I think it is critical since it is difficult to turn the input back to
  empty.

  Regards,
  Kenji

  On 10月10日, 午前11:45, Nik Go nikolai...@gmail.com wrote:

   manual entry doesn't work on the ff browsers:

       - Chromium 15.0.871.0
         - Epiphany/GNOME Web Browser 2.30.2
         - Mozilla Firefox 3.6.22

   I'm running ubuntu 10.04

   On Friday, October 7, 2011, Massimo Di Pierro wrote:
Which browser? When I tried it, if I remember, I was able to type.

On Oct 6, 8:48 pm, niknok nikolai...@gmail.com javascript:; wrote:
 The new date picker looks very good. Is there a way to input dates by
 typing it directly (similar to default behaviour in older versions), 
 in
 addition to selecting dates thru the calendar interface?

 /r
 Nik

 P.S.
 Though I couldn't type in a date, I could paste one.  (which is a
 behavior I don't expect from users)


[web2py] Re: AutocompleteWidget and unicode issue

2011-10-05 Thread kenji4569
Could you try the following plugin?http://dev.s-cubism.com/
plugin_suggest_widget
This is an alternative autocomplete widget that I developed, and could
handle unicode texts at least Japanese.

On 10月4日, 午後10:42, white fox white.fox...@gmail.com wrote:
 hi, i use AutocompleteWidget for some of my field in db like this:

 dbMysql.qbp_video.game.widget = SQLFORM.widgets.autocomplete(request,
 dbMysql.qbp_gameindex.title, limitby=(0,30), min_length=4)

 everything is ok,till I search a none englis word like تست (this is
 a persian text) in this case autocomplete dose not work, because of
 escape function use in javascript, the input text converted to
 somthing like this %u0645%u06CC%u0631%u0645  a unicode text.

 to solve this issue i change some code in sqlhtml.py in gluon:

 in AutocompleteWidget function around the line of 526:

     def callback(self):
         if self.keyword in self.request.vars:
             field = self.fields[0]
             strSearch = self.request.vars[self.keyword]
             strSearch = unicode(strSearch.replace('%', '\\'), utf-8)
             strSearch = strSearch.decode('unicode_escape')
             rows = self.db(field.like(strSearch + '%'))\
                 
 .select(orderby=self.orderby,limitby=self.limitby,*self.fields)

 so i add strSearch variable and do some stuff to get it work
 correctly.
 now i want to know is this the only way to solve this issue? is it
 correct way or i have security issue by doing this?

 thanks

 p.s: sorry for my bad english


[web2py] Re: AutocompleteWidget and unicode issue

2011-10-05 Thread kenji4569
Could you try the following plugin?

http://dev.s-cubism.com/plugin_suggest_widget 

This is an alternative autocomplete widget that I developed, and
could handle unicode texts at least Japanese. 
On 10月4日, 午後10:42, white fox white.fox...@gmail.com wrote:
 hi, i use AutocompleteWidget for some of my field in db like this:

 dbMysql.qbp_video.game.widget = SQLFORM.widgets.autocomplete(request,
 dbMysql.qbp_gameindex.title, limitby=(0,30), min_length=4)

 everything is ok,till I search a none englis word like تست (this is
 a persian text) in this case autocomplete dose not work, because of
 escape function use in javascript, the input text converted to
 somthing like this %u0645%u06CC%u0631%u0645  a unicode text.

 to solve this issue i change some code in sqlhtml.py in gluon:

 in AutocompleteWidget function around the line of 526:

     def callback(self):
         if self.keyword in self.request.vars:
             field = self.fields[0]
             strSearch = self.request.vars[self.keyword]
             strSearch = unicode(strSearch.replace('%', '\\'), utf-8)
             strSearch = strSearch.decode('unicode_escape')
             rows = self.db(field.like(strSearch + '%'))\
                 
 .select(orderby=self.orderby,limitby=self.limitby,*self.fields)

 so i add strSearch variable and do some stuff to get it work
 correctly.
 now i want to know is this the only way to solve this issue? is it
 correct way or i have security issue by doing this?

 thanks

 p.s: sorry for my bad english


[web2py] Re: AutocompleteWidget and unicode issue

2011-10-05 Thread kenji4569
Could you try the following plugin? 

http://dev.s-cubism.com/plugin_suggest_widget

This is an alternative autocomplete widget that I developed, and could
handle unicode texts at least Japanese. 
On 10月4日, 午後10:42, white fox white.fox...@gmail.com wrote:
 hi, i use AutocompleteWidget for some of my field in db like this:

 dbMysql.qbp_video.game.widget = SQLFORM.widgets.autocomplete(request,
 dbMysql.qbp_gameindex.title, limitby=(0,30), min_length=4)

 everything is ok,till I search a none englis word like تست (this is
 a persian text) in this case autocomplete dose not work, because of
 escape function use in javascript, the input text converted to
 somthing like this %u0645%u06CC%u0631%u0645  a unicode text.

 to solve this issue i change some code in sqlhtml.py in gluon:

 in AutocompleteWidget function around the line of 526:

     def callback(self):
         if self.keyword in self.request.vars:
             field = self.fields[0]
             strSearch = self.request.vars[self.keyword]
             strSearch = unicode(strSearch.replace('%', '\\'), utf-8)
             strSearch = strSearch.decode('unicode_escape')
             rows = self.db(field.like(strSearch + '%'))\
                 
 .select(orderby=self.orderby,limitby=self.limitby,*self.fields)

 so i add strSearch variable and do some stuff to get it work
 correctly.
 now i want to know is this the only way to solve this issue? is it
 correct way or i have security issue by doing this?

 thanks

 p.s: sorry for my bad english


[web2py] Anybody interested in SNS plugins?

2011-09-28 Thread kenji4569
Hi,

I am trying to develop a SNS site, and want to make it more
customizable and pluggable.
So I published some SNS plugins following Facebook:

[SNS-Plugins]
Comment Box http://dev.s-cubism.com/plugin_comment_box
Friendship http://dev.s-cubism.com/plugin_friendship
Messaging http://dev.s-cubism.com/plugin_messaging

Notice that these are very experimental, and I am not sure how their
models should be.

Is anybody interested in such SNS plugins?
It would be helpful if you could provide any feedback.

Regards,
Kenji


[web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread kenji4569
Maybe you should replace
Field('doc_nr',suggest_widget(db.akb_doccenter.doc_nr
with
Field('doc_nr', widget=suggest_widget(db.akb_doccenter.doc_nr
as the traceback indicates.

Regards,
Kenji

On 9月22日, 午後7:16, Johann Spies johann.sp...@gmail.com wrote:
 As the standard Web2py autocomplete widget does not play nicely with
 Internet Explorer, I am trying out the 'Suggest Widget'
 (http://dev.s-cubism.com/plugin_suggest_widget)

 but I runs into a problem with this code:

 from plugin_suggest_widget import suggest_widget

  vorm = SQLFORM.factory(
         Field('doc_nr',
                  suggest_widget(db.akb_doccenter.doc_nr, limitby=(0,20),
 min_length=2)))

 This  replaces:
  vorm = SQLFORM.factory(
       Field('doc_nr', widget = SQLFORM.widgets.autocomplete(
          request, db.akb_doccenter.doc_nr, limitby = (0, 20), min_length =
 2)))

 But with the suggest-widget-code I get

 File /home/js/web2py/applications/akb/controllers/doccenter.py
 http://localhost:8000/admin/default/edit/akb/controllers/doccenter.py,
 line 134, in toetsdoknommer
     Field('doc_nr',suggest_widget(db.akb_doccenter.doc_nr,
 limitby=(0,20), min_length=1)))
   File /home/js/web2py/gluon/sqlhtml.py, line 1281, in factory
     return SQLFORM(DAL(None).define_table(table_name, *fields), **attributes)
   File /home/js/web2py/gluon/sqlhtml.py, line 867, in __init__
     elif field.type.startswith('list:'):
 AttributeError: 'suggest_widget' object has no attribute 'startswith'

 What am I missing?

 Johann
 --
  May grace and peace be yours in abundance through the full knowledge of God
 and of Jesus our Lord!  His divine power has given us everything we need for
 life and godliness through the full knowledge of the one who called us by
 his own glory and excellence.
                                                     2 Pet. 1:2b,3a


[web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread kenji4569
That's strange..
Which browser do you use?
Are you sure you did select an element inside the select box by
clicking or keypress?
If you select the element, the input box should change the color from
pink to cyan.
The form vars record indicates you didn't select any element from the
select box.

Kenji

On 9月22日, 午後9:07, Johann Spies johann.sp...@gmail.com wrote:
 Kenji,

 I do not get error messages now but the autocompletion does not word.  I get
 a dropdown list and when I select one, what was entered in the form stays as
 it was.

 Example: If you look at the screenshot: if I select the first item in the
 list the following form vars gets recorded:

 Storage {'doc_nr': '', '_autocomplete_doc_nr__aux': 'ass'}

 The code:
 vorm = SQLFORM.factory(
         Field('doc_nr',widget=suggest_widget(db.akb_doccenter.doc_nr,
                                              id_field=db.akb_doccenter.id,
                                              limitby=(0,20), min_length=2)))
     if vorm.accepts(request.vars, session):
         response.flash = 'submitted %s' % vorm.vars
         print vorm.vars
     else:
         response.flash = 'nie gekry nie'

 regards
 Johann
 --
  May grace and peace be yours in abundance through the full knowledge of God
 and of Jesus our Lord!  His divine power has given us everything we need for
 life and godliness through the full knowledge of the one who called us by
 his own glory and excellence.
                                                     2 Pet. 1:2b,3a

  Screenshot - 22092011 - 14:03:05.png
 23K表示ダウンロード


[web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread kenji4569
Then, the problem might due to jQuery or CSS you used.
Did you see any error in JavaScript console of the browser?
If so, you might have to upgrade jQuery (at least =1.6).
If not, would you please show me your CSS?
In addition, I want to know whether the problem is specific only for
your application, or occurs for both my demo site and your
application?

Kenji

On 9月22日, 午後9:44, Johann Spies johann.sp...@gmail.com wrote:
 On 22 September 2011 14:38, kenji4569 hos...@s-cubism.jp wrote:

  That's strange..
  Which browser do you use?

 I have tested this on Iceweasel (Firefox) on Debian as well as Chrome.

  Are you sure you did select an element inside the select box by
  clicking or keypress?

 Both.  The cursor keys does not work in the list.

  If you select the element, the input box should change the color from
  pink to cyan.

  That does not happen.

 The form vars record indicates you didn't select any element from the select 
 box.

 I can move the mouse pointer down the list and as soon as I click the list
 disappears and nothing changes in the input box.

 Regards
 Johann

 --
  May grace and peace be yours in abundance through the full knowledge of God
 and of Jesus our Lord!  His divine power has given us everything we need for
 life and godliness through the full knowledge of the one who called us by
 his own glory and excellence.
                                                     2 Pet. 1:2b,3a


[web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread kenji4569
Johann,

I found that the autocomplete widget overridden the suggest widget in
your attached screenshot.
So, you might define both autocomplete widget and suggest widget for a
single field.
Since these widgets process callbacks even if they are just
initialized and not used,
the suggest widget is used for the field but the autocomplete widget
processes ajax callbacks.
Notice that if you define multiple autocomplete/suggest widgets for
multiple fields, you should pass different keyword arguments for the
widgets.

Richard,

Choosen looks promising! I will try it.

Kenji

On 9月22日, 午後11:10, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Hello Johann,

 Consider also using Choosen if you have long drop box, it has a pretty nice
 design...

 Richard

 On Thu, Sep 22, 2011 at 9:38 AM, Johann Spies johann.sp...@gmail.comwrote:







  Hallo Kenji,

  Then, the problem might due to jQuery or CSS you used.

  Did you see any error in JavaScript console of the browser?

  No, some warnings, but no errors.

  If so, you might have to upgrade jQuery (at least =1.6).

  If not, would you please show me your CSS?

  I have synchronised my app's css with that of the 'welcome'   app in the
  trunck this morning.

  In addition, I want to know whether the problem is specific only for
  your application, or occurs for both my demo site and your
  application?

  Your demo site works as expected so the problem must be somewhere in my
  setup.

  I have the following plugins in my app (some of which also have css-files):
    plugin_paginator
    plugin_powertable
    plugin_solidtable
    plugin_suggest_widget
    plugin_wiki

  Regards
  Johann

  --
   May grace and peace be yours in abundance through the full knowledge of
  God and of Jesus our Lord!  His divine power has given us everything we need
  for life and godliness through the full knowledge of the one who called us
  by his own glory and excellence.
                                                      2 Pet. 1:2b,3a


[web2py] Re: About how to make work Kenji widget lazy_options

2011-09-22 Thread kenji4569
Sorry I misunderstood.

If you have JS errors in your browser, the jQuery version might be
suspicious.

Does suggest_widget is essential to trigger lazy_option plugin?
No. The suggest_widget triggers two kind of events called
product_category__selected and product_category__unselected where
product_category is the name of the input field.
The lazy_option then catches the events. The event names are passed to
the constructor arguments of the  lazy_option. So the lazy_option
could handle any JS events not only those triggered by the
suggest_widget.

Kenji


On 9月23日, 午前12:58, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Does suggest_widget is essential to trigger lazy_option plugin?

 Richard

 On Thu, Sep 22, 2011 at 11:55 AM, Richard Vézina 







 ml.richard.vez...@gmail.com wrote:

  On Thu, Sep 22, 2011 at 11:39 AM, kenji4569 hos...@s-cubism.jp wrote:

  When I put value into category it's not
  always update the color field dropbox or it takes quite some time when it
  works
  It might be... due to intercontinental communication.

  What do you mean?

  I am not talking about your own website... It's work well there. I mean
  when I install both plugins and make it run with the demo models you suggest
  category, color, product...

  Could it be related somehow about web2py version, I use 1.98.2 actually, or
  jQuery version?

  Richard

  One solution could be to add ajax progress bar for the application,
  but it's a little bit out of the plugin scope.

  Regards,
  Kenji

  On 9月23日, 午前12:22, Richard Vézina ml.richard.vez...@gmail.com wrote:
   Ok I understand I was needing to install an other of your plugins...

   It's working quite anarchically... When I put value into category it's
  not
   always update the color field dropbox or it takes quite some time when
  it
   works...

   Richard

   On Thu, Sep 22, 2011 at 10:48 AM, Richard ml.richard.vez...@gmail.com
  wrote:

Hello Kenji,

I would try your :

   http://dev.s-cubism.com/plugin_lazy_options_widget

But I get this error :

No module named plugin_suggest_widget

I am reading the code and don't understand why and where
plugin_suggest_widget import should coming from base on your website
code example.

The installation of the plugin don't work out of the box or I am doing
something wrong...

I try to make it works by visiting the plugin_lazy_options_widget/
index page once plugin install...

Thanks for help.

Richard


[web2py] Re: About how to make work Kenji widget lazy_options

2011-09-22 Thread kenji4569
I am not sure about the version, but it seems OK.
However I see no other possible reason, so would you try to upgrade
the web2py version?

On 9月23日, 午前2:35, Richard Vézina ml.richard.vez...@gmail.com wrote:
 I have 1.6.1 under web2py 1.98.2







 On Thu, Sep 22, 2011 at 1:31 PM, kenji4569 hos...@s-cubism.jp wrote:
  Sorry I misunderstood.

  If you have JS errors in your browser, the jQuery version might be
  suspicious.

  Does suggest_widget is essential to trigger lazy_option plugin?
  No. The suggest_widget triggers two kind of events called
  product_category__selected and product_category__unselected where
  product_category is the name of the input field.
  The lazy_option then catches the events. The event names are passed to
  the constructor arguments of the  lazy_option. So the lazy_option
  could handle any JS events not only those triggered by the
  suggest_widget.

  Kenji

  On 9月23日, 午前12:58, Richard Vézina ml.richard.vez...@gmail.com wrote:
   Does suggest_widget is essential to trigger lazy_option plugin?

   Richard

   On Thu, Sep 22, 2011 at 11:55 AM, Richard Vézina 

   ml.richard.vez...@gmail.com wrote:

On Thu, Sep 22, 2011 at 11:39 AM, kenji4569 hos...@s-cubism.jp
  wrote:

When I put value into category it's not
always update the color field dropbox or it takes quite some time
  when it
works
It might be... due to intercontinental communication.

What do you mean?

I am not talking about your own website... It's work well there. I mean
when I install both plugins and make it run with the demo models you
  suggest
category, color, product...

Could it be related somehow about web2py version, I use 1.98.2
  actually, or
jQuery version?

Richard

One solution could be to add ajax progress bar for the application,
but it's a little bit out of the plugin scope.

Regards,
Kenji

On 9月23日, 午前12:22, Richard Vézina ml.richard.vez...@gmail.com
  wrote:
 Ok I understand I was needing to install an other of your plugins...

 It's working quite anarchically... When I put value into category
  it's
not
 always update the color field dropbox or it takes quite some time
  when
it
 works...

 Richard

 On Thu, Sep 22, 2011 at 10:48 AM, Richard 
  ml.richard.vez...@gmail.com
wrote:

  Hello Kenji,

  I would try your :

 http://dev.s-cubism.com/plugin_lazy_options_widget

  But I get this error :

  No module named plugin_suggest_widget

  I am reading the code and don't understand why and where
  plugin_suggest_widget import should coming from base on your
  website
  code example.

  The installation of the plugin don't work out of the box or I am
  doing
  something wrong...

  I try to make it works by visiting the plugin_lazy_options_widget/
  index page once plugin install...

  Thanks for help.

  Richard


[web2py] Re: Suggestion: Input field alignment for decimal and integer

2011-09-15 Thread kenji4569
How about this one?

http://dev.s-cubism.com/plugin_tight_input_widget

This is a size-adjusted input widget with such right aligned text. I'v
used this widget in one of my products (I rewrote it for the plugin
just now).

The size of the widget is automatically adjusted to maximum length of
the field value which is defined by validators such as IS_LENGTH and
IS_INT_IN_RANGE. In this case, mixture of text and numeric fields
would not look so odd.

I also think it might be better just to leave the default for
simplicity.

Kenji


On 9月14日, 午後10:13, Omi Chiba ochib...@gmail.com wrote:
 I'm not float/double guy but yes, it make sense.

 With that, we can use this.

 input.decimal, input.integer, input.double {
     text-align: right;

 }

 I also understand the Anthony's point. My table actually has five decimal
 field for different pricing for the product, which look really weird but
 there is also text-like integer value used for ID or status for example.

 If we keep the current, then I will just add this to my blog post in case
 someone looking for the solution.


[web2py] Re: Why web2py is in French by default? How can I change it?

2011-09-15 Thread kenji4569
I met exactly the same problem. My browser is set with Japanese and
has nothing to do with French settings.

Regards,
Kenji

On 9月15日, 午後7:10, guruyaya guruy...@gmail.com wrote:
 I think your browser is set with french by default. Look into your
 browser settings.

 On Sep 15, 11:08 am, Zhe Li linuxcity...@gmail.com wrote:







  Hi,

  I tried to find something in web2py book, but everything is in French now.
  (Wasn't like this yesterday)

  I am sure I have set my browser to English, anything wrong?

  Cheers,
  Zhe


[web2py] Re: Published my collection of plugins

2011-09-08 Thread kenji4569
Thanks for the information. But it seems that I have to buy a licence
to get the full source code. I will look for other solutions.

Kenji

On 9月8日, 午前2:59, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Hello Kenji,

 You will maybe find the code of the actual datepicker here 
 :http://www.dynarch.com/projects/calendar/

 If you clic on the ? when the datepicker popup you will have the
 disclaimer of the author of the plugin...

 Richard







 On Tue, Sep 6, 2011 at 8:59 PM, kenji4569 hos...@s-cubism.jp wrote:
   After i upload a file i get a icon in the text.
   How do i lauch the file that i just embedded in the text?
  The elrte editor prevents the icon link from clicking to download the
  file.
  So you have to first submit the editing html,
  and save the html in db,
  and then display the html in the view (as {{=XML(record.text)}}).
  But currently, the demo do not demonstrate this (so you need to
  implement this on your app).
  In the meantime, you can check the html source from the editor by
  clicking the source tab at the bottom of the editor.

  Kenji

  On 9月7日, 午前1:02, António Ramos ramstei...@gmail.com wrote:
   After i upload a file i get a icon in the text.
   How do i lauch the file that i just embedded in the text?

   Thank you

   2011/9/6 kenji4569 hos...@s-cubism.jp

 web2py gives the file in the download
 directory for example

  5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e

  lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
.doc
The former random string is a display file name, and just for demo.
The latter one is an actual file name generated by web2py.

Now, I remove the former, since it's confusing:
   http://dev.s-cubism.com/plugin_elrte_widget

Changing the latter would require much work with deeper inspection
into the web2py upload mechanism.

Changing the look and feel such as replacing icons would be easier,
and you should see the file_upload_or_choose() function in the usage
code of the demo.

Note that I do not implement a ready-made image/file chooser, and you
have to implement it for your own application, starting from the usage
code, including setting up your db and defining your image and file
tables.

Regards,
Kenji

On 9月6日, 午後6:01, António Ramos ramstei...@gmail.com wrote:
 Hello Kenji,
 Thank you for your fast work

 One problem!
 The form is not very friendly.

 In the submit form i choose a pdf for example myfile.pdf but in the
  name
 field you write the name that web2py gives the file in the download
 directory for example

  5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e

  lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
.doc
 This has no meaning to the user!

 Please see attached file for what i think it would be really
  helpfull.

 Thank you again

 António

 2011/9/6 kenji4569 hos...@s-cubism.jp

  Hi António,

  I implemented a file chooser for the elrte widget.
  Please try it:
 http://dev.s-cubism.com/plugin_elrte_widget

  Since the file chooser is very primitive, you may need to customize
  it.
  But, the customization would be easy with the expressive power of
  web2py (see the demo code).
  (Notice: I applied a small patch for the original elrte.js to make
  the
  file chooser available.)

  Thanks again for your valuable feedback,
  Kenji

  On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote:
   Thank you.
   I realy need your plugin ASAP but with the option to attach
  multiple
pdf
  or
   doc files.

   2011/9/4 kenji4569 hos...@s-cubism.jp

the elRTE WYSIWYG Widget does not allow to import a file
  other
than
  an
image.
It would be nice to import for example a pdf or a doc file
Thanks for your proposal.
I think it would be easy to implement it, because the image
  chooser
can be customized to anything.
I'll try to do this.

Kenji

On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote:
 Hello
 the elRTE WYSIWYG Widget does not allow to import a file
  other
than
  an
 image.
 It would be nice to import for example a pdf or a doc file

 Thank you
 António

 2011/9/4 kenji4569 hos...@s-cubism.jp

  Maybe the actual datepicker could be of some help to
  figure
out
  how to
  make it moves...
  Thanks, but I couldn't read the source of the datepicker
  since
it's
  compressed (I couldn't find the readable one in the host
  site).
  Other solution might be using jquery.ui.draggable, but it's
  not
so
  light as to just make it draggable.
  So, for now, I leave the anytime.js unmodified.

  Kenji

[web2py] Re: Published my collection of plugins

2011-09-06 Thread kenji4569
Hi António,

I implemented a file chooser for the elrte widget.
Please try it:
http://dev.s-cubism.com/plugin_elrte_widget

Since the file chooser is very primitive, you may need to customize
it.
But, the customization would be easy with the expressive power of
web2py (see the demo code).
(Notice: I applied a small patch for the original elrte.js to make the
file chooser available.)

Thanks again for your valuable feedback,
Kenji

On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote:
 Thank you.
 I realy need your plugin ASAP but with the option to attach multiple pdf or
 doc files.

 2011/9/4 kenji4569 hos...@s-cubism.jp







  the elRTE WYSIWYG Widget does not allow to import a file other than an
  image.
  It would be nice to import for example a pdf or a doc file
  Thanks for your proposal.
  I think it would be easy to implement it, because the image chooser
  can be customized to anything.
  I'll try to do this.

  Kenji

  On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote:
   Hello
   the elRTE WYSIWYG Widget does not allow to import a file other than an
   image.
   It would be nice to import for example a pdf or a doc file

   Thank you
   António

   2011/9/4 kenji4569 hos...@s-cubism.jp

Maybe the actual datepicker could be of some help to figure out how to
make it moves...
Thanks, but I couldn't read the source of the datepicker since it's
compressed (I couldn't find the readable one in the host site).
Other solution might be using jquery.ui.draggable, but it's not so
light as to just make it draggable.
So, for now, I leave the anytime.js unmodified.

Kenji

On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Great!

 It nice that you take care of feedback... Don't worry about IE ;-)

 For moving, I think it a most have feature since the actual
  datepicker
has
 it...

 What has to be done to make it available?

 Maybe the actual datepicker could be of some help to figure out how
  to
make
 it moves...

 Thank Kenji

 Richard

 On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp
  wrote:
  Hi Richard,

  thank you for your feedback.

  It works great except that it seems to conflict with jQuery UI
  tabs
and
  dialog...
  I fixed it (tested Chrome, FF, IE).
  See:
 http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
  (The anytime css should precede the jquery ui css)

  It no show up when my form are called with LOAD()
  I also fixed it.
  See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
  (I implemented a dynamic loader for js and css)

  Note however, since IE(=8?) could not put a dynamic css before
  loaded
  css,
  the conflict for jquery-ui still occurs for IE(=8?).
  see:

 http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load

  there is no way we can move it like the actual datepicker...
  This might be difficult to implement.

  Regards,
  Kenji

  On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com
  wrote:
   Hello,

   I just try anydate plugin... It works great except that it seems
  to
  conflict
   with jQuery UI tabs and dialog... It no show up when my form are
called
  with
   LOAD(), so it also could it be conflicting with LOAD() of web2py.
 Also
   there is no way we can move it like the actual datepicker...

   Richard

   On Tue, Aug 30, 2011 at 9:47 PM, kenji4569 hos...@s-cubism.jp
wrote:
 I still see the same
 problem with 'Format', 'Font size' and 'Font' dropdown
selections.
Sorry, I addressed the issue, and I think it would be fixed.
The cause for this is null entry for the text area.

Kenji

On 8月31日, 午前12:14, tomt tom_tren...@yahoo.com wrote:
 Hi,

 I tried your update, and I can now successfully modify text
  color
and
 background color with IE7 and IE8. Unfortunately I still see
  the
same
 problem with 'Format', 'Font size' and 'Font' dropdown
selections.
 That is,
 the dropdown selection is erased before I can select an
  option.

 - Tom

 On Aug 30, 4:05 am, kenji4569 hos...@s-cubism.jp wrote:

  Hi, Tom.

  Thank you for reporting the bug.
  I just fixed it.
  Please check:http://dev.s-cubism.com/plugin_elrte_widget
  (you might need to clear the browser cache)

  [modification detail]
  I upgraded theelrteversion from 1.2 to 1.3.
  Additionally, since the version 1.3 had a serious IE
  problem, I
  applied some patches for it.
  I also slightly modified the plugin css not to conflict
  with
the
  site
  css.
  (https://github.com/kenji4569/sqlabs/issues/39)

  Kenji

  On 8月30日, 午前11:38, tomt tom_tren

[web2py] Re: Published my collection of plugins

2011-09-06 Thread kenji4569
 web2py gives the file in the download
 directory for example
 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e
 lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 
 .doc
The former random string is a display file name, and just for demo.
The latter one is an actual file name generated by web2py.

Now, I remove the former, since it's confusing:
http://dev.s-cubism.com/plugin_elrte_widget

Changing the latter would require much work with deeper inspection
into the web2py upload mechanism.

Changing the look and feel such as replacing icons would be easier,
and you should see the file_upload_or_choose() function in the usage
code of the demo.

Note that I do not implement a ready-made image/file chooser, and you
have to implement it for your own application, starting from the usage
code, including setting up your db and defining your image and file
tables.

Regards,
Kenji


On 9月6日, 午後6:01, António Ramos ramstei...@gmail.com wrote:
 Hello Kenji,
 Thank you for your fast work

 One problem!
 The form is not very friendly.

 In the submit form i choose a pdf for example myfile.pdf but in the name
 field you write the name that web2py gives the file in the download
 directory for example
 5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e 
 lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63 
 .doc
 This has no meaning to the user!

 Please see attached file for what i think it would be really helpfull.

 Thank you again

 António

 2011/9/6 kenji4569 hos...@s-cubism.jp







  Hi António,

  I implemented a file chooser for the elrte widget.
  Please try it:
 http://dev.s-cubism.com/plugin_elrte_widget

  Since the file chooser is very primitive, you may need to customize
  it.
  But, the customization would be easy with the expressive power of
  web2py (see the demo code).
  (Notice: I applied a small patch for the original elrte.js to make the
  file chooser available.)

  Thanks again for your valuable feedback,
  Kenji

  On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote:
   Thank you.
   I realy need your plugin ASAP but with the option to attach multiple pdf
  or
   doc files.

   2011/9/4 kenji4569 hos...@s-cubism.jp

the elRTE WYSIWYG Widget does not allow to import a file other than
  an
image.
It would be nice to import for example a pdf or a doc file
Thanks for your proposal.
I think it would be easy to implement it, because the image chooser
can be customized to anything.
I'll try to do this.

Kenji

On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote:
 Hello
 the elRTE WYSIWYG Widget does not allow to import a file other than
  an
 image.
 It would be nice to import for example a pdf or a doc file

 Thank you
 António

 2011/9/4 kenji4569 hos...@s-cubism.jp

  Maybe the actual datepicker could be of some help to figure out
  how to
  make it moves...
  Thanks, but I couldn't read the source of the datepicker since it's
  compressed (I couldn't find the readable one in the host site).
  Other solution might be using jquery.ui.draggable, but it's not so
  light as to just make it draggable.
  So, for now, I leave the anytime.js unmodified.

  Kenji

  On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com
  wrote:
   Great!

   It nice that you take care of feedback... Don't worry about IE
  ;-)

   For moving, I think it a most have feature since the actual
datepicker
  has
   it...

   What has to be done to make it available?

   Maybe the actual datepicker could be of some help to figure out
  how
to
  make
   it moves...

   Thank Kenji

   Richard

   On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp
wrote:
Hi Richard,

thank you for your feedback.

It works great except that it seems to conflict with jQuery UI
tabs
  and
dialog...
I fixed it (tested Chrome, FF, IE).
See:
   http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
(The anytime css should precede the jquery ui css)

It no show up when my form are called with LOAD()
I also fixed it.
See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
(I implemented a dynamic loader for js and css)

Note however, since IE(=8?) could not put a dynamic css before
loaded
css,
the conflict for jquery-ui still occurs for IE(=8?).
see:

   http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load

there is no way we can move it like the actual datepicker...
This might be difficult to implement.

Regards,
Kenji

On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com
wrote:
 Hello,

 I just try anydate plugin... It works great except

[web2py] Re: Published my collection of plugins

2011-09-06 Thread kenji4569
 After i upload a file i get a icon in the text.
 How do i lauch the file that i just embedded in the text?
The elrte editor prevents the icon link from clicking to download the
file.
So you have to first submit the editing html,
and save the html in db,
and then display the html in the view (as {{=XML(record.text)}}).
But currently, the demo do not demonstrate this (so you need to
implement this on your app).
In the meantime, you can check the html source from the editor by
clicking the source tab at the bottom of the editor.

Kenji


On 9月7日, 午前1:02, António Ramos ramstei...@gmail.com wrote:
 After i upload a file i get a icon in the text.
 How do i lauch the file that i just embedded in the text?

 Thank you

 2011/9/6 kenji4569 hos...@s-cubism.jp







   web2py gives the file in the download
   directory for example

  5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e

  lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
  .doc
  The former random string is a display file name, and just for demo.
  The latter one is an actual file name generated by web2py.

  Now, I remove the former, since it's confusing:
 http://dev.s-cubism.com/plugin_elrte_widget

  Changing the latter would require much work with deeper inspection
  into the web2py upload mechanism.

  Changing the look and feel such as replacing icons would be easier,
  and you should see the file_upload_or_choose() function in the usage
  code of the demo.

  Note that I do not implement a ready-made image/file chooser, and you
  have to implement it for your own application, starting from the usage
  code, including setting up your db and defining your image and file
  tables.

  Regards,
  Kenji

  On 9月6日, 午後6:01, António Ramos ramstei...@gmail.com wrote:
   Hello Kenji,
   Thank you for your fast work

   One problem!
   The form is not very friendly.

   In the submit form i choose a pdf for example myfile.pdf but in the name
   field you write the name that web2py gives the file in the download
   directory for example

  5e74c950-95b2-4843-b4c6-53bc8efca8fe/plugin_elrte_widget/download/plugin_e
  lrte_widget_file.file.9a877c8c8c9d285c.4361726f6c696e61323031305f612e646f63
  .doc
   This has no meaning to the user!

   Please see attached file for what i think it would be really helpfull.

   Thank you again

   António

   2011/9/6 kenji4569 hos...@s-cubism.jp

Hi António,

I implemented a file chooser for the elrte widget.
Please try it:
   http://dev.s-cubism.com/plugin_elrte_widget

Since the file chooser is very primitive, you may need to customize
it.
But, the customization would be easy with the expressive power of
web2py (see the demo code).
(Notice: I applied a small patch for the original elrte.js to make the
file chooser available.)

Thanks again for your valuable feedback,
Kenji

On 9月4日, 午後8:01, António Ramos ramstei...@gmail.com wrote:
 Thank you.
 I realy need your plugin ASAP but with the option to attach multiple
  pdf
or
 doc files.

 2011/9/4 kenji4569 hos...@s-cubism.jp

  the elRTE WYSIWYG Widget does not allow to import a file other
  than
an
  image.
  It would be nice to import for example a pdf or a doc file
  Thanks for your proposal.
  I think it would be easy to implement it, because the image chooser
  can be customized to anything.
  I'll try to do this.

  Kenji

  On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote:
   Hello
   the elRTE WYSIWYG Widget does not allow to import a file other
  than
an
   image.
   It would be nice to import for example a pdf or a doc file

   Thank you
   António

   2011/9/4 kenji4569 hos...@s-cubism.jp

Maybe the actual datepicker could be of some help to figure
  out
how to
make it moves...
Thanks, but I couldn't read the source of the datepicker since
  it's
compressed (I couldn't find the readable one in the host site).
Other solution might be using jquery.ui.draggable, but it's not
  so
light as to just make it draggable.
So, for now, I leave the anytime.js unmodified.

Kenji

On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com
wrote:
 Great!

 It nice that you take care of feedback... Don't worry about
  IE
;-)

 For moving, I think it a most have feature since the actual
  datepicker
has
 it...

 What has to be done to make it available?

 Maybe the actual datepicker could be of some help to figure
  out
how
  to
make
 it moves...

 Thank Kenji

 Richard

 On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 
  hos...@s-cubism.jp
  wrote:
  Hi Richard,

  thank you for your feedback.

  It works great except that it seems to conflict with
  jQuery UI
  tabs

[web2py] Re: Published my collection of plugins

2011-09-04 Thread kenji4569
Maybe the actual datepicker could be of some help to figure out how to make it 
moves...
Thanks, but I couldn't read the source of the datepicker since it's
compressed (I couldn't find the readable one in the host site).
Other solution might be using jquery.ui.draggable, but it's not so
light as to just make it draggable.
So, for now, I leave the anytime.js unmodified.

Kenji

On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Great!

 It nice that you take care of feedback... Don't worry about IE ;-)

 For moving, I think it a most have feature since the actual datepicker has
 it...

 What has to be done to make it available?

 Maybe the actual datepicker could be of some help to figure out how to make
 it moves...

 Thank Kenji

 Richard







 On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp wrote:
  Hi Richard,

  thank you for your feedback.

  It works great except that it seems to conflict with jQuery UI tabs and
  dialog...
  I fixed it (tested Chrome, FF, IE).
  See:http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
  (The anytime css should precede the jquery ui css)

  It no show up when my form are called with LOAD()
  I also fixed it.
  See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
  (I implemented a dynamic loader for js and css)

  Note however, since IE(=8?) could not put a dynamic css before loaded
  css,
  the conflict for jquery-ui still occurs for IE(=8?).
  see:
 http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load

  there is no way we can move it like the actual datepicker...
  This might be difficult to implement.

  Regards,
  Kenji

  On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com wrote:
   Hello,

   I just try anydate plugin... It works great except that it seems to
  conflict
   with jQuery UI tabs and dialog... It no show up when my form are called
  with
   LOAD(), so it also could it be conflicting with LOAD() of web2py.  Also
   there is no way we can move it like the actual datepicker...

   Richard

   On Tue, Aug 30, 2011 at 9:47 PM, kenji4569 hos...@s-cubism.jp wrote:
 I still see the same
 problem with 'Format', 'Font size' and 'Font' dropdown selections.
Sorry, I addressed the issue, and I think it would be fixed.
The cause for this is null entry for the text area.

Kenji

On 8月31日, 午前12:14, tomt tom_tren...@yahoo.com wrote:
 Hi,

 I tried your update, and I can now successfully modify text color and
 background color with IE7 and IE8. Unfortunately I still see the same
 problem with 'Format', 'Font size' and 'Font' dropdown selections.
 That is,
 the dropdown selection is erased before I can select an option.

 - Tom

 On Aug 30, 4:05 am, kenji4569 hos...@s-cubism.jp wrote:

  Hi, Tom.

  Thank you for reporting the bug.
  I just fixed it.
  Please check:http://dev.s-cubism.com/plugin_elrte_widget
  (you might need to clear the browser cache)

  [modification detail]
  I upgraded theelrteversion from 1.2 to 1.3.
  Additionally, since the version 1.3 had a serious IE problem, I
  applied some patches for it.
  I also slightly modified the plugin css not to conflict with the
  site
  css.
  (https://github.com/kenji4569/sqlabs/issues/39)

  Kenji

  On 8月30日, 午前11:38, tomt tom_tren...@yahoo.com wrote:

   Hi,

   Thanks for the great contributions to web2py.  I'm looking
  forward to
   trying them.

   I implemented web2py.plugin.elrte_widget.w2p and while it worked
great
   with firefox, I had some problems using internet explorer.
   Specifically, the dropdown boxes, such as the colorpicker,
  disappear
   before I can make a selection.

   This happened with IE7 and IE8.  I used the same IE browser to go
  to
   thehttp://elrte.org/demoandtheproblemdidn'texist there. Does
   anyone else see this problem?

   - Tom- Hide quoted text -

  - Show quoted text -


[web2py] Re: Published my collection of plugins

2011-09-04 Thread kenji4569
I was wondering if solidtables has a formatting option that will
 display a text field without escaping the html tags?
You can do this by using the represent feature of Field, as in
SQLTABLE:
db.status_info.description.represent = lambda v: XML(v)


On 9月4日, 午後12:38, tomt tom_tren...@yahoo.com wrote:
 Kenji,

 Thanks for contributing your great plugins.  I've started to use
 solidtable and solidform and I expect that I will use them a lot
 because they really improve the look and usability of the web2py apps
 I've been working on.

 I was wondering if solidtables has a formatting option that will
 display a text field without escaping the html tags?

 I'm currently doing this by building tables in a view and using:
 td{{=XML(row.status_info.description)}}/td

 The following is an example of the html I want to display: pFollow
 span style=color: rgb(255, 0, 0);procedure/span in ustation/
 u notes/p

 This works ok, but I just thought that if solidtable already has the
 ability to do this, I'd try it instead.

 Thanks - Tom


[web2py] Re: Published my collection of plugins

2011-09-04 Thread kenji4569
the elRTE WYSIWYG Widget does not allow to import a file other than an
image.
It would be nice to import for example a pdf or a doc file
Thanks for your proposal.
I think it would be easy to implement it, because the image chooser
can be customized to anything.
I'll try to do this.

Kenji


On 9月4日, 午後6:02, António Ramos ramstei...@gmail.com wrote:
 Hello
 the elRTE WYSIWYG Widget does not allow to import a file other than an
 image.
 It would be nice to import for example a pdf or a doc file

 Thank you
 António

 2011/9/4 kenji4569 hos...@s-cubism.jp







  Maybe the actual datepicker could be of some help to figure out how to
  make it moves...
  Thanks, but I couldn't read the source of the datepicker since it's
  compressed (I couldn't find the readable one in the host site).
  Other solution might be using jquery.ui.draggable, but it's not so
  light as to just make it draggable.
  So, for now, I leave the anytime.js unmodified.

  Kenji

  On 9月1日, 午後10:53, Richard Vézina ml.richard.vez...@gmail.com wrote:
   Great!

   It nice that you take care of feedback... Don't worry about IE ;-)

   For moving, I think it a most have feature since the actual datepicker
  has
   it...

   What has to be done to make it available?

   Maybe the actual datepicker could be of some help to figure out how to
  make
   it moves...

   Thank Kenji

   Richard

   On Thu, Sep 1, 2011 at 6:35 AM, kenji4569 hos...@s-cubism.jp wrote:
Hi Richard,

thank you for your feedback.

It works great except that it seems to conflict with jQuery UI tabs
  and
dialog...
I fixed it (tested Chrome, FF, IE).
See:http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
(The anytime css should precede the jquery ui css)

It no show up when my form are called with LOAD()
I also fixed it.
See:http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
(I implemented a dynamic loader for js and css)

Note however, since IE(=8?) could not put a dynamic css before loaded
css,
the conflict for jquery-ui still occurs for IE(=8?).
see:
   http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load

there is no way we can move it like the actual datepicker...
This might be difficult to implement.

Regards,
Kenji

On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Hello,

 I just try anydate plugin... It works great except that it seems to
conflict
 with jQuery UI tabs and dialog... It no show up when my form are
  called
with
 LOAD(), so it also could it be conflicting with LOAD() of web2py.
   Also
 there is no way we can move it like the actual datepicker...

 Richard

 On Tue, Aug 30, 2011 at 9:47 PM, kenji4569 hos...@s-cubism.jp
  wrote:
   I still see the same
   problem with 'Format', 'Font size' and 'Font' dropdown
  selections.
  Sorry, I addressed the issue, and I think it would be fixed.
  The cause for this is null entry for the text area.

  Kenji

  On 8月31日, 午前12:14, tomt tom_tren...@yahoo.com wrote:
   Hi,

   I tried your update, and I can now successfully modify text color
  and
   background color with IE7 and IE8. Unfortunately I still see the
  same
   problem with 'Format', 'Font size' and 'Font' dropdown
  selections.
   That is,
   the dropdown selection is erased before I can select an option.

   - Tom

   On Aug 30, 4:05 am, kenji4569 hos...@s-cubism.jp wrote:

Hi, Tom.

Thank you for reporting the bug.
I just fixed it.
Please check:http://dev.s-cubism.com/plugin_elrte_widget
(you might need to clear the browser cache)

[modification detail]
I upgraded theelrteversion from 1.2 to 1.3.
Additionally, since the version 1.3 had a serious IE problem, I
applied some patches for it.
I also slightly modified the plugin css not to conflict with
  the
site
css.
(https://github.com/kenji4569/sqlabs/issues/39)

Kenji

On 8月30日, 午前11:38, tomt tom_tren...@yahoo.com wrote:

 Hi,

 Thanks for the great contributions to web2py.  I'm looking
forward to
 trying them.

 I implemented web2py.plugin.elrte_widget.w2p and while it
  worked
  great
 with firefox, I had some problems using internet explorer.
 Specifically, the dropdown boxes, such as the colorpicker,
disappear
 before I can make a selection.

 This happened with IE7 and IE8.  I used the same IE browser
  to go
to
 thehttp://elrte.org/demoandtheproblemdidn'texistthere. Does
 anyone else see this problem?

 - Tom- Hide quoted text -

- Show quoted text -


[web2py] Re: Published my collection of plugins

2011-09-01 Thread kenji4569
Hi Richard,

thank you for your feedback.

It works great except that it seems to conflict with jQuery UI tabs and 
dialog...
I fixed it (tested Chrome, FF, IE).
See: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
(The anytime css should precede the jquery ui css)

It no show up when my form are called with LOAD()
I also fixed it.
See: http://dev.s-cubism.com/plugin_anytime_widget/test/_/load
(I implemented a dynamic loader for js and css)

Note however, since IE(=8?) could not put a dynamic css before loaded
css,
the conflict for jquery-ui still occurs for IE(=8?).
see: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui/load

there is no way we can move it like the actual datepicker...
This might be difficult to implement.

Regards,
Kenji


On 9月1日, 午前4:25, Richard Vézina ml.richard.vez...@gmail.com wrote:
 Hello,

 I just try anydate plugin... It works great except that it seems to conflict
 with jQuery UI tabs and dialog... It no show up when my form are called with
 LOAD(), so it also could it be conflicting with LOAD() of web2py.  Also
 there is no way we can move it like the actual datepicker...

 Richard







 On Tue, Aug 30, 2011 at 9:47 PM, kenji4569 hos...@s-cubism.jp wrote:
   I still see the same
   problem with 'Format', 'Font size' and 'Font' dropdown selections.
  Sorry, I addressed the issue, and I think it would be fixed.
  The cause for this is null entry for the text area.

  Kenji

  On 8月31日, 午前12:14, tomt tom_tren...@yahoo.com wrote:
   Hi,

   I tried your update, and I can now successfully modify text color and
   background color with IE7 and IE8. Unfortunately I still see the same
   problem with 'Format', 'Font size' and 'Font' dropdown selections.
   That is,
   the dropdown selection is erased before I can select an option.

   - Tom

   On Aug 30, 4:05 am, kenji4569 hos...@s-cubism.jp wrote:

Hi, Tom.

Thank you for reporting the bug.
I just fixed it.
Please check:http://dev.s-cubism.com/plugin_elrte_widget
(you might need to clear the browser cache)

[modification detail]
I upgraded theelrteversion from 1.2 to 1.3.
Additionally, since the version 1.3 had a serious IE problem, I
applied some patches for it.
I also slightly modified the plugin css not to conflict with the site
css.
(https://github.com/kenji4569/sqlabs/issues/39)

Kenji

On 8月30日, 午前11:38, tomt tom_tren...@yahoo.com wrote:

 Hi,

 Thanks for the great contributions to web2py.  I'm looking forward to
 trying them.

 I implemented web2py.plugin.elrte_widget.w2p and while it worked
  great
 with firefox, I had some problems using internet explorer.
 Specifically, the dropdown boxes, such as the colorpicker, disappear
 before I can make a selection.

 This happened with IE7 and IE8.  I used the same IE browser to go to
 thehttp://elrte.org/demoandtheproblemdidn't exist there. Does
 anyone else see this problem?

 - Tom- Hide quoted text -

- Show quoted text -


[web2py] Re: Published my collection of plugins

2011-08-30 Thread kenji4569
Hi, Tom.

Thank you for reporting the bug.
I just fixed it.
Please check: http://dev.s-cubism.com/plugin_elrte_widget
(you might need to clear the browser cache)

[modification detail]
I upgraded the elrte version from 1.2 to 1.3.
Additionally, since the version 1.3 had a serious IE problem, I
applied some patches for it.
I also slightly modified the plugin css not to conflict with the site
css.
(https://github.com/kenji4569/sqlabs/issues/39)

Kenji

On 8月30日, 午前11:38, tomt tom_tren...@yahoo.com wrote:
 Hi,

 Thanks for the great contributions to web2py.  I'm looking forward to
 trying them.

 I implemented web2py.plugin.elrte_widget.w2p and while it worked great
 with firefox, I had some problems using internet explorer.
 Specifically, the dropdown boxes, such as the colorpicker, disappear
 before I can make a selection.

 This happened with IE7 and IE8.  I used the same IE browser to go to
 thehttp://elrte.org/demoand the problem didn't exist there. Does
 anyone else see this problem?

 - Tom


[web2py] Re: Published my collection of plugins

2011-08-30 Thread kenji4569
 I still see the same
 problem with 'Format', 'Font size' and 'Font' dropdown selections.
Sorry, I addressed the issue, and I think it would be fixed.
The cause for this is null entry for the text area.

Kenji


On 8月31日, 午前12:14, tomt tom_tren...@yahoo.com wrote:
 Hi,

 I tried your update, and I can now successfully modify text color and
 background color with IE7 and IE8. Unfortunately I still see the same
 problem with 'Format', 'Font size' and 'Font' dropdown selections.
 That is,
 the dropdown selection is erased before I can select an option.

 - Tom

 On Aug 30, 4:05 am, kenji4569 hos...@s-cubism.jp wrote:







  Hi, Tom.

  Thank you for reporting the bug.
  I just fixed it.
  Please check:http://dev.s-cubism.com/plugin_elrte_widget
  (you might need to clear the browser cache)

  [modification detail]
  I upgraded theelrteversion from 1.2 to 1.3.
  Additionally, since the version 1.3 had a serious IE problem, I
  applied some patches for it.
  I also slightly modified the plugin css not to conflict with the site
  css.
  (https://github.com/kenji4569/sqlabs/issues/39)

  Kenji

  On 8月30日, 午前11:38, tomt tom_tren...@yahoo.com wrote:

   Hi,

   Thanks for the great contributions to web2py.  I'm looking forward to
   trying them.

   I implemented web2py.plugin.elrte_widget.w2p and while it worked great
   with firefox, I had some problems using internet explorer.
   Specifically, the dropdown boxes, such as the colorpicker, disappear
   before I can make a selection.

   This happened with IE7 and IE8.  I used the same IE browser to go to
   thehttp://elrte.org/demoandtheproblem didn't exist there. Does
   anyone else see this problem?

   - Tom- Hide quoted text -

  - Show quoted text -


[web2py] Re: Published my collection of plugins

2011-08-28 Thread kenji4569
I got some bug reports for the Solid Table, and fixed the bugs:

OrderbySelector fails when current_orderby is null
https://github.com/kenji4569/sqlabs/issues/34

solidtable fails when headers='labels'
https://github.com/kenji4569/sqlabs/issues/32

SOLID TABLE fails when columns=[[a,b],None,[c,d]]
https://github.com/kenji4569/sqlabs/issues/37

Thanks for reporting them.

On 8月28日, 午前2:27, kenji4569 hos...@s-cubism.jp wrote:
 Thank you all for your wonderful comments.

  Do you want to host and manage all plugins?

 Currently I doubt if I could commit this,
 though I want to contribute more as much as I could.

  I see you take time to make order in sqltable :O.
  Please subscribe to web2py-developers.

 I will subscribe to it.
 But first I need time to see how the development goes on.

 On 8月27日, 午後9:30, Bruno Rocha rochacbr...@gmail.com wrote:







  On Sat, Aug 27, 2011 at 8:01 AM, Martín Mulone 
  mulone.mar...@gmail.comwrote:

   Bruno extracolumns are in SQLTABLE.

  really?

  LOL.. never knew about it.


[web2py] Re: Published my collection of plugins

2011-08-27 Thread kenji4569
Thank you all for your wonderful comments.

 Do you want to host and manage all plugins?
Currently I doubt if I could commit this,
though I want to contribute more as much as I could.

 I see you take time to make order in sqltable :O.
 Please subscribe to web2py-developers.
I will subscribe to it.
But first I need time to see how the development goes on.

On 8月27日, 午後9:30, Bruno Rocha rochacbr...@gmail.com wrote:
 On Sat, Aug 27, 2011 at 8:01 AM, Martín Mulone mulone.mar...@gmail.comwrote:

  Bruno extracolumns are in SQLTABLE.

 really?

 LOL.. never knew about it.


[web2py] Published my collection of plugins

2011-08-26 Thread kenji4569
Hi, I've just published a collection of plugins which I'd created for
some web2py products (mainly cms sites) in my job:

The index page:
http://dev.s-cubism.com/web2py_plugins

The plugins are below:

[Form Widgets]
 Horizontal Radio Widget http://dev.s-cubism.com/plugin_hradio_widget
 Multiple Select Widget http://dev.s-cubism.com/plugin_multiselect_widget
 Suggest Widget http://dev.s-cubism.com/plugin_suggest_widget
 Lazy Options Widget http://dev.s-cubism.com/plugin_lazy_options_widget
 Anytime Widget http://dev.s-cubism.com/plugin_anytime_widget
 Color Widget http://dev.s-cubism.com/plugin_color_widget
 elRTE WYSIWYG Widget http://dev.s-cubism.com/plugin_elrte_widget
 Uploadify Widget http://dev.s-cubism.com/plugin_uploadify_widget

[Form Customize]
 Solid Form http://dev.s-cubism.com/plugin_solidform
 Not-Empty Marker http://dev.s-cubism.com/plugin_notemptymarker

[Table Customize]
 Solid Table http://dev.s-cubism.com/plugin_solidtable
 Pagenator http://dev.s-cubism.com/plugin_paginator
 Table Scope http://dev.s-cubism.com/plugin_tablescope
 Table Checkbox http://dev.s-cubism.com/plugin_tablecheckbox
 Table Permuter http://dev.s-cubism.com/plugin_tablepermuter

You can try demos, see souces, and download plugins (MIT Licence).
I'll appreciate your feedback and advises (especially for design
decisions).
I'll keep trying to create useful plugins and to improve them!


[web2py] Re: web2py japan - congratulations

2011-05-15 Thread kenji4569
Hi Massimo,

the site is recently developed by a member of web2py-japan, Nakagaki-
san. The book translation and any information of web2py are written
and published here, by members of web2py-japan. The translation is
still in progress, and will be feedbacked to you when finished. Thanks
for your mention :)

On 5月16日, 午前4:51, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Who did this? Congratulations!

 http://sites.google.com/site/web2pyjapan/book/01


[web2py] Re: web2py japan - congratulations

2011-05-15 Thread kenji4569
 why u didn't also put japanese translation language on web2py default?
To do so, we have to arrange the translation in markmin format, and
will do it when the translation finished.

On 5月16日, 午前10:43, Stifan Kristi steve.van.chris...@gmail.com wrote:
 hi, massimo,

 why u didn't also put japanese translation language on web2py default?
 it's just a suggestion.

 thanks







 On Mon, May 16, 2011 at 8:04 AM, kenji4569 hos...@s-cubism.jp wrote:
  Hi Massimo,

  the site is recently developed by a member of web2py-japan, Nakagaki-
  san. The book translation and any information of web2py are written
  and published here, by members of web2py-japan. The translation is
  still in progress, and will be feedbacked to you when finished. Thanks
  for your mention :)

  On 5月16日, 午前4:51, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:
   Who did this? Congratulations!

  http://sites.google.com/site/web2pyjapan/book/01


[web2py] Re: web2py 1.94.6

2011-03-30 Thread kenji4569
OK, thanks. Now, it passed brief tests of my project.

On 3月31日, 午前5:18, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 I think this is not fixed. Can you please check it in trunk. If not
 please open a googlecode issue

 On Mar 28, 4:51 am, kenji4569 hos...@s-cubism.jp wrote:







  The virtualfields functionality with join query dosen't work in 1.94.6
  while it works in 1.94.5, as follows:

   t1 = db.define_table('t1', Field('val', 'integer'))
   t2 = db.define_table('t2', Field('t1', db.t1), Field('val', 'integer'))
   class VirtualFields(object):

  ...         def val2(self):
  ...             return self.t2.val * 2
  ...

   t2.virtualfields.append(VirtualFields())
   t1_id = t1.insert(val=1)
   t2_id = t2.insert(t1=t1_id, val=2)
   record = db(t2.id==t2_id).select().first()
   assert(record.val2==4) #OK
   record = db(t1.val==1)(t2.id==t1.id).select().first()
   assert(record.t2.val2==4) #NG

  Failed example:
      assert(record.t2.val2==4) #NG
  Exception raised:
      ...
      KeyError: 'val2'

  I think it's a major bug,
  or is the API changed?

  On 3月28日, 午前6:24, Praneeth Bodduluri life...@gmail.com wrote:

   Hello Massimo,

   I can help maintain the PyPI uploading for every new revision.

   --
   Praneeth
   IRC: lifeeth

   On Sun, Mar 27, 2011 at 11:17 PM, Massimo Di Pierro

   massimo.dipie...@gmail.com wrote:
I can do it. Do you want to be in charge of it?

Massimo

On Mar 27, 2011, at 12:43 PM, Praneeth Bodduluri wrote:

python setup.py sdist upload


[web2py] Re: web2py 1.94.6

2011-03-28 Thread kenji4569
The virtualfields functionality with join query dosen't work in 1.94.6
while it works in 1.94.5, as follows:

 t1 = db.define_table('t1', Field('val', 'integer'))
 t2 = db.define_table('t2', Field('t1', db.t1), Field('val', 'integer'))
 class VirtualFields(object):
... def val2(self):
... return self.t2.val * 2
...
 t2.virtualfields.append(VirtualFields())
 t1_id = t1.insert(val=1)
 t2_id = t2.insert(t1=t1_id, val=2)
 record = db(t2.id==t2_id).select().first()
 assert(record.val2==4) #OK
 record = db(t1.val==1)(t2.id==t1.id).select().first()
 assert(record.t2.val2==4) #NG

Failed example:
assert(record.t2.val2==4) #NG
Exception raised:
...
KeyError: 'val2'

I think it's a major bug,
or is the API changed?

On 3月28日, 午前6:24, Praneeth Bodduluri life...@gmail.com wrote:
 Hello Massimo,

 I can help maintain the PyPI uploading for every new revision.

 --
 Praneeth
 IRC: lifeeth

 On Sun, Mar 27, 2011 at 11:17 PM, Massimo Di Pierro







 massimo.dipie...@gmail.com wrote:
  I can do it. Do you want to be in charge of it?

  Massimo

  On Mar 27, 2011, at 12:43 PM, Praneeth Bodduluri wrote:

  python setup.py sdist upload


[web2py] Re: web2py 1.94.6

2011-03-28 Thread kenji4569
Are you sure this exact code worked before?
Yes. I checked it again.
In fact, the issue just occurred when I upgraded from 1.94.5 to
1.94.6.

On 3月28日, 午後11:34, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Are you sure this exact code worked before?

 On Mar 28, 4:51 am, kenji4569 hos...@s-cubism.jp wrote:







  The virtualfields functionality with join query dosen't work in 1.94.6
  while it works in 1.94.5, as follows:

   t1 = db.define_table('t1', Field('val', 'integer'))
   t2 = db.define_table('t2', Field('t1', db.t1), Field('val', 'integer'))
   class VirtualFields(object):

  ...         def val2(self):
  ...             return self.t2.val * 2
  ...

   t2.virtualfields.append(VirtualFields())
   t1_id = t1.insert(val=1)
   t2_id = t2.insert(t1=t1_id, val=2)
   record = db(t2.id==t2_id).select().first()
   assert(record.val2==4) #OK
   record = db(t1.val==1)(t2.id==t1.id).select().first()
   assert(record.t2.val2==4) #NG

  Failed example:
      assert(record.t2.val2==4) #NG
  Exception raised:
      ...
      KeyError: 'val2'

  I think it's a major bug,
  or is the API changed?

  On 3月28日, 午前6:24, Praneeth Bodduluri life...@gmail.com wrote:

   Hello Massimo,

   I can help maintain the PyPI uploading for every new revision.

   --
   Praneeth
   IRC: lifeeth

   On Sun, Mar 27, 2011 at 11:17 PM, Massimo Di Pierro

   massimo.dipie...@gmail.com wrote:
I can do it. Do you want to be in charge of it?

Massimo

On Mar 27, 2011, at 12:43 PM, Praneeth Bodduluri wrote:

python setup.py sdist upload


[web2py] Re: 1.94.5 is OUT

2011-03-19 Thread kenji4569
The problem is now resolved.
Thank you for your quick response.

Kenji

On 3月19日, 午前5:28, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 I apologize, the 1.94.1-4 has had problems with sessions because of
 recent major refactoring. The latest reported here:

 http://groups.google.com/group/web2py/msg/59f3716c4dcbdf47

 Jonathan figured out the problem and submitted a patch. It passes my
 tests.
 Please check it and hopefully the issue is resolved.
 If you still have problems with sessions, let us know asap.

 Massimo


[web2py] Re: web2py 1.94.1 is OUT

2011-03-18 Thread kenji4569
I have had trouble with 1.94.4 as follows:

- Start the develop server of the web2py
- Browse the admin application site
- Log-in the site
- Click to a link of my application site (which uses a database
session)
- browse the admin application site again
- Then, cannot log-in the site because somehow the session for the
admin site become empty, and never can log-in until restart the
develop server.

Please help.

On 3月18日, 午後5:36, José L. jredr...@gmail.com wrote:
 Debian packages for 1.94.4 are already available where 
 usual:http://people.debian.org/~jredrejo/web2py/lenny/(for python2.5)
 orhttp://people.debian.org/~jredrejo/web2py/squeeze/(for python  2.5)

 Regards.


[web2py] Re: web2py 1.94.1 is OUT

2011-03-18 Thread kenji4569
I have had trouble with 1.94.4 as follows:
- Start the develop server of the web2py
- Browse the admin application site
- Log-in the site
- Click a link to my application site (which uses a database
session)
- browse the admin application site again
- Then, cannot log-in the site because somehow the session for the
admin site become empty, and never can log-in until restart the
develop server.
Please help.

On 3月18日, 午後5:36, José L. jredr...@gmail.com wrote:
 Debian packages for 1.94.4 are already available where 
 usual:http://people.debian.org/~jredrejo/web2py/lenny/(for python2.5)
 orhttp://people.debian.org/~jredrejo/web2py/squeeze/(for python  2.5)

 Regards.


[web2py] Re: web2py 1.94.1 is OUT

2011-03-18 Thread kenji4569
I just upgraded from 1.91.6 to 1.94.4 through the admin interface. The
problem is still reproducible when deleting all session files. But,
the problem does not occur when I comment out a session.connect
method in my application, indicating that the database session is
somewhat related. I use CentOS 5.4 with Python 2.6.

On 3月18日, 午後9:23, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Are other people having the same problem? Are you sure it is with
 1.94.4. Can you try delete all sessions files?

 On Mar 18, 5:59 am, kenji4569 hos...@s-cubism.jp wrote:







  I have had trouble with 1.94.4 as follows:
  - Start the develop server of the web2py
  - Browse the admin application site
  - Log-in the site
  - Click a link to my application site (which uses a database
  session)
  - browse the admin application site again
  - Then, cannot log-in the site because somehow the session for the
  admin site become empty, and never can log-in until restart the
  develop server.
  Please help.

  On 3月18日, 午後5:36, José L. jredr...@gmail.com wrote:

   Debian packages for 1.94.4 are already available where 
   usual:http://people.debian.org/~jredrejo/web2py/lenny/(forpython2.5)
   orhttp://people.debian.org/~jredrejo/web2py/squeeze/(forpython 2.5)

   Regards.


[web2py] Re: web2py 1.94.1 is OUT

2011-03-18 Thread kenji4569
session.connect(request, response, masterapp=masterapp, db=db)
where masterapp is my application name, and use the method in a module
file.

On 3月19日, 午前12:57, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Can you show the complete session.connect(...) statement?

 On Mar 18, 10:53 am, kenji4569 hos...@s-cubism.jp wrote:







  I just upgraded from 1.91.6 to 1.94.4 through the admin interface. The
  problem is still reproducible when deleting all session files. But,
  the problem does not occur when I comment out a session.connect
  method in my application, indicating that the database session is
  somewhat related. I use CentOS 5.4 with Python 2.6.

  On 3月18日, 午後9:23, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:

   Are other people having the same problem? Are you sure it is with
   1.94.4. Can you try delete all sessions files?

   On Mar 18, 5:59 am, kenji4569 hos...@s-cubism.jp wrote:

I have had trouble with 1.94.4 as follows:
- Start the develop server of the web2py
- Browse the admin application site
- Log-in the site
- Click a link to my application site (which uses a database
session)
- browse the admin application site again
- Then, cannot log-in the site because somehow the session for the
admin site become empty, and never can log-in until restart the
develop server.
Please help.

On 3月18日, 午後5:36, José L. jredr...@gmail.com wrote:

 Debian packages for 1.94.4 are already available where 
 usual:http://people.debian.org/~jredrejo/web2py/lenny/(forpython2.5)
 orhttp://people.debian.org/~jredrejo/web2py/squeeze/(forpython 2.5)

 Regards.


[web2py] Re: web2py 1.94.1 is OUT

2011-03-18 Thread kenji4569
 If it's in a module (vs model) file, where are you invoking it from?
I define it in a helper function of a module file, and invoke the
function in a model file.

On 3月19日, 午前1:13, Jonathan Lundell jlund...@pobox.com wrote:
 On Mar 18, 2011, at 9:01 AM, kenji4569 wrote:



  session.connect(request, response, masterapp=masterapp, db=db)
  where masterapp is my application name, and use the method in a module
  file.

 If it's in a module (vs model) file, where are you invoking it from?









  On 3月19日, 午前12:57, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:
  Can you show the complete session.connect(...) statement?

  On Mar 18, 10:53 am, kenji4569 hos...@s-cubism.jp wrote:

  I just upgraded from 1.91.6 to 1.94.4 through the admin interface. The
  problem is still reproducible when deleting all session files. But,
  the problem does not occur when I comment out a session.connect
  method in my application, indicating that the database session is
  somewhat related. I use CentOS 5.4 with Python 2.6.

  On 3月18日, 午後9:23, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:

  Are other people having the same problem? Are you sure it is with
  1.94.4. Can you try delete all sessions files?

  On Mar 18, 5:59 am, kenji4569 hos...@s-cubism.jp wrote:

  I have had trouble with 1.94.4 as follows:
  - Start the develop server of the web2py
  - Browse the admin application site
  - Log-in the site
  - Click a link to my application site (which uses a database
  session)
  - browse the admin application site again
  - Then, cannot log-in the site because somehow the session for the
  admin site become empty, and never can log-in until restart the
  develop server.
  Please help.

  On 3月18日, 午後5:36, José L. jredr...@gmail.com wrote:

  Debian packages for 1.94.4 are already available where 
  usual:http://people.debian.org/~jredrejo/web2py/lenny/(forpython2.5)
  orhttp://people.debian.org/~jredrejo/web2py/squeeze/(forpython 2.5)

  Regards.


[web2py] Re: DAL new syntax RFC

2011-03-07 Thread kenji4569
Other alternatives might be:

Field('name', **Field.readonly)?
Field('name').readonly()?

though I appreciate explicit is better than implicit.

On 3月6日, 午前9:49, Michele Comitini michele.comit...@gmail.com wrote:
 +1

 2011/3/6 Thadeus Burgess thade...@thadeusb.com:







  Explicit is better than implicit. Typing is cheap. Design is the hardest
  part of development.

  --
  Thadeus

  On Sat, Mar 5, 2011 at 2:52 PM, Vidul Petrov vidul.r...@gmail.com wrote:

  I agree with Stefaan.

  However the ':' before a variable name notation looks like the Ruby
  symbols whose only purpose was improved performance (lightweight
  strings) but lead inevitably to confusion (IMHO).

  On Mar 4, 5:55 pm, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:
   There are some new features in trunk:

   1)

   I got tired of writing default='value',readable=False,writable=False
   etc.

   So:

   Field(':name') is the same as
   Field('name',readable=False,writable=False)
   Field('.name') is the same as
   Field('name',readable=True,writable=False)
   Field('name=value') is the same as Field('name',default='value')

   and combinations:

   Field(':name=value') is the same as
   Field('name',default='value',readable=True,writable=False)

   notice

   Field('name=') is the same as Field('name',default='')

   2)

   db(db.table).select((db.table.field.length()+5).sum())

   note operators length(), +5, sum() can be combined in more ways than
   before.


[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread kenji4569
What about this?

(modules/mymodule.py)

def main(environment):
environment = Storage(environment)
cache = environment.cache

@cache('xxx', time_expire=1, cache_model=cache.ram)
def xxx():
   return 'xxx'

return Storage(locals())

(in models or controllers)
local_import('mymodule').main(globals()).xxx()

Just an idea, and I don't know it's appropriate or not.

On 3月1日, 午前11:09, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 Jonathan and I have a plan to make this easy but it will not be in
 until 1.93 or 1.94.

 On Feb 28, 3:12 pm, pbreit pbreitenb...@gmail.com wrote:

  Yeah, I'm having a hard time figuring out when and how to put stuff in
  modules. And what the implications are of putting functions in /models.


[web2py] Re: Can't deal with MemcachedKeyLengthError in caching selects

2011-02-01 Thread kenji4569
Thanks! That's the right way. It worked.

On 2月1日, 午後11:37, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 I think have a solution in trunk. You will not need to specify length
 and should work.

 On Jan 31, 8:40 pm, kenji4569 hos...@s-cubism.jp wrote:

  When I run the following code:

  db(db.xxx.id==1).select(cache=(cache.memcache, 5))

  I got MemcachedKeyLengthError: Key length is  250.

  Since xxx table has many fields, the sql used for the key readily
  reached the limit.

  I just want to specify the cache key, but I couldn't, given the
  dal.py:

  (cache_model, time_expire) = attributes['cache']
  del attributes['cache']
  key = self.uri + '/' + sql
  rows = cache_model(key, lambda: response(sql), time_expire)

  Please help.
  Thanks in advance, Kenji




[web2py] Can't deal with MemcachedKeyLengthError in caching selects

2011-01-31 Thread kenji4569
When I run the following code:

db(db.xxx.id==1).select(cache=(cache.memcache, 5))

I got MemcachedKeyLengthError: Key length is  250.

Since xxx table has many fields, the sql used for the key readily
reached the limit.

I just want to specify the cache key, but I couldn't, given the
dal.py:

(cache_model, time_expire) = attributes['cache']
del attributes['cache']
key = self.uri + '/' + sql
rows = cache_model(key, lambda: response(sql), time_expire)

Please help.
Thanks in advance, Kenji


[web2py] Re: What is web2py best practice basis for modular site development?

2011-01-28 Thread kenji4569
I am developing a website with many features required my client, using
web2py.
So, I'd also like to see the best practice for modular site
development.

In my development, I made two applications for a website,
one is for front, and the other is for admin site.
And I think it worked well,
though obviously it required much effort for developing multi-
application.
The choice would depend on the degree of loose coupling required in
each system.
Anyway, components and plugins are still great ideas,
which I found helpful for writing modular codes in web programming.

Besides, it would be important to
minimize the code in models (http://web2py.com/book/default/chapter/
11)
for single large application.
Not only because of performance issue, but also because of clean
global scope.

In this regard, current published plugins are largely written in
models directory,
while I found few plugins written primarily in modules directory.
I think writing in models is much easier,
but would have some deficits for developping a modular large
application.
But it would also depend on ones needs.
Personally, I follow the coding style as in gluon.tools.Auth, Crud,
and Mail,
with writing modules directory.

Kind regards,
Kenji

On 1月28日, 午後3:59, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
 My gut tells one application, having applications share layout, database
 and all is not piece of cake.

 But I guess it depends on the application, but I would make it as one
 application.

 Kenneth







  Dear web2py users,

  I am developing a website that will have many features, some of which
  are not yet specified by my client. Therefore and for other reasons, I
  would like to develop it in a modular fashion.

  Should I base my website on a web2py site with a single application,
  with modularity achieved using Components and Plugins?

  Would it be better and/or easier to have a multi-application web2py
  site with a masterapp and CAS, along with shared layout, database,
  session, etc.?

  Do any of you have any other suggestions for web2py site development
  modularity best practices?

  Thanks for your help in advance.

  Love and peace,

  Joe


[web2py] Re: What is web2py best practice basis for modular site development?

2011-01-28 Thread kenji4569
I am developing a website with many features required my client, using
web2py. So, I'd also like to see the best practice for modular site
development.

In my development, I made two applications for a website, one is for
front, and the other is for admin site. And I think it worked well,
though obviously it required much effort for developing multi-
application. The choice would depend on the degree of loose coupling
required in each system. Anyway, components and plugins are great
ideas, which I found helpful for writing modular codes in web
programming.

Besides, it would be important to minimize the code in
models (http://web2py.com/book/default/chapter/11) for single large
application. Not only because of performance issue, but also because
of clean global scope.

In this regard, current published plugins are largely written in
models directory, while I found few plugins written primarily in
modules directory. I think writing in models is much easier, but would
have some deficits for developping a modular large application.
However it would also depend on ones needs. Personally, I follow the
coding style as in gluon.tools.Auth, Crud, and Mail, with writing
modules directory.

Kind regards,
Kenji

On 1月28日, 午後3:59, Kenneth Lundström kenneth.t.lundst...@gmail.com
wrote:
 My gut tells one application, having applications share layout, database
 and all is not piece of cake.

 But I guess it depends on the application, but I would make it as one
 application.

 Kenneth







  Dear web2py users,

  I am developing a website that will have many features, some of which
  are not yet specified by my client. Therefore and for other reasons, I
  would like to develop it in a modular fashion.

  Should I base my website on a web2py site with a single application,
  with modularity achieved using Components and Plugins?

  Would it be better and/or easier to have a multi-application web2py
  site with a masterapp and CAS, along with shared layout, database,
  session, etc.?

  Do any of you have any other suggestions for web2py site development
  modularity best practices?

  Thanks for your help in advance.

  Love and peace,

  Joe


[web2py] Re: upload widgets problem with nullable compound validators

2011-01-17 Thread kenji4569
Thanks for your support! Maybe the adopted one is much consistent.

On 1月18日, 午前1:21, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 IS_NULL_OR([IS_XXX(..), IS_YYY(..), ..])

 in trunk now. Good suggestion although I think an internal refactoring
 is in order.

 On Jan 16, 10:57 pm, kenji4569 hos...@s-cubism.jp wrote:







  I ended up with making a custom validator IS_ALL for the problem:

  IS_NULL_OR(IS_ALL([IS_XXX(..), IS_YYY(..), ..])

  and it works.

  The alternatives could be to permit the follwoing interfaces,
  which need patches though:

  IS_NULL_OR([IS_XXX(..), IS_YYY(..), ..])

  or

  [IS_NULL_OR(IS_XXX(..)), IS_NULL_OR(IS_YYY(..)), ..]
  (the first one)

  What do you think?

  Thanks in advance,
  Kenji

  On 1月12日, 午後10:57, Massimo Di Pierro massimo.dipie...@gmail.com
  wrote:

   good catch. Let me think about this...

   On Jan 12, 1:12 am, kenji4569 hos...@s-cubism.jp wrote:

I applied the follwing validators for upload fields in version 1.91.6:

requires = [
    IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')),
    IS_NULL_OR(IS_LENGTH(1048576, 1024)),
]

Everything was fine until I used a SQLFORM object with an upload
keyword for editing.

Then, a delete checkbox of an upload widget falsely disappeared which
should be displayed with a link to the uploaded file.

This is the result of the code in UploadWidget class of gluon/
sqlhtml.py:

if requires == [] or isinstance(requires, IS_EMPTY_OR):
    inp = DIV(, ...,
                     UploadWidget.ID_DELETE_SUFFIX),
                     ...)

And, the next patch would tentatively fix the problem:

if (requires == [] or isinstance(requires, IS_EMPTY_OR) or
    (isinstance(requires, (list, tuple)) and
     reduce(lambda a,b:ab, [isinstance(r, IS_EMPTY_OR) for r in
requires]))):
    ...

But, I am not sure if the above patch is smart.
Is there any way to implement such validation without patches nor
custom validators?


[web2py] Re: upload widgets problem with nullable compound validators

2011-01-16 Thread kenji4569
I ended up with making a custom validator IS_ALL for the problem:

IS_NULL_OR(IS_ALL([IS_XXX(..), IS_YYY(..), ..])

and it works.

The alternatives could be to permit the follwoing interfaces,
which need patches though:

IS_NULL_OR([IS_XXX(..), IS_YYY(..), ..])

or

[IS_NULL_OR(IS_XXX(..)), IS_NULL_OR(IS_YYY(..)), ..]
(the first one)

What do you think?

Thanks in advance,
Kenji


On 1月12日, 午後10:57, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
 good catch. Let me think about this...

 On Jan 12, 1:12 am, kenji4569 hos...@s-cubism.jp wrote:







  I applied the follwing validators for upload fields in version 1.91.6:

  requires = [
      IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')),
      IS_NULL_OR(IS_LENGTH(1048576, 1024)),
  ]

  Everything was fine until I used a SQLFORM object with an upload
  keyword for editing.

  Then, a delete checkbox of an upload widget falsely disappeared which
  should be displayed with a link to the uploaded file.

  This is the result of the code in UploadWidget class of gluon/
  sqlhtml.py:

  if requires == [] or isinstance(requires, IS_EMPTY_OR):
      inp = DIV(, ...,
                       UploadWidget.ID_DELETE_SUFFIX),
                       ...)

  And, the next patch would tentatively fix the problem:

  if (requires == [] or isinstance(requires, IS_EMPTY_OR) or
      (isinstance(requires, (list, tuple)) and
       reduce(lambda a,b:ab, [isinstance(r, IS_EMPTY_OR) for r in
  requires]))):
      ...

  But, I am not sure if the above patch is smart.
  Is there any way to implement such validation without patches nor
  custom validators?


[web2py] upload widgets problem with nullable compound validators

2011-01-12 Thread kenji4569
I applied the follwing validators for upload fields in version 1.91.6:

requires = [
IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')),
IS_NULL_OR(IS_LENGTH(1048576, 1024)),
]

Everything was fine until I used a SQLFORM object with an upload
keyword for editing.

Then, a delete checkbox of an upload widget falsely disappeared which
should be displayed with a link to the uploaded file.

This is the result of the code in UploadWidget class of gluon/
sqlhtml.py:

if requires == [] or isinstance(requires, IS_EMPTY_OR):
inp = DIV(, ...,
 UploadWidget.ID_DELETE_SUFFIX),
 ...)

And, the next patch would tentatively fix the problem:

if (requires == [] or isinstance(requires, IS_EMPTY_OR) or
(isinstance(requires, (list, tuple)) and
 reduce(lambda a,b:ab, [isinstance(r, IS_EMPTY_OR) for r in
requires]))):
...

But, I am not sure if the above patch is smart.
Is there any way to implement such validation without patches nor
custom validators?