Re: [web2py] Re: Memory problems on Webfaction

2011-08-24 Thread Johann Spies
On 24 August 2011 13:27, Vasile Ermicioi elff...@gmail.com wrote: glad to see that I was helpful my personal experience with webfaction is a great one, thanks to nginx, uwsgi and of course web2py :) now uwsgi has a http protocol, and nginx installation is not needed anymore I will post

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

2011-08-24 Thread Johann Spies
On 24 August 2011 13:47, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Feature! it used to be that represent = lambda value:... but then we moved on to represent = lambda value, row:... previous code has been made backward compatible (will accept both) but new code (grid and

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

2011-08-24 Thread Johann Spies
TypeError: lambda() takes exactly 1 argument (2 given) I still get this error with the following model (all 'represent' lines commented out): db.define_table('akb_articles', Field('title'), Field('primaryauthor'), Field('authors', 'text'),

[web2py] How to use SQLFORM.grid

2011-08-24 Thread Johann Spies
The following is not working. What is the syntax suppose to be? 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, db.akb_journal.abbrev_iso,

[web2py] uuid - Postgresql-type

2011-08-23 Thread Johann Spies
At the moment a uuid-field in a Web2py-models generates a definition like this in a Postgresql table: uuid character varying(64) NOT NULL Postgresql has got a UUID-type. Is there a way that DAL can be adapted to utilise that in stead? Regards Johann -- May grace and peace be yours in

[web2py] request.vars, request.args, next (redirecting)

2011-08-23 Thread Johann Spies
The following scenario illustrated to me that I do not understand enough of what web2py is doing in the background. I want a crud.read form and a link to edit the same form (see the two functions below). At first I wanted to use the link like this: link = A('Edit', _href=URL(c='default',

Re: [web2py] Re: request.vars, request.args, next (redirecting)

2011-08-23 Thread Johann Spies
On 23 August 2011 15:31, Massimo Di Pierro massimo.dipie...@gmail.comwrote: I thnk in some places you use request.vars.id and in other places you use request.args(0) and that is the confusion. Try this: Thanks. Regards Johann -- May grace and peace be yours in abundance through the full

[web2py] Memory problems on Webfaction

2011-08-23 Thread Johann Spies
I experience memory usage problems on Webfaction from time to time. Even after doubling the initial configuration from 80Mb to 160Mb I get messages like intermittently this from Webfaction: Your total allowed memory is 160MB and your current memory usage is 223MB. ... zenex - 3MB - 14 days,

Re: [web2py] Re: Memory problems on Webfaction

2011-08-23 Thread Johann Spies
On 23 August 2011 21:36, Gour-Gadadhara Dasa g...@atmarama.net wrote On Tue, 23 Aug 2011 21:21:50 +0200 Johann Spies johann.sp...@gmail.com wrote: I experience memory usage problems on Webfaction from time to time. Even after doubling the initial configuration from 80Mb to 160Mb I get

[web2py] jqgrid-module import problem

2011-08-17 Thread Johann Spies
Strange: I have the app working on my laptop. After packing it using the admin interface and installing it on the server I get this error on the server: ImportError: No module named jqgrid.modules.jqgrid The line in the controller which is referred to: JqGrid = local_import('jqgrid',

Re: [web2py] jqgrid-module import problem

2011-08-17 Thread Johann Spies
On 17 August 2011 12:55, Bruno Rocha rochacbr...@gmail.com wrote: try changing this: JqGrid = local_import('jqgrid', app='jqgrid', reload=True).JqGrid to this: from jqgrid import JqGrid Thanks. That solved the problem but not the mystery (because my lack of understanding). When is it

Re: [web2py] jqgrid-module import problem

2011-08-17 Thread Johann Spies
On 17 August 2011 13:28, Bruno Rocha rochacbr...@gmail.com wrote: No more need to use lical_import it is deprecated. Newest web2py has a custom importer which works much better. Thanks Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our

Re: [web2py] Re: ANN: ide2py: editor, shell and debugger for web2py (experimental)

2011-08-12 Thread Johann Spies
On Debian Linux I get: % python main.py Traceback (most recent call last): File main.py, line 777, in module app = MainApp(redirect=False) File /usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py, line 7978, in __init__ self._BootstrapApp() File

[web2py] HTTP Error 502 Bad Gateway and Static-only option on Webfaction

2011-08-05 Thread Johann Spies
Some users complains about 'HTTP Error 502 Bad Gateway' on a Web2py site on webfaction. When I enquired about that support@webfaction mentioned that it is related to my website and referred me to http://docs.webfaction.com/software/static.html#serving-static-media for a possible solution. Now I

Re: [web2py] JqGrid module

2011-08-04 Thread Johann Spies
On 30 July 2011 20:34, Jim Karsten iiijjj...@gmail.com wrote: Ray Luo and I are developing a web2py jqgrid module that allows you to insert a jqgrid into a page with only a few lines of code. ... # In controller JqGrid = local_import('jqgrid', app='jqgrid', reload=True).JqGrid

[web2py] Powergrid documentation?

2011-08-01 Thread Johann Spies
I am trying out PowerGrid. As I could not find good documentation that explains how to use it, I was following the examples to try and figure out how to use it. So far I had no success at all after a little bit more than 2 hours of trying. It will help users like me with very little

Re: [web2py] How to one2many ?

2011-07-27 Thread Johann Spies
On 27 July 2011 13:07, François Le Gal fanch.le...@gmail.com wrote: That's the code i try : db_system = SQLDB(sqlite://db_system.db) db_system.define_table(fields,Field(name)) db_system.define_table(objects,Field(name),Field(fields,db_system.fields)) Try another name for 'fields' and see

Re: [web2py] Ubuntu pip install web2py in virtualenv

2011-07-27 Thread Johann Spies
On 27 July 2011 14:08, flebber flebber.c...@gmail.com wrote: I installed web2py into a virtualenv in my ubuntu install. When reading the book it states to start web2py with python web2py.py -S welcome however I don't appear to have web2py in my directory. Are you referring to web2py or

[web2py] Deleting uploaded files

2011-07-26 Thread Johann Spies
I have the following model: db.define_table(files, Field(title, string), Field(description, text), Field(file,upload, autodelete = True), # something to be uploaded signature) db.files.id.represent = \

[web2py] def data()

2011-07-26 Thread Johann Spies
I have read something about security related modifications in recent Web2Py versions which caused the previous code using the data() controller to fail with 404 NOT FOUND. I have als seen the comment in the new Welcome-app telling us: but URLs bust be signed, i.e. linked with

Re: [web2py] record representation using a non-id column?

2011-07-20 Thread Johann Spies
On 9 July 2011 03:47, niknok nikolai...@gmail.com wrote: ** I have another unique column in my table that I would like to use as index for record representation. How do I tell web2py to use another index? Ttrying to use like: db.mytable.thisfield.represent = lambda id:

Re: [web2py] record representation using a non-id column?

2011-07-20 Thread Johann Spies
On 20 July 2011 14:09, Johann Spies johann.sp...@gmail.com wrote: I use this: db.define_table('akb_doccenter_location', Field('location')) Apologies, I did not complete the message before sending: the model includes a Field(uuid), obviously. Regards Johann -- May

Re: [web2py] Re: Discussion: Thoughts about including jQuery UI in core web2py?

2011-06-14 Thread Johann Spies
On 13 June 2011 14:38, Marin Pranjic marin.pran...@gmail.com wrote: I think that template app should be minimal. On Mon, Jun 13, 2011 at 2:33 PM, Martín Mulone mulone.mar...@gmail.comwrote: I prefer the way to select the application you want to install, only welcome in main web2py and the

Re: [web2py] Re: autocomplete widget a disaster on Internet Explorer

2011-06-14 Thread Johann Spies
On 14 June 2011 03:27, Anthony abasta...@gmail.com wrote: First, by default, apparently IE caches Ajax responses. That means if you add a new item and then do a subsequent entry in the same browser session, the new item will not appear in the autocomplete list because the list is cached the

Re: [web2py] Re: autocomplete widget a disaster on Internet Explorer

2011-06-13 Thread Johann Spies
I still have not find a solution to the problem of the autocomplete widget not working as it should on Internet Explorer. The following code can illustrate my problem db.define_table(toets, Field(veld1)) db.toets.veld1.widget = SQLFORM.widgets.autocomplete(

Re: [web2py] Postgresql database schema

2011-05-30 Thread Johann Spies
On 30 May 2011 12:14, Massimiliano mbelle...@gmail.com wrote: Existing tables are divided on different database schemas (not only public). Now I want to rewrite a single application that use existing tables on schema xyz. Does web2py support that? I could not get DAL to work with

[web2py] HINT: Use DROP ... CASCADE to drop the dependent objects too.

2011-05-27 Thread Johann Spies
How do I do that using DAL? Using db.executesql() does not update web2py/app/dabases/ 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

Re: [web2py] Re: HINT: Use DROP ... CASCADE to drop the dependent objects too.

2011-05-27 Thread Johann Spies
On 27 May 2011 14:25, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Are you doing this from a shell or script? You neeb db.commit() In the shell. Yes I know that, but when I have dropped a table in this way still have to delete the related file in app/databases before web2py will

[web2py] Memory problems on Webfaction after upgrade of Web2py

2011-05-25 Thread Johann Spies
After upgrading web2py on Webfaction I am experiencing memory problems at least once a week. I have upgraded the memory configuration form 80Mb to 160Mb in January this year and never had this problem until I upgraded to the present version of Web2py (Version 1.95.1). I have disabled cron after

Re: [web2py] Memory problems on Webfaction after upgrade of Web2py

2011-05-25 Thread Johann Spies
On 25 May 2011 09:46, Bruno Rocha rochacbr...@gmail.com wrote: This might be a problem with sessions list being loaded in to memory. By default web2py Cron calls a method which cleans unused sessions. But, the best way to track it is trying enabling Cron again. I will try. The reason why I

[web2py] Strange autocomplete behaviour

2011-05-24 Thread Johann Spies
Truncated model: db.define_table('akb_doccenter', Field('doc_nr', type='string', length=50, requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr')), Field('location')) db.akb_doccenter.doc_nr.widget =SQLFORM.widgets.autocomplete( request,

[web2py] Re: Strange autocomplete behaviour (Solved)

2011-05-24 Thread Johann Spies
On 24 May 2011 11:54, Johann Spies johann.sp...@gmail.com wrote: Truncated model: db.define_table('akb_doccenter', Field('doc_nr', type='string', length=50, requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr')), Copy and paste mistake: This line should refer

Re: [web2py] Re: autocomplete widget a disaster on Internet Explorer

2011-05-19 Thread Johann Spies
I have tested autocomplete now on IE9 and the same problem persists although the positioning of the suggestions is more like that in the other browsers. 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

[web2py] autocomplete widget a disaster on Internet Explorer

2011-05-13 Thread Johann Spies
This came to my attention when one of my users complained about an entry form using the autocomplete widget frustrates her. When i checked I saw the following when using Internet Eplorer: As soon as the autocomplete widget shows up on the screen you cannot type any longer in the field and when

Re: [web2py] Re: autocomplete widget a disaster on Internet Explorer

2011-05-13 Thread Johann Spies
On 13 May 2011 15:19, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Is this a particular IE version? Do you know if it works with 7 and 8? I have no easy way of testing it. have you upgraded the jquery version? I don't know which version the user was using but I have tested it on IE8

Re: [web2py] Re: Autocomplete widget on same table

2011-05-11 Thread Johann Spies
On 9 May 2011 15:16, Massimo Di Pierro massimo.dipie...@gmail.com wrote: The widget take as argument the table itself which is not yet defined. you have to do it in two steps: db.define_table('doccenter', Field('doc_nr', type='string', length=50,

Re: [web2py] Can't migrate on Postgres

2011-05-10 Thread Johann Spies
On 10 May 2011 05:04, pbreit pbreitenb...@gmail.com wrote: I can't seem to get any of my model changes to migrate to Postgres. I've tried various combinations of turning migrate and fake_migrate on and off. Deleting and re-adding Fields(). I'm not sure what else to try or where to look. I

Re: [web2py] Re: Autocomplete widget on same table

2011-05-10 Thread Johann Spies
Thanks. That helps. 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.

[web2py] Autocomplete widget on same table

2011-05-09 Thread Johann Spies
I get a KeyError: 'doccenter' when I add an autocomplete widget in the following situation: db.define_table('doccenter', Field('doc_nr', type='string', length=50, requires=IS_NOT_IN_DB(db, 'doccenter.doc_nr'), widget =SQLFORM.widgets.autocomplete(

Re: [web2py] strange problem connecting to the database - help!

2011-05-09 Thread Johann Spies
please help!! any suggestion will be very appreciated! Have you checked whether the Postgresql-server accepts your connections? Test it with psql with the same database, user and password you have used in Web2py. Regards Johann -- May grace and peace be yours in abundance through the full

Re: [web2py] export results from plugin_jqgrid

2011-04-28 Thread Johann Spies
Hallo Neveen, On 26 April 2011 17:48, Neveen Adel nevo.a...@gmail.com wrote: Hello, Is there a way to export the data resulting in plugin_jqgrid? What I normally do is: In my controller: def list_data(): data=plugin_wiki.widget('jqgrid', table='joernaal', col_width=130, width= 1000)

[web2py] Passing data to jquery

2011-04-20 Thread Johann Spies
I am fairly new to javascript programming. Using the following function I can draw a graph in javascript as long as the type is some numeric type: jQuery(document).ready(function() { $.jqplot.config.enablePlugins = true; // on the page before plot creation. line1={{=data}} $.jqplot('wys',

Re: [web2py] Re: Passing data to jquery

2011-04-20 Thread Johann Spies
On 20 April 2011 11:22, Arun K.Rajeevan the1.a...@gmail.com wrote: can't you just send integer data from server instead of strings? ie., do type conversion at server side. by the way, parseInt(''1979') will return 1979 in Javascript. So you may like to write a custom function to do the

Re: [web2py] Re: IntegrityError: duplicate key value violates unique constraint x_uuid_key

2011-04-16 Thread Johann Spies
On 15 April 2011 15:18, Massimo Di Pierro massimo.dipie...@gmail.comwrote: You are passing a uuid, not a uuid function therefore it is always the same value: try replace default=uuid.uuid4() with default=uuid.uuid4 or default=lambda:uuid.uuid4() or default=lambda:str(uuid.uuid4())

Re: [web2py] Unable to create DAL connection to PostgreSQL on WebFaction

2011-04-16 Thread Johann Spies
On 16 April 2011 21:15, Dave dlawre...@focusedconcepts.com wrote: I am building my website using web2py on WebFaction. I have a PostgreSQL database on WebFaction called dlawrence_test1. When I attempt to create a connection to that database using the web2py shell as described in the manual,

Re: [web2py] Re: db.xx[0] = dict( a = 'b') against db.xx.insert(a = 'b')

2011-04-15 Thread Johann Spies
On 14 April 2011 15:52, Anthony abasta...@gmail.com wrote: Try recnr = db.xx.insert(**x) The **x will expand your dictionary into a set of keyword arguments. Thanks Anthony. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our

Re: [web2py] Re: Implementing id = uuid.uuid4() on an existing database

2011-04-15 Thread Johann Spies
On 14 April 2011 18:26, howesc how...@umich.edu wrote: Johann, the steps as i see it: - add new uuid field for your new primary key, don't drop old one yet - fill in the uuid field - add a new foreign key field that will store UUID - use the old foreign key to lookup the uuid of the

[web2py] IntegrityError: duplicate key value violates unique constraint x_uuid_key

2011-04-15 Thread Johann Spies
Please help me to understand how to use uuid. db.define_table('x', Field('uuid', length=64, default=uuid.uuid4(), notnull=True, writable=False, unique=True, ondelete='CASCADE'), Field('a'), Field('b')) In [4]: db.x[0] =

Re: [web2py] Re: Reutilizing/Extending web2py admin panel

2011-04-14 Thread Johann Spies
On 14 April 2011 00:15, Massimo Di Pierro massimo.dipie...@gmail.comwrote: I am sorry I still do not understand which part of admin would be useful at the app level. One example of something useful would be the appadmin interface. Regards Johann -- May grace and peace be yours in

[web2py] Implementing id = uuid.uuid4() on an existing database

2011-04-14 Thread Johann Spies
I want to syncrhonize a database to another computer using the method indicated in the book ( http://web2py.com/book/default/chapter/06?search=sync#CSV-and-Remote-Database-Synchronization). Unfortunately the database was not designed from the beginning to use uuid. Is it possible to modify the

[web2py] NameError: name 'uuid' is not defined

2011-04-14 Thread Johann Spies
Why do I get this error? The code causing this error: from uuid import uuid4 signature = db.Table(db, 'signature', Field('uuid', length=64, default=uuid.uuid4(), notnull=True, writable=False, unique=True), Field('created_on',

[web2py] Re: NameError: name 'uuid' is not defined

2011-04-14 Thread Johann Spies
Apologies for a stupid question. On 14 April 2011 10:53, Johann Spies johann.sp...@gmail.com wrote: Why do I get this error? The code causing this error: from uuid import uuid4 Should have been import uuid Regards Johann -- May grace and peace be yours in abundance through the full

[web2py] db.xx[0] = dict( a = 'b') against db.xx.insert(a = 'b')

2011-04-14 Thread Johann Spies
I want to insert a dictionary into a table and work the resulting id. The following illustrates my problem: db.define_table('xx', Field('a'), Field('b')) x = {} x['a'] = 'abcd' x['b'] = 'dbcs' db.xx[0] = x # Success but how do I get the id? This should be equivalent to

Re: [web2py] extra text in forms

2011-04-11 Thread Johann Spies
On 10 April 2011 23:42, niknok nikolai...@gmail.com wrote: This might sound too basic, but I couldn't find out how to display extra text in across the width of the whole form table. Right now, I do it this way (which only displays in the input column) but I wonder what's the web2py way?

[web2py] crud.create and SQLFORM: different behaviour

2011-04-08 Thread Johann Spies
I have two controllers using the same table. One for the logged in user to register for a course and the other for the administrator to register a user for a course overriding the 'writable=False in the model: The model has: db.define_table('t_registration_form', Field('f_attendee',

Re: [web2py] Re: crud.create and SQLFORM: different behaviour

2011-04-08 Thread Johann Spies
On 8 April 2011 12:56, DenesL denes1...@yahoo.ca wrote: What do you have in the form.accepts?. Nothing. I have tried: if form.accepts(request http://web2py.com/book/default/docstring/request.vars, session http://web2py.com/book/default/docstring/session): session

Re: [web2py] .represent = ... in left join

2011-04-06 Thread Johann Spies
On 5 April 2011 15:51, Richard Vézina ml.richard.vez...@gmail.com wrote: About zero option, search in page for zero : http://www.web2py.com/book/default/chapter/07 http://www.web2py.com/book/default/chapter/07There is some explanation near IS_IN_SET... Thanks. I found it. Johann --

Re: [web2py] Set a flag instead of deleting records permanently

2011-04-06 Thread Johann Spies
Have a look at http://groups.google.com/group/web2py/browse_thread/thread/cdee8f96c654ead0?pli=1 which might be exactly what you want. 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

Re: [web2py] .represent = ... in left join

2011-04-05 Thread Johann Spies
On 4 April 2011 16:11, Richard Vézina ml.richard.vez...@gmail.com wrote: Are course_week1 and course_week2 not null?? No. If not you need ...requires=IS_NULL_OR(IS_IN_DB(your requires) and in ...represent= you should use zero option (see book about that) or something like that :

Re: [web2py] .represent = ... in left join

2011-04-05 Thread Johann Spies
On 5 April 2011 09:16, Johann Spies johann.sp...@gmail.com wrote: Thanks! That solved the problem. I could not find something in the book about a 'zero option' though. Now .represent works on the screen but not in the CSV-output. I have used: {{ import cStringIO stream=cStringIO.StringIO

[web2py] .represent = ... in left join

2011-04-04 Thread Johann Spies
I want to get a proper representation of a field in the result of a left join but am struggling to do so. Here is a simplified version of the problem. db.define_table('courses', Field('week','integer', requires=IS_IN_SET([1,2]), widget =

Re: [web2py] Re: clean database

2011-03-31 Thread Johann Spies
On 29 March 2011 15:13, LightOfMooN vladsale...@yandex.ru wrote: Yes, thanks, it's good. But first question stills opened: Is there a way to pack just app code? (to *.w2p) I think if you use sqlite as database, it is included but when you use something like PostgreSQL or MySQL the data will

[web2py] Adjusting the width of the textarea

2011-03-11 Thread Johann Spies
I want to change the width of certain input fields for the type 'text' in a form. I have tried this but it did not have any effect: style type=text/css textarea { width: 100px; } /style The defined width in base.css is

Re: [web2py] Adjusting the width of the textarea

2011-03-11 Thread Johann Spies
On 11 March 2011 15:32, Martín Mulone mulone.mar...@gmail.com wrote: Fijate que no tengas en layout.html esta linea o algo por el estilo alguna vez la vi. scriptjQuery(document).ready(function(){jQuery('textarea').css('width','600px').css('height','400px')});/script You are a star!

[web2py] javascript/jquery advice

2011-03-10 Thread Johann Spies
I am starting to learn javascript and am thinking of using more jquery and jquery UI and ajax elements in my applications and would appreciate on how to approach it: 1. Starting with javascript tutorials (e.g. from developer.mozilla.org) and move on to jquery tutorials and later on to how

[web2py] NameError: global name 'db' is not defined

2011-03-07 Thread Johann Spies
I want to run a script in the commandline shell to insert records into the database, but have a problem handling the namespace. When I try to run it with the '%run' option or do a 'from script import *' makes no difference: I get the namespace error in the subject line:

Re: [web2py] Re: NameError: global name 'db' is not defined

2011-03-07 Thread Johann Spies
On 8 March 2011 01:12, Massimo Di Pierro massimo.dipie...@gmail.com wrote: python web2py.py -M -N -S kb -R script.py Thanks! 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

[web2py] From .represent to csv: is this possible?

2011-03-04 Thread Johann Spies
I have a generic 'show_data' function in my controller using the .represent functions in the models to show linked fields correctly. The clients wants the same now in the csv-downloads from the same data shown by show_data. There are many tables involved - it might be more than 20 and I do not

Re: [web2py] From .represent to csv: is this possible?

2011-03-04 Thread Johann Spies
Hallo Richard, Don't know if it will help : import csv db.export_to_csv_file(open('/home/YOU/Bureau/export_csv_with_represent.csv', 'w'), represent=True, # this bring your representation into the CSV... delimiter='|', quotechar='', quoting=csv.QOUTE_NONNUMERIC) Thanks. I

Re: [web2py] static subdirectories

2011-03-02 Thread Johann Spies
Hallo Jonathan, On 2 March 2011 01:42, Jonathan Lundell jlund...@pobox.com wrote: On Feb 17, 2011, at 10:37 AM, Johann Spies wrote: src=/kb/static/DSC_1403.png (I moved the image from /kb/static/images to /kb/static - now it works. I would still like to know how to get imgages in static

Re: [web2py] static subdirectories

2011-03-02 Thread Johann Spies
On 3 March 2011 08:39, Jonathan Lundell jlund...@pobox.com wrote: The fix (until the next version, anyway) is to change calls like URL('static/image', 'file') to URL('static', 'image/file'). The reason is that 'static' is treated as the name of the controller directory, and 'static/image'

Re: [web2py] Re: new URL router use cases

2011-02-22 Thread Johann Spies
On 17 February 2011 21:33, Jonathan Lundell jlund...@pobox.com wrote: On Feb 17, 2011, at 10:37 AM, Johann Spies wrote: What are the actual URLs for the images in question? As they appear in the page source at the browser, I mean. src=/kb/static/DSC_1403.png (I moved the image from /kb

Re: [web2py] Re: new URL router use cases

2011-02-17 Thread Johann Spies
On 17 February 2011 08:02, Jonathan Lundell jlund...@pobox.com wrote: On Feb 16, 2011, at 9:49 PM, cjrh wrote: On Feb 16, 11:38 pm, Jonathan Lundell jlund...@pobox.com wrote: [I'm reposting this message from a while back, because the new release 1.92.1 contains it for the first time. It

Re: [web2py] Re: new URL router use cases

2011-02-17 Thread Johann Spies
No, this is a special case for favicon.ico and robots.txt By root_static (which I agree is a little confusing), we mean static files like favicon.ico that are always accessed in the server root. This is simply a list of those files (and the default list should normally be all you need) that

Re: [web2py] Re: jqgrid-problem

2011-02-16 Thread Johann Spies
On 15 February 2011 16:35, Massimo Di Pierro massimo.dipie...@gmail.comwrote: check with firebug. It is possible the ajax requests of jqgrid are failing. This could be because on your deployment you are using routes. I am indeed using routes on the deployment server! Thanks. Do I need to

Re: [web2py] Re: tip of the day. The power of routes

2011-02-16 Thread Johann Spies
On 29 November 2010 01:03, Bruno Rocha rochacbr...@gmail.com wrote: HI, I am trying to use autoroutes for the firsttime, what I want is my site running in 127.0.0.1:8080/index instead of 127.0.0.1/app/default/index. I tried the autoroutes and routes.conf explained here but i did't figure out

Re: [web2py] Re: jqgrid-problem

2011-02-16 Thread Johann Spies
On 16 February 2011 16:32, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Please check with firebug what the ajax call does and how it fails. Without that information I cannot say. I am afraid I am a bit lost on this one. I have never programmed Ajax before and have no clue what Firebug

Re: [web2py] Re: tip of the day. The power of routes

2011-02-16 Thread Johann Spies
On 16 February 2011 17:35, Bruno Rocha rochacbr...@gmail.com wrote: Thats my working solution http://snipt.net/rochacbruno/routespy/ http://snipt.net/rochacbruno/routesconf/ Thanks. It is about the same as mine. I was just wondering whether my jqgrid-problem (another thread) on my

[web2py] jqgrid-problem

2011-02-15 Thread Johann Spies
On my develop computer it works as expected. On the production server the jqgrid's all show empty grids. It is not a case of the user not being logged in as was mentioned in another thread about jqgrid. Normally when I get this type of behaviour I test the rest of the function by using an

Re: [web2py] Re: error occurs when use executesql

2011-02-15 Thread Johann Spies
On 15 February 2011 08:49, hywang why00...@163.com wrote: Please help to run it :-) # File Name: default.py def index(): db.define_table(pymysql,Field(content,text),migrate=True) content = 'http://img1.t.sinajs.cn/t3/style/css/common/ layer.css' #content = this sentence is no

[web2py] .represent not representing

2011-02-12 Thread Johann Spies
I get the following output : inwoner.idinwoner.vaninwoner.adres1Spies1 the following code: db.define_table('adres', Field('straat')) db.define_table('inwoner', Field('van'), Field('adres', db.adres, requires =

[web2py] Updating computed fields

2011-02-07 Thread Johann Spies
If I have a table and add a computed field - how do I update existing records? I am speaking of tables with many thousands of records. 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

Re: [web2py] Updating computed fields

2011-02-07 Thread Johann Spies
Thanks! 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.

[web2py] Database design challenge

2011-02-04 Thread Johann Spies
I would like to invite web2py users who enjoy such challenges to think with me about solving the following problem: Take two tables: db.define_table('article', Field(author_id, 'list:reference outeur'), Field(title)) db.define_table('author',

Re: [web2py] Re: powertable problem

2011-02-04 Thread Johann Spies
On 4 February 2011 11:50, ceriox cer...@gmail.com wrote: another questions... how can manage parameters in function call ? details={'detailscallback':URL('myfunction.load')} ) i want to have my row id in myfunction You can specify the sql-query in myfunction. I

[web2py] order by surname, name

2011-02-03 Thread Johann Spies
According to the book the syntax to create an 'order by' query is db(query).select(ALL,orderby=field). What if I want to use more than one field in the 'order by' ? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His

Re: [web2py] Re: order by surname, name

2011-02-03 Thread Johann Spies
On 3 February 2011 16:49, Marin Pranjic marin.pran...@gmail.com wrote: + you can use ~ to reverse order. http://web2py.com/book/default/chapter/06#orderby,-groupby,-limitby,-distinct On Thu, Feb 3, 2011 at 2:21 PM, dederocks dediro...@gmail.com wrote: Hi Johann, Just use |:

Re: [web2py] powerTable.extrajs question

2011-02-01 Thread Johann Spies
Thanks. It helped a bit. I see I had to use table.extra and not table.extrajs as in the example I followed. But my problems are not over :( My controller: def pwrtable(): Generiese definisie vir plugin: powertable. powerTable = plugins.powerTable

Re: [web2py] powerTable.extrajs question

2011-02-01 Thread Johann Spies
Apologies, I sent the email before it was completed. It seems that only on artikel.id == 1 the function (skrywerdetails) is called. The print lines in that function print only the following content: Storage {'dt_1': 'artikel.id.1', 'dtcols_1': ''} (request.vars) 1 (art_id) For all other rows

Re: [web2py] powerTable.extrajs question

2011-02-01 Thread Johann Spies
On 1 February 2011 13:17, rochacbruno rochacbr...@gmail.com wrote: The problem is in art_id = request.vars['dt_1'].split('.')[-1] For the first row it will be called dt_1 but for the second it will be dt_2 and so on. Thanks. Now I am beginning to understand your logic. The following is

[web2py] Case-insensitive autocomplete?

2011-02-01 Thread Johann Spies
How is it possible to get a case-insensitive autocomplete? Having a database where there are inconsistencies in a field it will help a lot if autocomplete can be told to work case-insensitive. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of

[web2py] Uncaught RangeError: Maximum call stack size exceeded

2011-01-31 Thread Johann Spies
I get the error in the subject. Is this a bug? If not, what is causing it and how can I correct the problem? 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

[web2py] powerTable.extrajs question

2011-01-31 Thread Johann Spies
I am trying to get PowerTable to show referenced records (like that in the PowerTable-examples (category - products) but I could so far not get that working (Is there other documentation available?). I have used this powerTable.extrajs = dict(autoresize={},

Re: [web2py] Re: Uncaught RangeError: Maximum call stack size exceeded

2011-01-31 Thread Johann Spies
Hallo Massimo, On 31 January 2011 16:23, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Never seen it before. What code/condition causes it? I have experimented and have determined that the following model definition is related: Field(outeur_id, 'list:reference outeur'), # (see my

Re: [web2py] Re: Uncaught RangeError: Maximum call stack size exceeded

2011-01-31 Thread Johann Spies
On 31 January 2011 21:52, Anthony abasta...@gmail.com wrote: Is that a Python error code? When I Google that error, all the references I see are to Javascript errors in particular browsers. Could the problem be on the client side? I think you are on the right track. The error message

Re: [web2py] Re: Speeding up IS_IN_DB

2011-01-30 Thread Johann Spies
On 28 January 2011 19:54, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Something else is wrong. If you have requires=[...] it should not query the db for the possible references and it should not make the dropdown. Can we see the entire model? I have posted the model for this table

Re: [web2py] Re: Speeding up IS_IN_DB

2011-01-30 Thread Johann Spies
Maybe this is related - I have not noticed it before: In the terminal from where I started web2py the following appeared: Uncaught RangeError: Maximum call stack size exceeded Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord!

[web2py] Speeding up IS_IN_DB

2011-01-28 Thread Johann Spies
I have a lot of foreign keys in a database of which some tables have more than 30 records. What is happening is that if a link to add a record is selected it takes a long time before the form appears because all the cross referencess in the IS_IN_DB-dropdowns have to be assembled. How do I

Re: [web2py] Speeding up IS_IN_DB

2011-01-28 Thread Johann Spies
On 28 January 2011 13:30, Lucas D'Avila lucass...@gmail.com wrote: Hi ! You can be more specific? have any suggestions to improve this? OK. For the following model, calling DAL.create it takes 65 seconds to open the form using web2py's own webserver and 35 seconds when using Apache + WSGI.

Re: [web2py] Speeding up IS_IN_DB

2011-01-28 Thread Johann Spies
On 28 January 2011 14:09, Alexandre Andrade alexandrema...@gmail.comwrote: I think you need manually create index(es) in the database. I did create indexes although I do not think it should be necessary for id-fields in the light of the following quote from Postgresql documentation:

<    4   5   6   7   8   9   10   11   12   >