[web2py] Wrapping text in SQLFORM.grid

2011-11-14 Thread Johann Spies
I have found one solution which works for me: In static/css/basic.css I commented: /*.web2py_grid td { white-space:nowrap; }*/ Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

[web2py] Removal of 'columns' in grid/smartgrid creates problems for search function

2011-11-13 Thread Johann Spies
I have used the columns-argument to set the display columns and the 'fields' argument to define the search fields for the search function. I only wanted to display 2 columns of a table but about 15 fields to be searchable eg. '* parent_organisation contains america'.* Now if

Re: [web2py] Offline Access to web2py manual?

2011-11-11 Thread Johann Spies
On 10 November 2011 18:11, ~redShadow~ redsha...@hackzine.org wrote: Sure, I was complaining for lack of *wget* documentation, not web2py :) (although yeah, maybe I should email wget authors about that..) 'man wget' is quite good. Did you try http://www.gnu.org/software/wget/manual/ ?

Re: [web2py] Offline Access to web2py manual?

2011-11-10 Thread Johann Spies
wget --recursive -l 1 --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains web2py.com --no-parent http://www.web2py.com/book You can add --mirror as an extra option. In that case it will skip files that are already on your computer and just

[web2py] Please help met to see the mistake causing this Valueerror

2011-11-07 Thread Johann Spies
ValueError: invalid literal for int() with base 10: 'abcd' From SQLForm.grid, when clicked on the ' View' button I get the following When I click on the 'Edit' button, I get a ticket: File /home/js/web2py/gluon/dal.py, line 1378, in represent return str(int(obj)) ValueError: invalid

[web2py] Re: Please help met to see the mistake causing this Valueerror

2011-11-07 Thread Johann Spies
Apologies, the screenshot did not show up in the email. I have attached it here. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) attachment: Selection_008.png

[web2py] Re: Please help met to see the mistake causing this Valueerror

2011-11-07 Thread Johann Spies
This also happens in the appadmin interface. A bug perhaps? I have updated my web2py version from the trunk this morning. Previously this worked without a problem. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Please help me understand how 'lambda row, rc' works

2011-11-07 Thread Johann Spies
I found the cause of the problem: I used the suggest-widget with the doc_nr field and specified an id-field without specifying 'keyword' as in the documentation. This worked well in SQLFORM.factory but not in the model. Removing the 'id_field' argument solved the problem. Regards Johann --

Re: [web2py] Re: Please help me understand how 'lambda row, rc' works

2011-11-07 Thread Johann Spies
Apologies, I replied to the wrong thread. Ignore my previous email in this context please. Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Please help met to see the mistake causing this Valueerror

2011-11-07 Thread Johann Spies
Thanks for your attention Massimo. I found the cause of the problem: I used the suggest-widget with the doc_nr field and specified an id-field without specifying 'keyword' as in the documentation. This worked well in SQLFORM.factory but not in the model. db.akb_doccenter.doc_nr.widget =

Re: [web2py] Problem while Importing a csv file into the database

2011-11-03 Thread Johann Spies
On 2 November 2011 13:36, Saurabh S ggtestlo...@gmail.com wrote: Questions: 1. What is the correct way to create the CSV file so that the file can be imported using appadmin feature. 2. How to debug the error in case data is not reflected after importing the .csv file? 3. Is there any

Re: [web2py] Vim and syntax highlight.

2011-10-31 Thread Johann Spies
On 30 October 2011 22:12, f4eedu f4e...@gmail.com wrote:, Did anyone managed to set vim showing proper syntax highlight? Yes. The standard installation of vim-gnome on Debian includes syntax highlighting for python. Did you put 'syntax on' in your .vimrc? Regards Johann -- Because

Re: [web2py] Re: sqlform.grid

2011-10-31 Thread Johann Spies
Thanks for sharing this. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: sqlform.grid

2011-10-27 Thread Johann Spies
On 26 October 2011 21:20, peter peterchutchin...@gmail.com wrote: Adding in the css for grid actually spoilt things. I have managed to get a good looking grid for CDs with graphics using smartform.grid, How did you get wrapping of the text in the 'Description' column in your your grid (if

Re: [web2py] Re: SQLFORM.grid awesomeness and some questions

2011-10-27 Thread Johann Spies
On 26 October 2011 19:15, Cliff cjk...@gmail.com wrote: So you need a column on the right for an Add to Cart button. I have previously asked about custom edit buttons and this was the answer (which works): *links = [lambda row: A('Edit',_href=URL(controller,edit, args=[update, tablename,

Re: [web2py] book 3.2ed

2011-10-26 Thread Johann Spies
Thanks! Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread Johann Spies
Should I change something in httpd.conf? When I did it some weeks ago the support people of Webfactional was very helpful. I did not have to do something to the apache-setup. The creation of this static-only app did not solve my problem and in the end I have switched to a uwsgi-setup. A

Re: [web2py] Import/Export issuse in web2py

2011-10-24 Thread Johann Spies
On 24 October 2011 12:18, Saurabh S ggtestlo...@gmail.com wrote: 1. if the DB structure is different than the coloumns in csv , will the import work ? for example my x table in DB has 10 columns and i am importing a csv into it with 8 columns...will i be able to do this successfully

[web2py] Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Johann Spies
The default value for 'selectable' is None. When I use 'selectable = True' the an option button appears to every record, but when submitted I get File /home/js/web2py/gluon/sqlhtml.py, line 1821, in grid selectable(records) TypeError: 'bool' object is not callable So if what should 'not

[web2py] Grid/smartgrid: overriding the search_options

2011-10-18 Thread Johann Spies
My client does not want all the search options under the query-button - just the 'contains' option as default. How do I specify that in the controller? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Johann Spies
On 18 October 2011 13:20, Sathvik Ponangi psath...@gmail.com wrote: db(db.files.hash==name).select().first() always gives None, what's the right way to do it? Thanks for your help... .first() will only work if len(db(db.files.hash==name).select()) 0 If you get None it means that the query

Re: [web2py] Re: Grid/smartgrid: overriding the search_options

2011-10-18 Thread Johann Spies
Thanks Massimo. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Johann Spies
Thanks! Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] image uploading and storing in web2py

2011-10-17 Thread Johann Spies
Search the book for 'image' and you will find a lot of references. Here is an quote from early in the book ( http://web2py.com/book/default/chapter/01?search=image): Here are some examples of web2py statements that illustrate its power and simplicity. The following code: 1.

[web2py] Represent, list:reference, upload-field

2011-10-14 Thread Johann Spies
This table db.define_table(wbdocuments, Field(name, label = Document name), Field(file, upload, label = Download), format = '%(name)s') is linked in another table: db.define_table('wbmaster', Field('documents',

Re: [web2py] Re: Uploading 388 files

2011-10-14 Thread Johann Spies
On 14 October 2011 01:53, Massimo Di Pierro massimo.dipie...@gmail.comwrote: I have used mechanize and I was pretty impressed. http://wwwsearch.sourceforge.net/mechanize/ Thanks. I have spent about 2 hours to get working with mechanize and Splinter but I am getting nowhere. The

Re: [web2py] Re: Represent, list:reference, upload-field

2011-10-14 Thread Johann Spies
On 14 October 2011 11:14, Massimo Di Pierro massimo.dipie...@gmail.comwrote: documents is a list of IDs so you have to turn each one of them into a link. You can try: db.wbmaster.documents.represent = lambda value, row: SPAN(*[row.name]+ [A(v, _href = URL('download', args = v)) for v in

Re: [web2py] Re: Uploading 388 files

2011-10-14 Thread Johann Spies
On 14 October 2011 12:18, Bruno Rocha rochacbr...@gmail.com wrote: do you have firebug? splinter use same selectors of css (pure DOM) Yes, I am using Firebug. I have tried again now and still have not got to a working solution. The form looks like this (screenshot attached if from the browser

Re: [web2py] Re: Uploading 388 files

2011-10-14 Thread Johann Spies
On 14 October 2011 12:31, Bruno Rocha rochacbr...@gmail.com wrote: note: you can do that on the server side. just need to put all the files directly under upload folder and loop throught them. So the store method can be used to create the record I want to do that on the server side. What

Re: [web2py] Re: Uploading 388 files

2011-10-14 Thread Johann Spies
I apologise for not reading the book properly. I have waisted many hours by trying all sort of other stuff and in the end I could do just this: import os path = /home/js/web2py/applications/uploads # insert the path to the directory of interest here dirList = os.listdir(path) for fname in

Re: [web2py] Re: Represent, list:reference, upload-field

2011-10-14 Thread Johann Spies
On 14 October 2011 14:49, Massimo Di Pierro massimo.dipie...@gmail.comwrote: My bad. Try this: def render_docs(ids,row): span = SPAN() for id in ids: doc = db.wbdocuments(id) if doc: span.append(A(doc.name,_href=URL('download',args=doc.file))) return span

Re: [web2py] Re: Memory problems on Webfaction

2011-10-13 Thread Johann Spies
On 13 October 2011 06:44, MidGe degreef.mic...@gmail.com wrote: hello elffikkl, I tried your suggestion, but I am not having your success. The install succeed, but the admin fails. It keeps requesting me to log in although it does recognize my password as valid! Any suggestions? I

Re: [web2py] Re: Internal error

2011-10-13 Thread Johann Spies
On 12 October 2011 15:31, Massimo Di Pierro massimo.dipie...@gmail.comwrote: How long is the list of sids? Slite? This is not a web2py error but most likely a driver error. Try commit after every every update. Thanks for your reply Massimo. The list is normally not long - between 1 and 5

Re: [web2py] Re: on grid and smartgrid search feature

2011-10-13 Thread Johann Spies
On 12 October 2011 14:59, stefaan stefaan.hi...@gmail.com wrote: I have replaced my all my similar .js and .css files with that of the welcome app but I see no popup panel. It may be that the old .css is cached in your browser and needs to be reloaded - try to refresh the browser page

Re: [web2py] Re: Memory problems on Webfaction

2011-10-13 Thread Johann Spies
On 13 October 2011 10:27, MidGe degreef.mic...@gmail.com wrote: hiya spyker, Sure, I did that. I am getting to the login stage and getting thru.. but then it seems the entire system goes amnesiac and wants me to log in again. I find the support people of Webfaction very helpful. Did you

[web2py] Uploading 388 files

2011-10-13 Thread Johann Spies
I want to upload 388 documents and I don't want to do that by typing the name of the document and clicking on the correct file:) Using scripting I can provide the path to the file. How do I tell Web2py in a script to upload that file? Regards Johann -- May grace and peace be yours in

Re: [web2py] Complicated form

2011-10-13 Thread Johann Spies
On 13 October 2011 12:19, Web2Py Freak halna...@gardeniatelco.com wrote: Dear All , i want to make a form that has name Field , email Field , Comment Field ,and 15 radio buttons but i dont want it to come from the database and when its accepted send a email with its content and i have a

Re: [web2py] IMPORTANT

2011-10-13 Thread Johann Spies
If somebody has a problem with my signature, please contact me directly. I will not be offended and I do not wish to offend anyone. This thread has saddened me, however. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His

Re: [web2py] Uploading 388 files

2011-10-13 Thread Johann Spies
On 13 October 2011 17:39, Bruno Rocha rochacbr...@gmail.com wrote: a fun way is using splinter to emulate a browser action. http://splinter.cobrateam.info/ I looks very interesting. Thanks. I will try it. Regards Johann -- May grace and peace be yours in abundance through the full

[web2py] Internal error

2011-10-12 Thread Johann Spies
I am running a script to update data and on some records I get the error: *** InternalError: current transaction is aborted, commands ignored until end of transaction block Turning on pdb.set_trace() enabled me to find the actual problem line: skr = db.akb_authors[i] where i = 176530 in this

Re: [web2py] how to restrict a field to be alphabet only

2011-10-12 Thread Johann Spies
On 12 October 2011 10:41, Saurabh S ggtestlo...@gmail.com wrote: db.organisations.name.requires=[IS_MATCH('^[a-z]', This means that you will only names with one character and that character must be in the range a-z. The following form will accept names with any character except 0-9. See the

Re: [web2py] on grid and smartgrid search feature

2011-10-12 Thread Johann Spies
On 11 October 2011 16:20, Massimo Di Pierro massimo.dipie...@gmail.comwrote: The new grid/smartgrid have a much better search feature. A new button query shows a popup panel that allows you to build the query string. Can you please check on your existing tables and see if you encounter any

Re: [web2py] how to restrict a field to be alphabet only

2011-10-12 Thread Johann Spies
On 12 October 2011 13:33, Anthony abasta...@gmail.com wrote: On Wednesday, October 12, 2011 7:13:53 AM UTC-4, spyker wrote: Field('your_name', requires=IS_MATCH('\D+') Note, \D will match any non-digit character, not just letters. That is what I said: anything except 0-9. It

[web2py] Database constraints or Web2py validators

2011-10-11 Thread Johann Spies
I have several tables where there should only be one possible combination of two uuid-fields per table (mostly many to many links). I have created 'unique' constraints for those fields in Postgresql so the database would not accept any inserts or edits which violates that constraint. I use that

[web2py] Postgresql-problem when deleting fields

2011-10-11 Thread Johann Spies
I have changed the model of a populated table (removing two fields with uuid-type references to other tables). Now when I restart web2py the process never becomes ready. In the Postgresql-log I see: 2011-10-11 12:24:13 SAST LOG: could not receive data from client: Connection reset by peer

Re: [web2py] Re: Database constraints or Web2py validators

2011-10-11 Thread Johann Spies
On 11 October 2011 13:25, Anthony abasta...@gmail.com wrote: Again, if just focused on form validation, I suppose another option would be to use an onvalidation function (processed after form validation but before db insert). Anthony On Tuesday, October 11, 2011 7:23:33 AM UTC-4, Anthony

Re: [web2py] Re: Database constraints or Web2py validators

2011-10-11 Thread Johann Spies
On 11 October 2011 13:48, Bruno Rocha rochacbr...@gmail.com wrote: Note that you can use db.table.validate_and_insert and db.table.validate_and_update to fire validators in pure DAL without forms. Thanks! I did not know about that. Regards Johann -- May grace and peace be yours in

[web2py] Re: Postgresql-problem when deleting fields

2011-10-11 Thread Johann Spies
On 11 October 2011 12:31, Johann Spies johann.sp...@gmail.com wrote: I have changed the model of a populated table (removing two fields with uuid-type references to other tables). Now when I restart web2py the process never becomes ready. In the Postgresql-log I see: 2011-10-11 12:24:13

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Johann Spies
On 8 October 2011 17:19, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Almost any query an be build using the dal. How would this type of postgresql-query be translated into DAL? WITH regional_sales AS ( SELECT region, SUM(amount) AS total_sales FROM orders GROUP

Re: [web2py] Re: Sending Email Under Linux

2011-10-06 Thread Johann Spies
On 6 October 2011 06:42, pbreit pbreitenb...@gmail.com wrote: Check /var/log/mail.log You might want to review Postfix install instructions for your version of Linux. The Linode help docs are usually really good: http://library.linode.com/email/postfix/gateway-ubuntu-10.10-maverick But I

[web2py] Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-10-06 Thread Johann Spies
How do I override the views/controllers triggered by the buttons mentioned in the subject line when using SQLFORM.grid/smartgrid? 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

Re: [web2py] Re: Overriding Grid/Smartgrid's 'Edit/Delete/View'

2011-10-06 Thread Johann Spies
On 6 October 2011 14:36, apple simo...@gmail.com wrote: You can add your own buttons using: links = [lambda row: A('Edit',_href=URL(controller,edit, args=[update, tablename, a.id])) and set editable, deletable, details to False. Thanks! Johann -- May grace and peace be yours in

Re: [web2py] Re: wrapping long text lengths in grid/smartgrid

2011-10-05 Thread Johann Spies
On 3 October 2011 20:02, Massimo Di Pierro massimo.dipie...@gmail.comwrote: maxtextlengths={'tablename.fieldname':20}, # per field maxtextlength=20, # default It would be nice to have a possibility to wrap text in a column. Regards Johann -- May grace and peace be

Re: [web2py] Re: webfaction clean install unable to save any files in admin edit mode

2011-10-05 Thread Johann Spies
On 5 October 2011 06:48, MidGe degreef.mic...@gmail.com wrote: Ah, ok, I thought this was a different branch and that I had to use a different repo name or branch to pull it. But now, uwsgi, doesn't seem to work again. So I am not sure about introducing another issue prior to fixing the main

Re: [web2py] Re: wrapping long text lengths in grid/smartgrid

2011-10-03 Thread Johann Spies
On 1 October 2011 05:28, Bruno Rocha rochacbr...@gmail.com wrote: grid should have a truncate parameter. It seems that there is none at the moment. I got TypeError: grid() got an unexpected keyword argument 'truncate' when trying form = SQLFORM.grid(query, columns = columns,deletable =

[web2py] Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
Although I can successfully login as admin on an app using a uwsgi-setup on Webfaction I cannot access the errors: web2py™(1, 99, 1, datetime.datetime(2011, 9, 22, 16, 59, 24), 'stable') PythonPython 2.7.1:TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Traceback (most recent call last): File

Re: [web2py] Browser unable to connect over secure SSH tunnel

2011-09-30 Thread Johann Spies
On 29 September 2011 15:57, Cliff cjk...@gmail.com wrote: set up shows this error: cjk@littlecliffsite:~$ channel 3: open failed: connect failed: Connection refused channel 3: open failed: connect failed: Connection refused Any suggestions? I am having the same problem to a webfaction

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
On 30 September 2011 15:48, Richard Vézina ml.richard.vez...@gmail.comwrote: If you can browse the directory, go in web2py/applications/YOURAPP/errors/ They will be all there, but more difficult to read... When I get this ticket generally I need to restart Apache from the command line to

[web2py] csv backup/restore fails

2011-09-30 Thread Johann Spies
Following the advice in the book: In web2py, you can backup/restore an entire database with two commands: To export: 1. db.export_to_csv_file(open('somefile.csv', 'wb')) To import: 1. db.import_from_csv_file(open('somefile.csv', 'rb')) I found the following when restoring:

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
On 30 September 2011 16:15, Richard Vézina ml.richard.vez...@gmail.comwrote: But if you say you have update manually your web2py installation that is pretty much the permissions that are in cause... I can only work as regular user on Webfaction and all the files belongs to that user. The

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
On 30 September 2011 16:59, Richard Vézina ml.richard.vez...@gmail.comwrote: Ok, so when you update you maybe forget to copy back this file into the /web2py folder?! No. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord!

Re: [web2py] csv backup/restore fails

2011-09-30 Thread Johann Spies
On 30 September 2011 16:48, Richard Vézina ml.richard.vez...@gmail.comwrote: pg_dump --attribute-inserts filename Thanks Richard. the --attribute-inserts seems to have made a difference. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and

Re: [web2py] csv backup/restore fails

2011-09-30 Thread Johann Spies
On 30 September 2011 16:58, Richard Vézina ml.richard.vez...@gmail.comwrote: Maybe your database in your other location is not empty when you import your csv export file and as it says in the book : ... Try to drop your new DB and recreate it from scratch and leave it empty before try

Re: [web2py] Re: Admin-ticket: cannot access errors

2011-09-30 Thread Johann Spies
I think I have found the problem. I did the following: * Replaced the latest version of web2py with an older copy (1.95.x) which I have been using with apache. This helped me to get admin's access to the errors back. And then I could repeat the process one of the users used when she

Re: [web2py] Re: UWSGI-setup: Unable to https://test.mysite.webfactional.com/admin

2011-09-26 Thread Johann Spies
In my case the support person 'discovered' the port by putting some debugging statements in web2py/applications/admin/models/access.py Why that port was chosen, is a mystery. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord!

[web2py] Internet Explorer

2011-09-26 Thread Johann Spies
The same web2py-page shows up about twice the size in Internet Explorer than in other browers like Firefox, Chrome and Opera. I am using the css that comes with the welcom app. I know the users can correct it by using Ctrl--. But is there a way to make provision for the defiencies of IE to take

Re: [web2py] Re: Problem with suggest-widget plugin

2011-09-23 Thread Johann Spies
Hallo Kenji, 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. Spot on. I forgot that I did put an autocompletewidget for that field in the model. When I

Re: [web2py] passing a string list from a controller to a view. Error?

2011-09-23 Thread Johann Spies
2011/9/23 António Ramos ramstei...@gmail.com Context: Jqplot graph in web2py Hello i have a controller def index(): ticks = ['May', 'June', 'July', 'August'] return dict(ticks=ticks) my view {{=ticks}} the code of the html generated is [#x27;May#x27;, #x27;June#x27;,

Re: [web2py] Re: Smartgrid/grid anomaly

2011-09-22 Thread Johann Spies
On 21 September 2011 15:58, Martín Mulone mulone.mar...@gmail.com wrote: this is wrong is not the same as field notation: columns = [db.akb_doccenter.title, db.akb_doccenter.author, db.akb_doccenter.publication_date, db.akb_doccenter.doc_nr, db.akb_doccenter.location,

[web2py] Problem with suggest-widget plugin

2011-09-22 Thread Johann Spies
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(

Re: [web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread Johann Spies
On 22 September 2011 13:41, kenji4569 hos...@s-cubism.jp wrote: 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 Thanjks Kenji, Apologies for my stupidity. I should have seen that myself.

Re: [web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread Johann Spies
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

Re: [web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread Johann Spies
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

Re: [web2py] Re: Problem with suggest-widget plugin

2011-09-22 Thread Johann Spies
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

Re: [web2py] Re: web2py 1.99.1 OUT

2011-09-22 Thread Johann Spies
Thank you very much - all of you who contributed. 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

[web2py] Smartgrid/grid anomaly

2011-09-21 Thread Johann Spies
If I use SQLFORM.grid in the code below, I get an error message: fields = reduce(lambda a,b:a+b,[[field for field in table] for table in tables]) TypeError: reduce() of empty sequence with no initial value If I use the 'data = ' lines using SQLFORM.smartgrid there is now problem. query =

[web2py] Re: Smartgrid/grid anomaly

2011-09-21 Thread Johann Spies
On 21 September 2011 14:45, Johann Spies johann.sp...@gmail.com wrote: query = db(db.akb_doccenter.id 0) Is that a bug in my code or in the trunk? The bug was in my code: it should be : query=(db.akb_doccenter.id0) Regards Johann -- May grace and peace be yours in abundance through

Re: [web2py] Re: Tricky query

2011-09-16 Thread Johann Spies
try query1 = regexp_replace(lower(us2006_2010.title), '(i|/i|sup|/sup|[^[:alnum:]_])', '', 'g') = regexp_replace(lower($a$%s$a$), '(i|/i|sup|/sup| [^[:alnum:]_])', '', 'g') % some_string Thanks DenesL and Harry. I forgot about the raw string option and did not know about the $a$

Re: [web2py] Re: Memory problems on Webfaction

2011-09-16 Thread Johann Spies
Thanks Vasile for this instructions. Excuse my ignorance but I know very little about how uwsgi works so I have some further questions (please see below): [web2py] wget http://www.web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip python2.7 web2py.py #seems needed before using it

Re: [web2py] Re: Memory problems on Webfaction

2011-09-16 Thread Johann Spies
Thanks for your answers Vasile. I can now make https contact to my test setup but not /admin. For some reason the process does not recognise my parameters_443.py file that I copied from the old installation. Regards Johann -- May grace and peace be yours in abundance through the full

[web2py] UWSGI-setup: Unable to https://test.mysite.webfactional.com/admin

2011-09-16 Thread Johann Spies
I am testing a uwsgi-setup on Webfaction and followed instructions by Vasile Ermicioi posted on this list on 24.8.2011. Although I have a parameters_443.py I still get the message admin disabled because unable to access password file when I try to access admin. Can it be a case that the

Re: [web2py] UWSGI-setup: Unable to https://test.mysite.webfactional.com/admin

2011-09-16 Thread Johann Spies
On 16 September 2011 15:22, Vasile Ermicioi elff...@gmail.com wrote: not tested but try to rename to parameters_your_port_number.py I have tried that, but it did not solve the problem. A helpful person from the Webfaction support team just send me this email: I found out that it was looking

[web2py] Tricky query

2011-09-15 Thread Johann Spies
This might be more a python problem than Web2Py: I am using the following query: query1 = regexp_replace(lower(us2006_2010.title), '(i|/i|sup|/sup|[^[:alnum:]_])', '', 'g') = regexp_replace(lower('%s'), '(i|/i|sup|/sup|[^[:alnum:]_])', '', 'g') % some_string It works OK until query1 expands to

Re: [web2py] Re: Tricky query

2011-09-15 Thread Johann Spies
On 15 September 2011 13:48, stefaan stefaan.hi...@gmail.com wrote: How do I escape the ' after the second '2' in this query? Do you really want only one ' to appear ? (my chemistry is a little rusty): It is not a case whether I want it there. It is there somewhere in the database and I

Re: [web2py] Re: SQLFORM.grid representation

2011-09-14 Thread Johann Spies
On 14 September 2011 10:47, Simon Ashley simonashle...@gmail.com wrote: While it looks like a bug, it may not be implemented in the new .grid or .smartgrid. There is a posting that may imply this http://groups.google.com/group/web2py/browse_thread/thread/aa5fa98a74e9364f and certainly in

Re: [web2py] Instant Press 2.0

2011-09-14 Thread Johann Spies
On 14 September 2011 00:04, Martín Mulone mulone.mar...@gmail.com wrote: http://www.youtube.com/watch?v=vGkR246URRk Thanks for making this available. I have tried it out, but I could not log in as admin because some characters of initial the password appeared as blocks on my browser

Re: [web2py] Re: Problem with SQLFORM.grid

2011-09-06 Thread Johann Spies
On 5 September 2011 20:04, brushek luk...@chrustek.net wrote: Can anybody help ? or grid and smartgrid shouldn't be used with custom fields ? I have tried your model and controller and get the following error when I try to use SQLFORM.smartgrid or -grid: File

Re: [web2py] Problem with SQLFORM.grid

2011-09-05 Thread Johann Spies
Hallo Brushek, I am also trying out SQLFORM.grid/smartgrid and learn as I go. @auth.requires_login() def dodajserwer(): response.flash = T('Serwery') form=SQLFORM.grid(db.serwery) Apparently the usage is either SQLFORM.smartgrid(table) or SQLFORM.grid(query) Try 'form =

[web2py] How to run a script in Eclipse

2011-09-02 Thread Johann Spies
I have recently started using eclipse with pydev for Web2Py-development. Is there a way to run a script using the app using Eclipse - something like the equivalent of python web2py.py -S kb -M -N -R somescript.py? Regards Johann -- May grace and peace be yours in abundance through the full

Re: [web2py] Re: New 'represent' syntax

2011-09-02 Thread Johann Spies
On 26 August 2011 17:07, Martín Mulone mulone.mar...@gmail.com wrote: To debug the problem, start passing one by one the fields: The following models work: db.define_table('journal', Field('title'), Field('issn'), Field('subject'),

Re: [web2py] Re: New 'represent' syntax

2011-09-02 Thread Johann Spies
Sorry, requires = IS_IN_DB('journal_id', 'title)%s', zero = None) must be requires = IS_IN_DB(db,'journal_id', '%(title)s', zero = None)), With the same result. Johann -- May grace and peace be yours in abundance through

Re: [web2py] Re: New 'represent' syntax

2011-09-02 Thread Johann Spies
Shouldn't it be IS_IN_DB(db, 'journal.id', ...) -- note 'journal.id' rather than 'journal_id'? Also, your list:reference has to refer to a referenced table. Well spotted! Thanks. That was my mistake. Regards Johann -- May grace and peace be yours in abundance through the full

Re: [web2py] Re: New 'represent' syntax

2011-08-26 Thread Johann Spies
Thanks. It will be very helpful if somebody can update these lines in the book because it still not clear to me how to use the new syntax in each of these instances. I still do not know how 'record' is defined here. db.mytable.name.represent = lambda name: name.capitalize()

Re: [web2py] Re: New 'represent' syntax

2011-08-26 Thread Johann Spies
Hallo Martín, Thanks for your reply. Unfortunately the problem persists: I have in Massimo's demo code for the SQLFORM.smartgrid/grid: def index(): db.define_table('person',Field('name'),format='%(name)s') db.define_table('dog',Field('name'),Field('owner',db.person),format='%(name)s')

[web2py] New 'represent' syntax

2011-08-25 Thread Johann Spies
Please help me to understand how to use the new syntax. How do I have to change the following code to work? def rp(author): an = db(db.akb_reprint.uuid==author).select(db.akb_reprint.rp_author) if len(an): a_name = an.first()['rp_author'] else: a_name = 'No

Re: [web2py] Re: How to use SQLFORM.grid

2011-08-25 Thread Johann Spies
On 24 August 2011 18:33, Massimo Di Pierro massimo.dipie...@gmail.comwrote: I think you want: def journal_grid(): query = db.akb_journal.publisher == db.akb_publisher.uuid fields = [db.akb_journal.title,db.akb_journal.standard_name, db.akb_journal.issn,

Re: [web2py] Re: uuid - Postgresql-type

2011-08-24 Thread Johann Spies
On 24 August 2011 02:59, pbreit pbreitenb...@gmail.com wrote: That would probably require a new DAL field type which I'm guessing would require some consideration. What advantages are you looking for? As I understand it the present field is a 64-character field. A native uuid-field would

Re: [web2py] Re: table, grid, smartgrid, getting better

2011-08-24 Thread Johann Spies
With this code: tabel = SQLFORM.grid(db.akb_articles) or tabel = SQLFORM.smartgrid(db.akb_articles) I get the same result except that the reference to line 1631 in sqlhtml.py is not there when I use .grid: Traceback (most recent call last): File /home/js/web2py/gluon/restricted.py, line 194,

Re: [web2py] Re: Memory problems on Webfaction

2011-08-24 Thread Johann Spies
On 24 August 2011 11:51, robsan rob...@gmail.com wrote: Check out this thread https://groups.google.com/group/web2py/browse_thread/thread/24b6d1b3a51eebb6 I followed Vasile's indications and it's working great! Thanks robsan. Did it make a significant difference to the memory consumption on

Re: [web2py] Re: table, grid, smartgrid, getting better

2011-08-24 Thread Johann Spies
TypeError: lambda() takes exactly 1 argument (2 given) It seems this is only when I use certain models. With some other it works nicely. Further experimentation showed that if I removed *format = lambda r: r.nameor T(Unknown) * as well as a *.represent*-line using lambda to show a link it

<    3   4   5   6   7   8   9   10   11   12   >