[web2py] Re: Grid export csv

2016-08-04 Thread Kostas M
As you said, it works again now, by setting: entity_quoting=False Thanks Niphlod! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this

[web2py] Re: Grid export csv

2016-08-01 Thread Kostas M
I have the same problem with the CSV, HTML, TSV export buttons. The Ticket for the CSV is pasted below. The problem at least with the csv export button seems to be with the REGEX_TABLE_DOT_FIELD. Normally, this constant is defined in regex.py as: REGEX_TABLE_DOT_FIELD =

[web2py] Re: web2py Complete Reference Manual

2015-04-03 Thread Kostas M
+1 By the way, is there a time frame for the 6th edition? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are

[web2py] Re: Web2py Rocks ... Again :)

2014-07-04 Thread Kostas M
+1 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] wiki_page.render problem after update to 2.6.4

2013-10-01 Thread Kostas M
I have this function in my controller: def help(): return auth.wiki(render='markmin',menu_groups=['wiki_editor'],manage_permissions =True) and I have created some wiki pages. After updating to 2.6.4 (from 2.5.1), I am getting this Ticket. How it could be fixed?? Error ticket for myapp

[web2py] Re: wiki_page.render problem after update to 2.6.4

2013-10-01 Thread Kostas M
Ok I sorted it out: A new column has been added at the wiki_page table, and so *migrate *should be set to *True*, at least at the first time after the upgrade as to get DAL to change the table schema... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Restful Services Book

2013-09-03 Thread Kostas M
According to: http://web2py.com/books/default/chapter/29/10/services#Restful-Web-Services, for the given controller api() the following example should be working: $ curl -d name=Tim http://127.0.0.1:8000/myapp/default/api/friend.json {errors: {}, id: 1} 1. The first line I think it

[web2py] Re: How to limit record readability to only auth_user creator?

2013-08-05 Thread Kostas M
This grid indicates that db.auth_user has a 'created_by' column. Is this your case? Anyway, trying your code at a different table having a 'created_by' column worked fine to me (buttons Edit and Delete are there). On Sunday, August 4, 2013 5:17:40 AM UTC+1, Alex Glaros wrote: This looks

[web2py] Re: impersonate any user

2013-06-17 Thread Kostas M
Just for the record, these two issues have been fixed at the latest revision. http://code.google.com/p/web2py/issues/detail?id=1530 http://code.google.com/p/web2py/issues/detail?id=1539 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To

[web2py] Re: impersonate any user

2013-04-11 Thread Kostas M
of code: *id, time_stamp, client_ip, user_id, origin, description* 84, 2013-04-11 12:26:41, 127.0.0.1, 9, auth, User 9 Logged-in 85, 2013-04-11 12:27:10, 127.0.0.1, 7, auth, User 9 is impersonating 7 On Wednesday, April 10, 2013 5:07:54 PM UTC+1, Kostas M wrote: Is the reversion back

[web2py] Re: impersonate any user

2013-04-10 Thread Kostas M
Is the reversion back to the initial user working properly? I can impersonate a user, entering a user id in the http://.../user/impersonate form, but when I go back to that form, and entering 0 , although it seems momentarily to change the user name greeting in the upper right of the app, if I

[web2py] Edit only specific fields from a Table

2013-03-26 Thread Kostas M
I have extended the auth_user table with an extra field: auth.settings.extra_fields['auth_user']=[ Field('isactive','boolean', default =True, readable=False, writable= False),

[web2py] Re: web2py appadmin bad to use,is there appadmin easy to use? linke the django admin

2013-03-14 Thread Kostas M
I have found web2admin very useful, especially looking at the way actions are implemented in the first column of the table grid. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from

[web2py] Re: smartgrid selectable comments

2013-02-26 Thread Kostas M
Niphlod thank you very much for your reply. I implemented the 2nd option you mentioned, using jquery to add a textarea in the form tags. In the controller, I use the request.vars.textareaname to retrieve the contents of the textarea and then I insert them into the proper table. Just a thought:

[web2py] smartgrid selectable comments

2013-02-22 Thread Kostas M
I have implemented an SQLFORM.smartgrid with a selectable lambda function for handling the rows the user has selected. The proper action for the selected rows, is again selected by the user through an 'actions' pulldown menu on the first column of the table's header. What I would like next, is

[web2py] Uploaded files, and Cascade delete

2013-01-30 Thread Kostas M
It seems that cascade deletion of uploaded files works fine only if there is no definition of 'uploadfolder'. At db.py db.define_table('person', Field('name', requires=IS_NOT_EMPTY(), required=True), Field('nickname', 'string', required=True ), format = '%(name)s' ) def

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-16 Thread Kostas M
OK, thanks, I think I have cleared up now how it goes. --

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-15 Thread Kostas M
OK fine, then why, in continuation of the above example, def test(): grid = SQLFORM.smartgrid(db.person, linked_tables=['dog'], ondelete=dict ( dog=ondelete_test )) return dict(grid=grid) def ondelete_test(table_involved, id_of_the_deleted_record): print table_involved print

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Kostas M
I still have problems with the SQLFORM.smartgrid callbacks. I don't understand what is the correct usage of these functions. There are many different conflicting examples in the wiki. I define my ondelete callback: ondelete=dict( samples=my_sample_delete ) and I define the function: def

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Kostas M
What I have found out about not firing at all is that in SQLFORM.smartgrid, ondelete and oncreate callbacks should not be dictionaries! Although the book says: All the arguments but the table, args, linked_table and user_signatures can be dictionaries ..'', and in my case e.g:

[web2py] DAL _after_delete vs _before_delete

2013-01-14 Thread Kostas M
According to the book, in the DAL chapter, subtitle: 'before and after callbacks', we can use: db.person._before_delete.append(lambda s: pprint(s)) db.person._after_delete.append(lambda s: pprint(s)) where: s is the Set object used for update or delete. However, def person_before_delete(s):

[web2py] SQLFORM.smartgrid create callback

2013-01-14 Thread Kostas M
I have a hard time with these grid/smartgrid callbacks. Now regarding the 'create' option: If I put grid = SQLFORM.smartgrid(db.mytable, ,create=False), then correctly, the '+Add' button doesn't appear on the web application. But if I put a lambda callback there: grid =

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Kostas M
The exact phrasehttp://www.web2py.com/books/default/chapter/29/07?search=smartgrid#SQLFORM.grid-and-SQLFORM.smartgridis: All the arguments but the table, args, linked_tables and user_signatures can be dictionaries as explained below. What book are you looking at? I can't find that phrase

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Kostas M
Sorry, I don't understand what you mean. *ondelete* isn't supposed to take dictionaries in smartgrid, as editable and deletable do? On Monday, January 14, 2013 7:32:21 PM UTC, Derek wrote: You must have missed this part: The smartgrid takes the same arguments as a grid and some more with

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Kostas M
Editable and deletable are functionalities also provided by *grid though*... On Monday, January 14, 2013 7:45:45 PM UTC, Derek wrote: ondelete is functionality provided by *grid* and not *smartgrid*. So the documentation for *grid* applies, not the documentation for *smartgrid*. --

[web2py] Re: SQLFORM.smartgrid create callback

2013-01-14 Thread Kostas M
Thanks for the clarification. In my case, I have two tables: db.define_table('analyses',Field('info'),Field('status') db.define_table('samples',db.analyses,Field('sample_info') and I use: grid=SQLFORM.smartgrid(db.analyses,linked_tables=['samples']) I want when the status of an Analysis is

[web2py] Re: SQLFORM.smartgrid create callback

2013-01-14 Thread Kostas M
Awesome! (and I will keep repeating the mantra in my mind =) ) --

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-14 Thread Kostas M
Fantastic! And since we are on the topic, can we clarify also the use of dictionaries for the callbacks in the case of smartgrid? Which options can take a dict of functions, and which not? E.g. it seems ondelete can't take a dictionary, while editable can:

Re: [web2py] Re: SQLFORM.grid callbacks

2013-01-13 Thread Kostas M
Sorry about the duplicate posts... It seems they have been posted on the mails, but still not appearing on the web interface... I got all four copies, fwiw. --

[web2py] SQLFORM.grid and smartgrid ondelete callbacks and etc.

2013-01-11 Thread Kostas M
I see there are many questions on the workings of *ondelete* and *oncreate*callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but *ondelete* take a form object as input. Searching for answers in: - grid/smartgrid ondelete

[web2py] grid ondelete callback

2013-01-11 Thread Kostas M
I see there are many questions on the workings of *ondelete* and *oncreate*callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but *ondelete* take a form object as input. Searching for answers in: - grid/smartgrid ondelete

[web2py] Is there a problem posting questions?

2013-01-11 Thread Kostas M
I have tried 4 times to post a question here regarding SQLFORM.grid, and everytime I got a message 'The post was deleted' What is going on? --

[web2py] SQLFORM.grid callbacks

2013-01-11 Thread Kostas M
I see there are many questions on the workings of ondelete and oncreate callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but ondelete take a form object as input. Searching for answers in web2py-user topics such as: *grid/smartgrid ondelete issue*

[web2py] SQLFORM.grid callbacks

2013-01-11 Thread Kostas M
I see there are many questions on the workings of ondelete and oncreate callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but ondelete take a form object as input. Searching for answers in web2py-users topics such as: - *grid/smartgrid ondelete

[web2py] SQLFORM.grid ondelete and other callbacks

2013-01-11 Thread Kostas M
(This is the 3rd time I am trying to post this question. For some reason the message was deleted. Is using links in the message considered harmful?) I see there are many questions on the workings of ondelete and oncreate callbacks of the grid and smartgrid, but I can't find a valid answer. The

[web2py] SQLFORM.grid callbacks

2013-01-11 Thread Kostas M
I see there are many questions on the workings of ondelete and oncreate callbacks of the grid and smartgrid, but I can't find a valid answer. The book says that all but ondelete take a form object as input. Searching for answers in web2py-users topics: - *grid/smartgrid ondelete issue*

[web2py] Re: Merry Christmas everybody!

2012-12-25 Thread Kostas M
+1 --

[web2py] Re: The book updates and status

2012-12-22 Thread Kostas M
IMHO, as I have said previously, it would be nice if the markmin to PDF converter produced comparable layouts/fonts to the online version of the book... The printed book, up to now, misses a lot of the pleasant and appealing layout of the online version. --

Re: [web2py] Re: No module named plural_rules, end emtpy db in DAL connection

2012-12-20 Thread Kostas M
The same warning appears: In [1]: from gluon.dal import DAL,Field WARNING:root:Unable to import plural rules: No module named plural_rules --

[web2py] No module named plural_rules, end emtpy db in DAL connection

2012-12-19 Thread Kostas M
Trying to use DAL in my functional_tests.py (sitting in the application directory), I get the following warning: In [1]: from gluon import DAL WARNING:root:Unable to import plural rules: No module named plural_rules Furthermore, the db seems to be empty, although it has proper tables, as seen

Re: [web2py] Re: No module named plural_rules, end emtpy db in DAL connection

2012-12-19 Thread Kostas M
Thank you both, for the heads up! As Niphlod have said at: https://groups.google.com/forum/#!searchin/web2py/auto_import=True/web2py/bwCYiQcE59I/D1IkGFC55eEJ * Remember that DAL does NOT introspect databases.* Any hints on the Warning? --

[web2py] Re: Passing an environment variable to wep2py

2012-12-18 Thread Kostas M
Thank you Massimo for the response. os.environ[WEB2PY_USE_DB_TESTING]= 1 is the correct way to set env. variables, and modification of os.environ affect both the running program and subprocesses created by Python (Python essential reference 4th ed.). In my case after all, both ways are

[web2py] Passing an environment variable to wep2py

2012-12-17 Thread Kostas M
I am trying to set up an environment variable (lets say WEB2PY_USE_DB_TESTING), so that in my db.py: if not os.environ.get(WEB2PY_USE_DB_TESTING,None): db = DAL('sqlite://storage.sqlite') else: db = DAL('sqlite://../fts/testdb.sqlite') (as this resource points out:

[web2py] IS_IN_DB Referencing Label

2012-12-13 Thread Kostas M
I have a table Lab_members: db.define_table('lab_members', Field('member',db.auth_user, represent=lambda member,row: str(member.username) ), ) and now I create a second table, having a Field:

[web2py] Re: IS_IN_DB Referencing Label

2012-12-13 Thread Kostas M
Thanks a lot Anthony! I think this should go to the book's documentation. --

[web2py] Re: Default value for reference type

2012-12-12 Thread Kostas M
Massimo thank you for your response. Unfortunately, I have not the traceback now, since I chose to build a separate table, not referring to db.auth_group. This is a kind of duplication in regards to auth_group, but it makes simple the handling of my lab_members table:

[web2py] Default value for reference type

2012-12-11 Thread Kostas M
I try to define a lab_members table: from gluon import current current.auth = auth db.define_table('lab_members', Field('lab', db.auth_group, label='Lab Name', represent=lambda id,row: str(row.role)+' Lab',

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-12-06 Thread Kostas M
Peter, I agree with you 100% regarding the ambiguous documentation, and the lost time back and forth, among google searches and source code reading... I am one of them! Kostas 'These must point to the URL you want to redirect your users to after the various possible auth actions (in

[web2py] Re: The book updates and status

2012-11-29 Thread Kostas M
I have bought the (printed) web2py book (editions 3rd and 4th) from Lulu, and my note is that the black white printouts are much less attractive from the web css book layout. The coloring helps understanding the syntax as well. I wish the printed book could look as nice as the web version... I

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-07 Thread Kostas M
will keep the current one. On Nov 3, 6:59 am, Kostas M kmo...@hotmail.com wrote: Omi, Thanks for the hint! I managed to adjust your solution to my case. Also, I made some small recommendations, posted in web2pyslices. On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote: Kostas

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-07 Thread Kostas M
will keep the current one. On Nov 3, 6:59 am, Kostas M kmo...@hotmail.com wrote: Omi, Thanks for the hint! I managed to adjust your solution to my case. Also, I made some small recommendations, posted in web2pyslices. On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote: Kostas

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-03 Thread Kostas M
Omi, Thanks for the hint! I managed to adjust your solution to my case. Also, I made some small recommendations, posted in web2pyslices. On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote: Kostas, This could be your alternatives. slice:http://www.web2pyslices.com/slices/take_slice/144

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-03 Thread Kostas M
Omi, Thanks for the hint! I managed to adjust your solution to my case. Also, I made some small recommendations, posted in web2pyslices. On Oct 18, 9:00 pm, Omi Chiba ochib...@gmail.com wrote: Kostas, This could be your alternatives. slice:http://www.web2pyslices.com/slices/take_slice/144

[web2py] SQLFORM.factory and Select functionalities

2011-10-18 Thread Kostas M
I want a FORM that the select option from the 2nd field, depends on the select option of the 1st field. This could be accomplished using a jQuery function to change the available options. However, the construction of the SQLFORM.factory SELECT Field, comes with the requires command, which leaves

[web2py] Re: Memory error with numpy large array

2011-05-17 Thread Kostas M
I tried the same application in a Linux (Ubuntu) machine, after the installation of the latest numpy version (1.6.0). No MemoryError ticket occured in web2py...

[web2py] Re: Memory error with numpy large array

2011-05-10 Thread Kostas M
wrote: I do not think so although there may be less memory available. Apache, if you use, may set restrictions. On May 5, 3:00 pm, Kostas M kmo...@hotmail.com wrote: I have an application which uses the function numpy.zeros to create a very big array (~16500 x 16500) with the command: data

[web2py] Memory error with numpy large array

2011-05-05 Thread Kostas M
I have an application which uses the function numpy.zeros to create a very big array (~16500 x 16500) with the command: data = numpy.zeros( (lgos,lgos), dtype=float) This causes a MemoryError ticket in web2py. However when I run the same function as a python module (outside web2py) it finishes

[web2py] Re: Merry Christmas

2010-12-23 Thread Kostas M
def best_wishes(web2py): for i in web2py.users: print Dear %s I wish you Merry Christmas \ and a Happy New Year!! % i

[web2py] Re: Table names: plural or singular?

2010-12-02 Thread Kostas M
, not for the users. Massimo On Dec 2, 12:48 am, Kostas M kmo...@hotmail.com wrote:

[web2py] Re: Table names: plural or singular?

2010-12-02 Thread Kostas M
up in any generated forms except, as you say, in appadmin. But appadmin is not quite the same of Django admin. It is designed for the administrator, not for the users. Massimo On Dec 2, 12:48 am, Kostas M kmo...@hotmail.com wrote:

[web2py] Re: Table names: plural or singular?

2010-12-01 Thread Kostas M
Speaking of table names, I have a question: In Django models, when defining a table e.g. Unit, there is the ability to adjust the name of the table when it is shown in the admin app, using the Meta class as 'verbose_name' for single, and 'verbose_name_plural' for plural: class

[web2py] Re: Validate dynamically generated select SQLFORM.factory

2010-11-18 Thread Kostas M
It seems I don't understand what is the problem. Isn't the intended action the form to have errors if nothing is selected? This is checked with the: if form.accepts(request.vars, session): ... My app throws an error if you click the submit button without selecting an item from the list in the

[web2py] Re: Validate dynamically generated select SQLFORM.factory

2010-11-17 Thread Kostas M
At first thanks villas for the correction of the boolean 'multiple' argument. DenesL I agree that multiple should mean 1 or more, not zero or more. Making though the following test: IS_IN_SET(['max', 'john'])('') ('', 'value not allowed') IS_IN_SET(['max', 'john'], multiple=True)('') ([],

[web2py] Re: Validate dynamically generated select SQLFORM.factory

2010-11-16 Thread Kostas M
I tried this in a controller and worked fine: def factory(): options = ['a','b','c'] form = SQLFORM.factory(Field('Optimizers', requires=IS_IN_SET(options,multiple='multiple'))) if form.accepts(request.vars, session): response.flash = 'form accepted' elif form.errors:

[web2py] ValueError: need more than 1 value to unpack

2010-11-12 Thread Kostas M
I am trying to reproduce the What is going on with web2py? video (http://vimeo.com/13485916). At the 'friend' section, when I try to enter a new friend eg. Max I am getting this error: Traceback (most recent call last): File C:\Temp\web2py\applications\myplayepedvm/models/ plugin_wiki.py, line

[web2py] Re: 'DEMO_MODE' is not defined

2010-10-14 Thread Kostas M
I am still getting this error with Version 1.87.3 Version web2py Version 1.87.3 (2010-10-13 19:44:46) Error ticket for images Ticket 127.0.0.1.2010-10-14.09-53-53.ad7929fb-6991-49e1- a83c-8ac1a49712a4 Error traceback 1. 2. 3. 4. 5. Traceback (most recent call last): File