[web2py] Multiline labels for fields in SQLForm

2010-06-13 Thread Johann Spies
I would like to have multiline labels for fields in input forms. Is it possible to use SQLForm to produce that or should I do by hand using FORM? Regards Johann -- "Finally, brethren, whatsoever things are true, whatsoever things are honest, whatsoever things are just, whatsoever things are p

Re: [web2py] Re: Multiline labels for fields in SQLForm

2010-06-14 Thread Johann Spies
On 14 June 2010 14:17, mdipierro wrote: > label=SPAN('line1',BR(),'line2') Thanks! Johann -- "Finally, brethren, whatsoever things are true, whatsoever things are honest, whatsoever things are just, whatsoever things are pure, whatsoever things are lovely, whatsoever things are of good repor

[web2py] Radio buttons and check boxes orientation

2010-06-16 Thread Johann Spies
How do I get radio buttons (and check boxes) to show up horizontally in stead of vertically? e.g. Yes {}No {} in stead of Yes {} No {} Regards Johann -- "Finally, brethren, whatsoever things are true, whatsoever things are honest, whatsoever things are just, whatsoever things are pu

Re: [web2py] Re: Radio buttons and check boxes orientation

2010-06-16 Thread Johann Spies
On 16 June 2010 16:44, weheh wrote: > Find out the id or class of the radio buttons. Use firebug to see, or > look at the "CSS Conventions" section of the doc. You may need to > resort to a custom form, but I doubt it. Then set the css attribute: > display: inline; should probably do it. You may n

Re: [web2py] Re: Radio buttons and check boxes orientation

2010-06-18 Thread Johann Spies
Thanks MrFreeze and Hywang! Regards Johann -- "Finally, brethren, whatsoever things are true, whatsoever things are honest, whatsoever things are just, whatsoever things are pure, whatsoever things are lovely, whatsoever things are of good report; if there be any virtue, and if there be any pra

[web2py] Forms partly filled with data from tables.

2010-06-25 Thread Johann Spies
I suppose I will have to find a way to combine SQLTable and SQLForm :) Example Table A: Surname | Name | School | someotherdata... a | b|c| ... d | e |f | ... These people attend courses. Another table (say B) contai

[web2py] A few questions about jqgrid

2010-07-05 Thread Johann Spies
I am a javascipt and jquery novice and would appreciate some information to help me understand how to use a jqgrid-plugin. My questions are overlapping in some cases. 1. How does jqgrid communicate with the backend database? 2. Do I have to put special mechanisms in place to make sure that change

Re: [web2py] Re: A few questions about jqgrid

2010-07-05 Thread Johann Spies
On 6 July 2010 00:56, mdipierro wrote: > At this time jqgrid only communicates (via ajax) when you change page. > The web2py plugin does not support in-place edit even if jqgrid does. > > You can find lots of examples in this app. This is a nice app > developed by the book with the plugin. > > htt

Re: [web2py] Re: is_in_set hoirzontal radio widget and is_empty as default

2010-07-08 Thread Johann Spies
On 1 July 2010 14:08, mdipierro wrote: > There isn't. Look at the code for the widget in > gluon.sqlhtml.RadioWidget it should not be too difficult to allow > multicolumn. It has been done for gluon.sqlhtml.CheckboxWidget I found a solution after a similar question in this thread https://mail.goo

Re: [web2py] Re: Possible addition to IS_IN_DB

2010-07-09 Thread Johann Spies
I have a related query. > On Jul 9, 12:35 am, David Marko wrote: >> You can use full DAL query in IS_IN_DB validator e.g. >> IS_IN_DB(db(db.children.sex=='M'),'children.id','%(name)s' ) I want the result of IS_IN_DB to be part of my access control measures and dependent on who is logged in and w

Re: [web2py] Re: Possible addition to IS_IN_DB

2010-07-09 Thread Johann Spies
> You only use ajax if the option of field2 depend o selection for > field1 and you always end up with usability problems when field1 and 2 > are in the same form (because of the ajax delay). > > If the options depend on the logged in user it can be done without > ajax. How depends on details. >

[web2py] Help in getting csv-download to work

2010-07-10 Thread Johann Spies
I would appreciate help to get csv-download to work please. The following in my controller: def search_filled_in_forms(): sp = request.vars.sp form_id = request.vars.form_id.lower() title = request.vars.title.lower() date = request.vars.date query = (db.evaluation_form.service

Re: [web2py] Re: Help in getting csv-download to work

2010-07-12 Thread Johann Spies
On 11 July 2010 00:32, mdipierro wrote: > I think > > Download as csv- > file I still get "NameError: name 'rows' is not defined" I have also tried adding ",args=request.vars" to the above url, but it made no difference. So how do I tell the csv-view about 'rows'? Regards Johann -- "Finall

[web2py] csv: a showstopper for me. Is there another way?

2010-07-12 Thread Johann Spies
I could after several months not advance further than the "animals" example in the manual in using csv for downloads. Several questions and help from members on this list did not help me to achieve a single csv download in the following scenario: * user uses a form to define a selection *

Re: [web2py] Re: Help in getting csv-download to work

2010-07-12 Thread Johann Spies
On 12 July 2010 21:36, mdipierro wrote: >  ...evaluation_data.csv... calls evaluation_data action does not > define "rows" but the view evaluation_data.csv contains: > > rows.export_to_csv_file(stream) So why does it complain the name 'row' does was not defined? I am sorry but I do not understa

Re: [web2py] Re: csv: a showstopper for me. Is there another way?

2010-07-12 Thread Johann Spies
Thanks Massimo, I think I am beginning understanding a bit better. Please take your example further and show the result on the screen in a normal html-view on which there is a link to download the stuff to csv-file like in the appadmin-interface. Say rows = db(query).select()) normally I would r

Re: [web2py] Re: csv: a showstopper for me. Is there another way?

2010-07-12 Thread Johann Spies
Thanks! This helped me a lot! >>     link = >> A('download',_href=URL(r=request,f='animals.html',vars=request.vars)) >>     return dict(table=SQLTABLE(rows),link=link) I have changed the 'html' in the link above to .csv and have it working now. More important, some of what was mysteries in the

Re: [web2py] Re: Help in getting csv-download to work

2010-07-13 Thread Johann Spies
On 13 July 2010 00:07, mdipierro wrote: > This your actions > > def evaluation_data(): ... >    if form.accepts(request.vars, session): >        redirect(URL(r=request, > f='search_filled_in_forms',vars=request.vars)) > > IT DOES NOT DEFINE rows Correct, it was defined in the redirected funct

[web2py] Web2py and w3validator

2010-07-20 Thread Johann Spies
I am not an experienced web developer but I have always valued the output from validator.w3.org. After being disappointed with the output I received when validating a web2py app I built, I checked out http://www.web2py.com and it reported even more errors: http://validator.w3.org/check?uri=http%3

[web2py] Web2py and w3validator

2010-07-20 Thread Johann Spies
I am not an experienced web developer but I have always valued the output from validator.w3.org. After being disappointed with the output I received when validating a web2py app I built, I checked out http://www.web2py.com and it reported even more errors: http://validator.w3.org/check?uri=http%3

[web2py] jqgrid plugin: Search function?

2010-07-24 Thread Johann Spies
Massimo wrote in another thread: " The jqGrid widget has a button in bottom-left corner that opens a popup search box. It is less user-friendly than datatable but allows more precise construction of search criteria and works via ajax, i.e. with arbitrary large amount of data. " I have played with

Re: [web2py] Re: book revision

2010-07-24 Thread Johann Spies
Enough information for total javascript beginners to understand and use jqgrid and friends please. Johann -- "Finally, brethren, whatsoever things are true,  whatsoever things are honest, whatsoever things are  just, whatsoever things are pure, whatsoever things are lovely, whatsoever things are

Re: [web2py] Re: book revision

2010-07-26 Thread Johann Spies
On 25 July 2010 00:54, Garrafa Pet 2 Litros wrote: > I think it's good to review the section 3.9 that discusses the wiki > and add documentation of new features found in the plugin wiki. +1 Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall

[web2py] keepvalues per field?

2010-07-26 Thread Johann Spies
Is there a way to do the "keepvalues" thing per field? I have forms which have up to 40 fields. Datacapturers will have to enter of forms of which the first 5-7 fields will be identical for the batch. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth,

Re: [web2py] Re: keepvalues per field?

2010-07-26 Thread Johann Spies
Fantastic. Thanks. Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

[web2py] How to get web2py to use https for logins and registration

2010-07-28 Thread Johann Spies
How do I setup web2py to use https for all authentications and user registration but normal http for the rest of the url's? Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

Re: [web2py] Re: keepvalues per field?

2010-07-30 Thread Johann Spies
On 26 July 2010 13:44, mdipierro wrote: > You can use > > db.table.field.default=previous_form.vars.field > > to propagate the values forward.. Where do I do this? I suppose the controller is the correct place, but do I do it in the same environment where I would use keepvalues? I don't want th

[web2py] auth_membership problem

2010-07-31 Thread Johann Spies
I am using Web2py Version 1.81.5 (2010-07-22 23:56:21). In user_auth I use "username". I am trying to setup access control measures. When I try to add a record to the auth_membership table using appadmin, I get the following ticket: Traceback (most recent call last): File "/Users/js/Programm

Re: [web2py] Re: auth_membership problem

2010-08-01 Thread Johann Spies
On 1 August 2010 04:21, mdipierro wrote: > Can I see your model from gluon.tools import * auth=Auth(globals(),db) # authentication/authorization crud=Crud(globals(),db) # for CRUD helpers using auth service=Service(globals()) # for json, xml, jsonrpc, xmlrpc, a

[web2py] Conditional menu

2010-08-09 Thread Johann Spies
I see Cube2py does it but I can' t figure out how. I have the following in my menu: [T('Login'), False, URL(request.application,'default','user'), []], [T('Logout'), False, URL(request.application,'default','user/logout'), []], I want only 'Login' or ' Logout' to be visible de

Re: [web2py] Re: Conditional menu

2010-08-09 Thread Johann Spies
Thanks! Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

Re: [web2py] Re: Conditional menu

2010-08-10 Thread Johann Spies
Thanks. That is useful. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

[web2py] form - redirect - where are the variables?

2010-02-08 Thread Johann Spies
I want to use a form to build a query for a search function and do not understand the communication between the different functions. I have: def index(): form = FORM(TABLE(TR('Field:','', SELECT( OPTION('title', _field = 1),

Re: [web2py] Re: form - redirect - where are the variables?

2010-02-08 Thread Johann Spies
> You have a few problems, fixed below hopefully Thanks Massimo! Regards Johann -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2p

Re: [web2py] Re: form - redirect - where are the variables?

2010-02-09 Thread Johann Spies
Your corrections helped me to understand the handling or the request vars better but I still have the original problem: Traceback (most recent call last): File "/home/js/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/js/web2py/applications/nuwesa

[web2py] Login mutliple times?

2010-02-09 Thread Johann Spies
I have a website where some documents require login to be accessed. Some of the visitors to the site complained of having to login multiple times and today, when I did not access the site as administrator, I experienced the same: Log in at first and then when I access the document, I was again ask

Re: [web2py] Re: Login mutliple times?

2010-02-09 Thread Johann Spies
On 9 February 2010 21:14, Dmitri Zagidulin wrote: > Several questions. Are you storing sessions on disk, or in a database? I do not clearly understand what you mean by "storing sessions". I use sqlite as database. > > What's the decorator you're using, to require login? (is it > @auth.requires_

Re: [web2py] Re: Login mutliple times?

2010-02-09 Thread Johann Spies
I think I found the problem: it only happened when I accessed a html-page that was in /private/static. I want to have login access to that file but putting it in private/static caused this problem of double login. Somehow the session seems to disappear. Moving it to /static made the problem (an

[web2py] def data() - problem

2010-02-11 Thread Johann Spies
When I use the "default/data/update" on an unchanged existing record I get the following error: Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/www-data/web2py/applications/nuwesarua/controll

Re: [web2py] Re: def data() - problem

2010-02-11 Thread Johann Spies
On 12 February 2010 08:06, mdipierro wrote: > what's the table definition? Your table seems to have a primary key > field set to ' '. db.define_table("sarua", Field("title", "text"), Field("affiliation", "text"), Field("country"), Fi

[web2py] Re: [web2py:19827] Re: WSGI, Apache2, and web2py NOT at root

2010-02-13 Thread Johann Spies
On 15 April 2009 18:30, Mark Larsen wrote: > > I did figure out a hack if anyone comes up against this problem: > > RewriteEngine on > RewriteRule ^/[NAMEOFAPP](.*)$ /web2py/[NAMEOFAPP]$1 [PT,L] > WSGIScriptAlias /web2py /opt/web2py/wsgihandler.py > > This essentially allows you to place web2py ou

[web2py] Example of apache2 configuration where web2py exists along other sites

2010-02-13 Thread Johann Spies
I am becoming desperate about this problem. I could so far not succeed to get web2py working behind apache where web2py is not root (e.g. the setup of the ubuntu-setup script). Is there somewhere an working example of a setup where web2py is working with wsgi alongside a php site behind apache2?

Re: [web2py] Example of apache2 configuration where web2py exists along other sites

2010-02-16 Thread Johann Spies
Thanks to everybody who replied. I was in a situation where I urgently had to make an app available to a customer. In this case I had access to dns-entries so I just created a virtual IP on the server interface and created a separate domain name for that IP. I suppose I could just have used a CN

[web2py] crud.read()

2010-02-16 Thread Johann Spies
How do I use crud.read() without gettting the admin request session response buttons at the bottom? Or should I use SQLFORM with readonly fields? I have Regards Johann -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group,

Re: [web2py] Re: crud.read()

2010-02-17 Thread Johann Spies
> You get "admin  request  session  response " because you did not > define a view so you have a generic one. You need a view Thanks. I could not understand that my view was ignored by web2py. After your email I checked again and found that I left out the 'default/' when I created it. Regards Jo

[web2py] Building dynamic queries

2010-03-05 Thread Johann Spies
I have a form where the customer can type one keyword on each of the five fields (the first field may not be empty). From these keywords I have to build a query that would use .like('%' keyword'%') search in at least two fields in the database. I am trying something like this: k1 = reque

Re: [web2py] Re: web2py beautification

2010-03-12 Thread Johann Spies
On 11 March 2010 06:11, villas wrote: > Obviously if anyone else thinks they have an idea to move towards a > well-tested div layout using a good naming scheme (preferably borrowed > from a mainstream project which already has some templates) then do > please mention it. I am only starting on we

Re: [web2py] Re: Building dynamic queries

2010-03-12 Thread Johann Spies
On 5 March 2010 23:03, Yarko Tymciurak wrote: > Does this seem "dense" to you?... > > If so, maybe this will make it readable: Thanks to both of you. I only started working recently in Python after a about 10 years of inactivity. This usage of 'reduce' is something new to me. From your explana

[web2py] Menu css

2010-03-16 Thread Johann Spies
I am struggling to find out exactly how the default web2py menu system uses the css. I want to change the background colour and the text colour of the menu. A pointer will be very helpful please. Regards Johann. -- "Blessed are the poor in spirit: for theirs is the kingdom of heaven..

Re: [web2py] Re: Menu css

2010-03-16 Thread Johann Spies
On 16 March 2010 21:43, mr.freeze wrote: > Look in base.css . Specifically: > for background color, change the background property on: 'ul.web2py- > menu' > for menu items, set a color on: 'ul.web2py-menu li a' > Thank you, mr Freeze. That helped me immediately. Regards Johann -- "Blesse

[web2py] Aligning subject fields using CRUD-display

2010-03-16 Thread Johann Spies
I have a model like this: db.define_table("policies_and_strategies", Field("country") , Field("policy_strategy_type") , Field("name_of_policy_strategy") , Field("brief_description_of_policy_strategy","text") , Field("

Re: [web2py] Re: Aligning subject fields using CRUD-display

2010-03-18 Thread Johann Spies
Thanks! Regards Johann -- "Blessed are the poor in spirit: for theirs is the kingdom of heaven...Blessed are they which do hunger and thirst after righteousness: for they shall be filled...Blessed are the pure in heart: for they shall see God." Matthe

[web2py] How to handle subqueries?

2010-03-22 Thread Johann Spies
My client wants to be able to select from a list of records (SQLTABLE) which records to output in a csv-file (or pdf). Is this possible to do that using SQLTABLE? Regards Johann -- "Blessed are the poor in spirit: for theirs is the kingdom of heaven...Blessed are they which do hunger

[web2py] Drop-down ticket

2010-03-27 Thread Johann Spies
The ticket: Traceback (most recent call last): File "/home/js/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/js/web2py/applications/sadec/controllers/appadmin.py", line 418, in File "/home/js/web2py/gluon/globals.py", line 96, in self._cal

Re: [web2py] Re: Drop-down ticket

2010-03-27 Thread Johann Spies
Thanks! Johann -- "Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning." James 1:17 -- You received this message because you are subscribed to th

[web2py] Local module problem

2010-04-03 Thread Johann Spies
I have this in my modules-file: def howmanyPages(total_found, items_per_page): if (total_found % items_per_page): pages = total_found / items_per_page else: pages = total_found / items_per_page -1 return(pages) def is_empty(u): if not u or u == "": return(N

Re: [web2py] Re: Local module problem

2010-04-03 Thread Johann Spies
On 3 April 2010 17:10, mdipierro wrote: > Because in the lambda is call somewhere inside web2py whete is_empty > is not in the scope. > > db.policies_and_strategies.url.represent = lambda value: > local.is_empty(value) == None  or A('url',_href=value) > > it is a python weirdness. You can fix it l

Re: [web2py] Re: Local module problem

2010-04-03 Thread Johann Spies
> On 3 April 2010 17:10, mdipierro wrote: >> Because in the lambda is call somewhere inside web2py whete is_empty >> is not in the scope. >> >> db.policies_and_strategies.url.represent = lambda value: >> local.is_empty(value) == None  or A('url',_href=value) >> >> it is a python weirdness. You can

[web2py] Building a query from a form

2010-04-05 Thread Johann Spies
Using this form: veld = ['affiliation', 'country','year','journal','author'] form = SQLFORM.factory( Field('k', label='Type in up to 5 keywords separated by ' '(spaces).',requires=IS_NOT_EMPTY()), Field('how', label='Search all or any of the keywords',default='all', requires

Re: [web2py] Re: Building a query from a form

2010-04-05 Thread Johann Spies
Thanks. Johann -- "Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning." James 1:17 -- You received this message because you are subscribed to t

Re: [web2py] Re: Building a query from a form

2010-04-05 Thread Johann Spies
query = query&(db.sarua[request.vars.refine.lower()].like('%'+request.vars.value.lower+ '%')) TypeError: cannot concatenate 'str' and 'builtin_function_or_method' objects :( Regards Johann -- "Every good gift and every perfect gift is from above, and cometh down from the Father

Re: [web2py] Re: Building a query from a form

2010-04-05 Thread Johann Spies
Thanks. I see this error was caused by my original typo. Johann. -- "Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning." James 1:17 -- You rec

Re: [web2py] Re: Trouble starting web2py

2010-04-08 Thread Johann Spies
I have exactly the same problem on Debian after I upgraded several packages this morning. I suppose Debian installed an uncompatible simplejson. Any solution yet? if not path in sys.path: sys.path.insert(0,path) os.chdir(path) did not help for me either. Regards Johann -- "Every goo

Re: [web2py] Re: Trouble starting web2py

2010-04-08 Thread Johann Spies
Removing Debian's python-simplejson helped me to start web2py again - and broke some other stuff on Debian. Regards Johann -- "Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turnin

Re: [web2py] Re: How to handle subqueries?

2010-04-08 Thread Johann Spies
> def csv(): >    import StringIO >    s=StringIO.StringIO() > > db(db.mytable.id.belongs(session.records)).select().export_to_csv_field(s) >    return s.getvalue() Thanks for your help. I could get the tickboxes working but not the csv-download. Only the headers were downloaded. In the end I a

[web2py] csv download: how to do it

2010-04-10 Thread Johann Spies
I do not understand the code in the manual and what I have seen on this list about csv-downloads. I don't have a problem to do csv-export from the commandline in a shell. I just cannot figure out how the examples I referred to work in a MVC -environment. Take for example this export function (ta

Re: [web2py] Re: csv download: how to do it

2010-04-10 Thread Johann Spies
Thanks for the explanation Yarko and Vasile. I will try it out and ask more if I don't succeed. Regards Johann -- "Finally, brethren, whatsoever things are true, whatsoever things are honest, whatsoever things are just, whatsoever things are pure, whatsoever thingsare lovely, whatsoev

Re: [web2py] Re: csv download: how to do it

2010-04-10 Thread Johann Spies
I have this in my view: Download as csv-file And this controller: def csv(): import cStringIO s=cStringIO.StringIO() response.headers['Content-Type']='application/vnd.ms-excel' db(request.vars.query).select(db.sarua.All,limitby(1,250)).export_to_csv_file(s) return s.getvalu

Re: [web2py] Re: csv download: how to do it

2010-04-10 Thread Johann Spies
On 11 April 2010 00:38, mdipierro wrote: > One thing I see is that > > > db(request.vars.query).select(db.sarua.All,limitby(1,250)).export_to_csv_file(s) > > should be > > > db(request.vars.query).select(db.sarua.ALL,limitby=(0,250)).export_to_csv_file(s) > Thanks. That was careless typing from

Re: [web2py] Re: csv download: how to do it

2010-04-11 Thread Johann Spies
Thanks Thaddeus. I am not winning (yet)! I have now: def csv(): import cStringIO s=cStringIO.StringIO() import gluon.conttenttype query = request.vars.query if not query: return None else: db(request.vars.query).select(db.sarua.ALL,limitby=(0,250)).expor

Re: [web2py] Re: csv download: how to do it

2010-04-11 Thread Johann Spies
With the help of firebug I determined that the problem was the link. I have changed the Controller to export the following: link=A('Download as csv',_href=URL(r=request,f='csv',args=query)) And that resulted in a " Invalid request" error. The url was: http://localhost:8000/sadec/default/csv/L

[web2py] css-question: centering footer

2010-04-21 Thread Johann Spies
Can somebody explain to me why the following does not cause the copyright notice to be centered? Copyright © 2009 - Powered by http://www.web2py.com";>web2py Regards Johann -- "Finally, brethren, whatsoever things are true, whatsoever things

Re: [web2py] css-question: centering footer

2010-04-21 Thread Johann Spies
Thanks Tim, > You shouldn't need the tags.  They only confuse the matter since you're > doing direct formatting. That was actually the line in the default web2py layout.html. I removed the and the text was centering ... Regards Johann -- "Finally, brethren, whatsoever things are true, what

Re: [web2py] How to change Web2py interface language

2010-04-22 Thread Johann Spies
On 22 April 2010 08:07, NoNoNo wrote: > I want to change the interface language to English. According to some > post, I change the language of Chrome browser to En, relaunched web2py > and it didn't work. Can anyone help me out? I just added Afrikaans to a page. The name af-af.py did not work for

[web2py] Web2py on Macbook

2010-04-24 Thread Johann Spies
I have two questions: one related to GAE and the other to Postgresql Coming from a Linux background I will in the next year or two use a Macbook Pro to develop web2py-stuff. I want to try out GAE but do not know how to get it going. According to the book the following should do it, but I get nowh

Re: [web2py] Re: Web2py on Macbook

2010-04-24 Thread Johann Spies
On 24 April 2010 16:06, mdipierro wrote: > I use a Mac and I am not the only one on the list. All video tutorials > on Vimeo are made with Mac. Including the one that explains how to > deploy on GAE. Thanks. I will watch it and try again. > > To use postgresql you must install it and must install

Re: [web2py] Re: Web2py on Macbook

2010-04-24 Thread Johann Spies
On 24 April 2010 19:02, annet wrote: > I have read this blog entry: > >> >http://blog.jonypawks.net/2008/06/20/installing-psycopg2-on-os-x/ > > I manually installed psycopg2 in Python's site-packages folder and > that works without problem, unless of course I overlooked some risk. > At this stage

Re: [web2py] Re: Web2py on Macbook

2010-04-24 Thread Johann Spies
On 24 April 2010 18:54, Julio wrote: > Quick Question Johann, does it have to be all on the Mac? > > I mean, for instance, in my setup, I have a VM (Fusion) running ubuntu > with a mere 512Mb RAM running on my iMac, I run web2py, psycopg2 and > MySQL flawlessly and I use the Mac to code and deploy

Re: [web2py] Re: Web2py on Macbook

2010-04-26 Thread Johann Spies
On 24 April 2010 16:06, mdipierro wrote: > I use a Mac and I am not the only one on the list. All video tutorials > on Vimeo are made with Mac. Including the one that explains how to > deploy on GAE. I have watched the video and made some progress but both on Linux and on my Macbook I get a ticke

[web2py] Custom validators and SQLForm

2010-04-26 Thread Johann Spies
The definition: db.define_table("navrae", Field("begindatum", "date", default=None), Field("einddatum", "date", default=None), Field("gebruiker", "string", length=8, notnull=True, default='NULL'), Field("ipadres", "string", length=15, notnull=True, default='NULL'), Field("datum

Re: [web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Johann Spies
Thanks Yarko, > Hope this makes some sense now: At least that some darkness about what is happening in the background was cleared up - but I still do not understand enough to solve my problem. > After you have digested this some,  have a look at > http://web2py.com/book/default/section/7/2?search

Re: [web2py] Re: Custom validators and SQLForm

2010-04-28 Thread Johann Spies
On 28 April 2010 13:42, Yarko Tymciurak wrote: > try using a debugger, and step thru to see what your values are, what > you logic is doing...  you should find that helpful. > > You can use winpdb; or you can grab an evaluation copy of WindIDE (I > find Wing easier to use) - but either will work.

Re: [web2py] Re: Custom validators and SQLForm - apology

2010-04-28 Thread Johann Spies
Yarko, >> You can use winpdb; or you can grab an evaluation copy of WindIDE (I >> find Wing easier to use) - but either will work. > > Debugging normal python is not a problem to me, but I don't know how > to debug Web2Py.  I don't use Windows and I don't know how to see the > process you describ

Re: [web2py] Re: Custom validators and SQLForm - apology

2010-04-29 Thread Johann Spies
Working with winpdb was a good learning exercise which helped me to understand more about the way web2py does things. However, it did not help me to get an answer to my question about custom validators. I could not determine where and how the builtin validators come into play and how to add to th

[web2py] list:reference problem?

2010-08-19 Thread Johann Spies
The model: db.define_table("gr01", Field("service_provider", db.service_provider, requires=IS_IN_DB(db,db.service_provider.id, '%(name)s')), Field("trainer",'list:reference db.trainer', requires=IS_IN_DB(db,db.trainer.id, '

Re: [web2py] Re: list:reference problem? (Solved)

2010-08-19 Thread Johann Spies
On 19 August 2010 21:47, Rob wrote: > just a guess, but: > requires=IS_IN_DB(db,db.service_provider.id, '%(name)s') > should be: > requires=IS_IN_DB(db,db.service_provider, '%(name)s') Thanks, but that is not what caused this specific probem. The problem was that I left out "multiple=True" which

Re: [web2py] Re: list:reference problem?

2010-08-19 Thread Johann Spies
On 19 August 2010 22:17, mdipierro wrote: > This is fixed in trunk. Which version of web2py are you using? Version 1.83.2 (2010-08-15 08:16:30) Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                

Re: [web2py] Re: list:reference problem?

2010-08-19 Thread Johann Spies
> Version 1.83.2 (2010-08-15 08:16:30) I think the problem was that I left out "multiple=True" Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

[web2py] jqgrid and edit-link

2010-08-24 Thread Johann Spies
I followed the example in the radiolog-example of using jqgrid but I am doing something wrong I suppose. Given the following model db.define_table("teacher", db.person, Field("highest_qualification"), Field("id_number",length=13), Fi

Re: [web2py] Re: jqgrid and edit-link

2010-08-25 Thread Johann Spies
> Are you using plugin_jqgrid. If so please use widget jqgrid from > plugin_wiki. I don't know how to do it. All the documentation refers to that usage within wiki pages. I am not using a wiki in this case. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man sow

Re: [web2py] Re: jqgrid and edit-link

2010-08-25 Thread Johann Spies
On 25 August 2010 22:51, mdipierro wrote: > {{=plugin_wiki.widget('jqgrid',table='tablename')}} > > the first argument is the widget name, the other named arguments are > the widgets attributes. Thanks. My first try did not work. I will have to read up on what "the other named arguments" are s

Re: [web2py] Re: jqgrid and edit-link

2010-08-26 Thread Johann Spies
On 26 August 2010 03:30, mdipierro wrote: > look into the plugin code modes/plugin_wiki.py models/plugin_wiki.py Thanks. That helped to see what is going on but: When I use teachers=plugin_jqgrid(db.teacher,columns=["id", "surname","name","highest_qualification","id_number","school", "gende

Re: [web2py] Re: jqgrid and edit-link

2010-08-26 Thread Johann Spies
With the datatable plugin I can use teachers=plugin_datatable(db(db.teacher.id>0).select(),_class='datatable') which works but is to wide and with column headers that looks ugly. db.teacher.id.represent = lambda id: SPAN(A('edit',_href=URL(r=request,c='default',f='edit_teacher',args=id))) works

Re: [web2py] Re: jqgrid and edit-link

2010-08-26 Thread Johann Spies
On 26 August 2010 21:08, mdipierro wrote: > datatable and jqgrid are different. > > datatable fetches all records at once (without ajax) that allows > arbitrary queries but does not work with large datasets. > > jqgrid fetches records via ajax. that allows only simple queries > (because they have

Re: [web2py] Re: jqgrid and edit-link

2010-08-26 Thread Johann Spies
Thanks. I am making progress. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatians 6:7

[web2py] Permissions on records

2010-08-28 Thread Johann Spies
A question about the example in the book (Authorization and CRUD: def give_create_permission(form): group_id = auth.id_group('user_%s' % auth.user.id) auth.add_permission(group_id, 'read', db.comment) etc... auth.settings.register_onaccept = give_create_permission crud.settings.auth = au

[web2py] Access Control problem: Locked out from my own tables

2010-08-28 Thread Johann Spies
While busy setting up permissions to forms and tables, suddenly I cannot access any of the forms neither as user who are member of the group with access rights to the form/table nor as administrator. I just get the message Not authorized ACCESS DENIED This happens even after removing the decorat

[web2py] Re: Access Control problem: Locked out from my own tables

2010-08-28 Thread Johann Spies
The problem was the setting: crud.settings.auth=auth which I have uncommented in the model. I am not sure why this made that all access to crud functions was blocked - even when a valid user was logged in. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man sow

[web2py] plugin_wiki: who is authorized?

2010-09-03 Thread Johann Spies
When trying http://localhost:8000/myapp/plugin_wiki I get an error message: Not authorized ACCESS DENIED Insufficient privileges. I see in the model for plugin_wiki: DEFAULT = { 'editor' : auth.user and auth.has_membership(role='editor') or auth.user_id==1, # if current user a editor?

Re: [web2py] Re: plugin_wiki: who is authorized?

2010-09-04 Thread Johann Spies
> can you check the value plugin_wiki_editor in the controller? Thanks. Changing the group 'editor' to 'plugin_wiki_editor' helped. Regards Johann --     "Be not deceived; God is not mocked: for whatsoever a      man soweth, that shall he also reap."                                   Galatian

  1   2   3   4   5   6   7   8   9   10   >