[web2py] convert field to multiple view values?

2010-06-04 Thread Keith
I'm new to web2py and the I did this previously was with javascript but I was hoping to avoid that this go around. In my database table I have a single field something like this below: db.define_table('foo', Field('height', 'double'), In the controller/view I need to be able to translate that

[web2py] FORM without db, how to get field name?

2010-09-21 Thread Keith
ut that doesn't give me the end result HTML I need. I really need to be able to call the field itself and field name as separate variables in the view. I know worst case I can manually create the HTML for the whole form but I'm trying to learn and figure out if this is possible first before I do that. Thanks for any help or pointers. -Keith

[web2py] Re: FORM without db, how to get field name?

2010-09-22 Thread Keith
om the above: Moderator Pw Room Name Id Attendee Pw I'm not sure if the first or second example is the better way to go but it's nice working through the features of web2py. Thanks again for the help, -Keith On Sep 21, 5:29 pm, mdipierro wrote

[web2py] Re: FORM without db, how to get field name?

2010-09-22 Thread Keith
{{if fieldname is not 'id':}} {{=form.custom.label[fieldname]}} {{=form.custom.widget[fieldname]}} {{pass}} {{pass}} {{=form.custom.submit}} {{=form.custom.end}} Thanks again for the help! -Keith On Sep 22, 10:22 am, mdipierro wrote: > that messes up ord

[web2py:23628] Circular References Redo

2009-06-08 Thread Keith
hree references in the table definition. I currently have SQLField('address.id') 3 times, which, obviously, won't work. Again, any suggestions? TIA Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[web2py:21557] Too many value to unpack

2009-05-09 Thread Keith
uild_set File "gluon/sql.py", line 1979, in select ValueError: too many values to unpack I thought 'upload' might be giving me the problem, so I changed it to blob, but that didn't work. Tried adding ID to the contact reference (db.contact.id), to no avail. I made sure the

[web2py:21569] Re: Too many value to unpack

2009-05-10 Thread Keith
ield names from the table being referenced. When I reduced the field count, everything worked fine. Thanks for your quick reply and for web2py. I've been able to get my head around it and make progress much faster than with other frameworks / cms's I've tried. Keith On May 10, 12:1

[web2py] Using LOAD from a controller?

2010-05-11 Thread Keith Edmunds
I was to display a form using Ajax in response to a click on a link on the page. I have tried putting this in the view: New todo with this in the controller: def new(): return = LOAD('todo','todo_form',ajax=True) def todo_form(): form = SQLFORM(db.tasks,fields=['priority','subject','d

Re: [web2py] Using LOAD from a controller?

2010-05-11 Thread Keith Edmunds
On Tue, 11 May 2010 21:16:45 +0100, k...@midnighthax.com said: > return = LOAD('todo','todo_form',ajax=True) Typo in my mail: that is actually return LOAD('todo','todo_form',ajax=True)

Re: [web2py] Re: Using LOAD from a controller?

2010-05-11 Thread Keith Edmunds
Sorry, Iceburg, I appreciate your attempt to help, but you've lost me completely! Can you explain? Thanks

Re: [web2py] Re: Using LOAD from a controller?

2010-05-13 Thread Keith Edmunds
. I'm going to monitor the list more and see if I can help others. Keith

[web2py] Using Ajax to display detail from a list

2010-04-01 Thread Keith Edmunds
What I want to do: have a list of items displayed; when one is clicked, more detail is shown (via an Ajax call) in a defined "detail area". Problem: the web2py ajax call takes three parameters: a controller action, one or more field ids, and a target DIV. My controller action needs to identify whi

[web2py] Authentication: form just refreshes, won't validate login

2010-04-10 Thread Keith Edmunds
I'm having a problem with authentication. This was working, but now when I enter email and password and click Submit, the form refreshes (removing the email and password) but doesn't authenticate. DB tables for user look good. What's the best way to debug this? Thanks for hints... -- To unsub

Re: [web2py] Re: Authentication: form just refreshes, won't validate login

2010-04-10 Thread Keith Edmunds
On Sat, 10 Apr 2010 15:35:05 -0700 (PDT), hamdy.a.fa...@inbox.com said: > This's most likely to happen if you've more than one form in the same > page so the question is , do you've another form inside the page ? Thanks for the suggestion, but I don't have any other forms there. I'm using the aut

Re: [web2py] Authentication: form just refreshes, won't validate login

2010-04-11 Thread Keith Edmunds
Problem solved. For the sake of others searching on this: some of the distribution files under applications/my_app were from an earlier version of web2py. -- To unsubscribe, reply using "remove me" as the subject.

[web2py] sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
t; SQL statement. It asks the database to make sure that values of this field are unique within the table." That doesn't appear to match the behaviour I'm seeing. Bug, feature, misunderstanding on my part? Thanks, Keith -- To unsubscribe, reply using "remove me" as the subject.

Re: [web2py] sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
" for instructions sqlite> create table mytable(text unique); sqlite> insert into mytable values("mystring"); sqlite> insert into mytable values("mystring"); SQL error: column text is not unique sqlite> Keith -- To unsubscribe, reply using "remove me" as the subject.

Re: [web2py] Re: sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
On Thu, 15 Apr 2010 13:56:19 -0700 (PDT), mdipie...@cs.depaul.edu said: > Is it possible you did not have unique=True when you created the table > and added that later? Yes, that is the case - thanks for clearing that up, much appreciated. Keith -- To unsubscribe, reply using "re

Re: [web2py] Re: sqlite and 'unique'

2010-04-15 Thread Keith Edmunds
On Thu, 15 Apr 2010 15:06:57 -0700 (PDT), mdipie...@cs.depaul.edu said: > Try on a fresh database it should work. I have, it did, thank you again. Perhaps a note in the V3 book about this? Keith -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

[web2py] Application logging

2010-04-17 Thread Keith Edmunds
What are others doing for application logging? I'm not referring to the HTTP logs, but program-generated logs. I've recently been looking at the Python 'logging' module, which I've not used before. I initiate logging from a file in the 'modules' directory which does this:

[web2py] Ajax from menu item?

2010-04-22 Thread Keith Edmunds
Does anyone have any sample code showing how to call the Web2py 'ajax' function from a menu? I currently have this as a link on a page, and I'd like to move it to a menu item: New Thanks -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

Re: [web2py] Ajax from menu item?

2010-04-23 Thread Keith Edmunds
Am I trying to do something stupid or impossible? > Does anyone have any sample code showing how to call the Web2py 'ajax' > function from a menu? I currently have this as a link on a page, and I'd > like to move it to a menu item: > > New -- |Keith Edmunds |T

Re: [web2py] Re: showing errors from loaded web2py components

2010-04-25 Thread Keith Edmunds
On Wed, 21 Apr 2010 16:59:04 +0200, kuba.kuchar...@gmail.com said: > Is it possible to have this as a trigger/checkbox in admin as an > OPTIONAL behaviour for all errors(not only LOAD components)? Seconded. Firebug is fine for those using Firefox, but not for the rest of us. -- Subscription s

Re: [web2py] Re: Application logging

2010-04-27 Thread Keith Edmunds
On Tue, 27 Apr 2010 09:31:50 -0700 (PDT), minkto...@gmail.com said: > I'd be interested in a step by step guide to setting up this kind of > logging. I found some older posts that helped in the end. I now have a modules/logging.py file that looks like: def _init_log(): """ From http://ar

[web2py] Silent errors

2010-04-27 Thread Keith Edmunds
I've just found a stupid programming error of mine. Code: task_rows = db(db.tasks.ref==request.vars.number).select() if len(task_rows): rows[0].update_record(status = request.vars.new)

Re: [web2py] Re: Application logging

2010-04-29 Thread Keith Edmunds
g files (which are logrotated independently). Massimo: I would have thought that application logging was an integral part of an enterprise application, much as authentication is, and should be in the scaffolding. It really isn't very big. Keith

Re: [web2py] Debugging with GAE and Eclipse/Aptana?

2010-05-01 Thread Keith Edmunds
I don't run web2py.py under the debugger. I just put the following where I want the first breakpoint: import pydb pydb.debugger() ...which drops into the debugger when encountered. No GUI, but I believe you can hook up DDD to pydb if you are so inclined. Whether that works on GAE or not, I don't

[web2py:28959] Version 1.66.1 on Windows XP

2009-08-19 Thread Keith Silva
;command prompt" window flashes open and close and the program doesn't start. I've gone back to version 1.66.0 and it runs as expected. I'm not stuck, but I thought I'd alert you to this possible problem. I am running version 1.66.1 on my Ubuntu machine

[web2py:11676] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread Keith Edmunds
(note: not my browser cache). I haven't looked into why, but it's the only site I have to do that with. Keith -- Keith Edmunds +-+ |Tiger Computing Ltd| Helping businesses make the most of Linux |

[web2py:11697] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread Keith Edmunds
On Tue, 11 Nov 2008 11:56:12 -0800 (PST), [EMAIL PROTECTED] said: > Can achipa or Keith or > anyone who gets the problem try storing the source locally (if they > can access it at all!) and see if they still get the problem? The problem (for me, at least) is NOT the page itself, bu

[web2py:18008] Deleted record returning

2009-03-13 Thread Keith Edmunds
an anyone explain what is going on? Thanks, Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe fro

[web2py:18082] Re: Deleted record returning

2009-03-15 Thread Keith Edmunds
Ignore this: it was a problem my end. Sorry for the noise. Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegro

[web2py:18342] Re: Web2py in Debug mode ?

2009-03-19 Thread Keith Edmunds
On Wed, 18 Mar 2009 23:50:46 -0500, yark...@gmail.com said: > That's the basic Wing pattern. Hmmm. I've been following this thread with interest, hoping that maybe there would be a pointer to a guide to using the shell within web2py for debugging (is there?). The reference to WingIDE is disappoi

[web2py:19408] Re: The official Web2py Book by Massimo....for free?

2009-04-07 Thread Keith Edmunds
nce it was written. Some projects (the Claws Mail project springs to mind) include a list of new features with each release. Would that be something that web2py could do? Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[web2py:22915] Re: true or false?

2009-05-29 Thread Keith Edmunds
I think you could get some good exposure from LWN - it's one of the more professional Linux sites (imo, the /most/ professional). Keith aka BackSeat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

[web2py:10219] SQLFORM set SELECTED item?

2008-10-14 Thread Keith Edmunds
Hi I'm using SQLFORM; one of the fields is foreign key and is thus presented as a combo (SELECT) box. All works just fine. How can I change the default (SELECTED) item in the combo box? Thanks, Keith --~--~-~--~~~---~--~~ You received this message becaus

[web2py:10231] Re: SQLFORM set SELECTED item?

2008-10-14 Thread Keith Edmunds
On Tue, 14 Oct 2008 11:01:47 -0700 (PDT), [EMAIL PROTECTED] said: > That is not the example I sent. Sorry if I wasn't clear in my original post about what I was trying to do. > If you plan to do it with IS_IN_DB... Thanks Massimo, that worked just f

[web2py:10222] Re: SQLFORM set SELECTED item?

2008-10-14 Thread Keith Edmunds
values of the categories are "Now" and "Later"). Thanks, Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@g

[web2py:10296] Re: T2 FINAL?

2008-10-15 Thread Keith Edmunds
typo on page 22 of the 15 October version: T2 defined tw widgets: should be T2 defines two widgets: Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this g

[web2py:10297] Re: T2 FINAL?

2008-10-15 Thread Keith Edmunds
Page 23: Thye must have at least the fields defiend in the default. should be: They must have at least the fields defined in the default. ^^ ^^ Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:10298] Re: T2 FINAL?

2008-10-15 Thread Keith Edmunds
table.exposes is a list of fields that should apper in apper --> appear --- Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to thi

[web2py:10410] Re: web2py cookbook anyone?

2008-10-18 Thread Keith Edmunds
start another cookbook. Let's consolidate what already exists and then build on it. Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send

[web2py:10544] Re: Lost some work tonite

2008-10-23 Thread Keith Edmunds
on't trust web editors then why are you using one?? None of my web2py editing is done via the web interface for a number of reasons, not least of which is that there is no recovery journal. Keith --~--~-~--~~~---~--~~ You received this message because you ar

[web2py:10638] Re: Multiple Threading

2008-10-26 Thread Keith Edmunds
On Sun, 26 Oct 2008 11:55:08 -0700 (PDT), [EMAIL PROTECTED] said: > 1) what other background tasks do people envisage? A regular display update via Ajax (but that could probably be demanded by the client rather than pushed) > 2) how should you do it in web2py? Pass. -- Keith E

[web2py:10760] The Book

2008-10-28 Thread Keith Edmunds
e a couple of suggestions for the book: are you still interested in feedback (I'll send via PM when I've finished the book if you are). Keith --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web

[web2py:10956] Re: if..elif..else in a view

2008-11-02 Thread Keith Edmunds
On Sun, 2 Nov 2008 08:00:37 -0800 (PST), [EMAIL PROTECTED] said: > however, this results in a SyntaxError. The ticket will show the actual code that has the error. What does that look like? --~--~-~--~~~---~--~~ You received this message because you are subscribe

[web2py:11173] Re: Web2Py Manual Desktop Edition

2008-11-05 Thread Keith Edmunds
I ordered my copy from amazon.com, and they delivered it to me in the UK. -- Keith Edmunds +-+ |Tiger Computing Ltd| Helping businesses make the most of Linux | | "The Linux Specialists" |

[web2py] Unit testing and faking authentication

2012-04-07 Thread Keith Edmunds
I've been looking that the unit testing page (http://www.web2py.com/AlterEgo/default/show/260), which is very helpful. However, most of my controller functions are decorated with '@auth.requires_login()', and thus if I call them from the test suite, they fail (issuing a redirect): File "/home/ka

[web2py] Hiding columns in SQLFORM.grid

2012-04-07 Thread Keith Edmunds
Is it possible to hide columns in a SQLFORM.grid? I need to retrieve some columns in the query to build some custom links, but I don't want those columns displayed. I've tried setting maxtextlength for those columns to zero, but they still display. Thanks. -- "You can have everything in life you

Re: [web2py] Re: Hiding columns in SQLFORM.grid

2012-04-07 Thread Keith Edmunds
On Sat, 7 Apr 2012 07:41:16 -0700 (PDT), abasta...@gmail.com said: > Before constructing the grid, try db.mytable.myfield.readable = False. Anthony, very neat, and it works: thank you. -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar.

[web2py] Stopping a timer from an Ajax call (Clienttools)

2012-04-07 Thread Keith Edmunds
I'm using clienttools.py to put a timer on a page; the timer calls a controller function (imaginatively called 'tick') every second, which in turn updates a div on the page via Ajax. So far, so good. I want the 'tick' controller function to be able to stop/disable the timer under certain circumsta

Re: [web2py] Multiple target by using the Ajax

2012-04-09 Thread Keith Edmunds
On Sun, 8 Apr 2012 23:32:31 -0700 (PDT), sanjeet.ro...@gmail.com said: > How to call the multiple function or set the multiple target via Ajax In the view: Start of target1 End of target1 Start of target2 End of target2 In the controller: def echo(): return "jQuery('#target1').ht

Re: [web2py] Multiple target by using the Ajax

2012-04-09 Thread Keith Edmunds
On Mon, 9 Apr 2012 12:28:23 +0100, k...@midnighthax.com said: > def echo(): > return "jQuery('#target1').html(%s);jQuery('#target1').html(%s);" \ > % > (repr(request.vars.name.upper()),repr(request.vars.name.lower())) Sorry, the second '#target1' above should be '#target2' -- "You can

[web2py] SQLFORM.grid pagination

2012-04-10 Thread Keith Edmunds
I have a SQLFORM.grid that says "67 records found", and shows the first 20 (as I would expect). At the bottom, there are four buttons for the pages (1-4). If I click on any of 2, 3 or 4, I get "No records found". Looking deeper, the URL of the first page is http://127.0.0.1:8000/app/repor

Re: [web2py] Re: creating a shopping cart using session

2012-04-11 Thread Keith Edmunds
On Wed, 11 Apr 2012 00:11:18 -0700 (PDT), halna...@gardeniatelco.com said: > i am trying to work with session like you showed me but still when i add > somthing it just changes the last element in the session to the element > i added Show us the code. -- "You can have everything in life you wan

Re: [web2py] Re: SQLFORM.grid pagination

2012-04-11 Thread Keith Edmunds
On Tue, 10 Apr 2012 21:38:15 -0700 (PDT), massimo.dipie...@gmail.com said: > Please open a ticket about this in google code. Added: http://code.google.com/p/web2py/issues/detail?id=758 -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar.

Re: [web2py] Overlapping periods

2012-04-14 Thread Keith Edmunds
On Fri, 13 Apr 2012 11:38:25 -0700 (PDT), sababa.sab...@gmail.com said: > But the function does not work, and I can't see what's wrong. Any idea? You don't make it very easy for others to help. "The function does not work" - which function doesn't work, and in what way does it not work? What inpu

Re: [web2py] Overlapping periods

2012-04-14 Thread Keith Edmunds
On Fri, 13 Apr 2012 11:38:25 -0700 (PDT), sababa.sab...@gmail.com said: > The > function should only add periods that doesn't overlap any of the > already registered ones. Let me try to help (I owe this group a lot of help). I've ignored your code, and I don't know what schema you're using, bu

Re: [web2py] Overlapping periods

2012-04-14 Thread Keith Edmunds
On Sat, 14 Apr 2012 09:44:28 +0100, k...@midnighthax.com said: > q = ((db.period.begindatestart)) > if db(query).count(): Argh. Typos. 'q' and 'query' should refer to the same thing, so change the second line to 'if db(q).count():' (that change needs to take place twice). -- "You can

Re: [web2py] shared host deployment of my web2py site

2012-04-14 Thread Keith Edmunds
On Sat, 14 Apr 2012 05:08:01 -0700 (PDT), doncoleon...@gmail.com said: > but i dont > know what the next line of instruction says It says run this command: ./configure --prefix=$HOME ...from the Python-2.6.5 directory under your home directory. The './configure' is the command that will be run

Re: [web2py] Vertical lines around database string values

2012-04-14 Thread Keith Edmunds
Are you using Fields of type list:string? -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

Re: [web2py] shared host deployment of my web2py site

2012-04-15 Thread Keith Edmunds
On Sun, 15 Apr 2012 07:36:19 +0100, doncoleon...@gmail.com said: > So you mean I should just click the 'configure' file? You need to do this from the command line. > And how do I add > the parameters, are u saying It's "you", not "u". You need a open a terminal window and type in the commands

Re: [web2py] Cookies and Sessions

2012-04-26 Thread Keith Edmunds
On Wed, 25 Apr 2012 15:49:23 -0700 (PDT), varelay...@gmail.com said: > I'm quite new to web2py and a noob at it. I've been struggling with the > difference between cookies and sessions...But I have plenty of questions > about them and how to use them(in web2py) I think you should approach them f

Re: [web2py] How to merge more than one template in web2py

2012-04-26 Thread Keith Edmunds
On Thu, 26 Apr 2012 23:23:06 -0700 (PDT), vibhor.purand...@zero-group.com said: > How to merge more than one template in web2py? http://web2py.com/books/default/chapter/29/5#Page-layout -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar

[web2py] Admin of list:string

2012-04-30 Thread Keith Edmunds
In the database admin application, when editing a record from table with a list:string field, the field is not pre-populated with the current value. Test model: db.define_table('t_colours', Field('f_colour', type='list:string', label=T('Colour'))) db.t_colours.f_colour.requires = IS_IN_SET(('

[web2py] SQLFORM.grid edit form

2012-04-30 Thread Keith Edmunds
I have a SQLFORM.grid, and I want to add a button to the form used to edit records (as called from the grid). Is that possible? -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

Re: [web2py] request.intargs RFC

2012-04-30 Thread Keith Edmunds
On Sun, 29 Apr 2012 16:54:11 -0700 (PDT), massimo.dipie...@gmail.com said: > It also takes the optional parameter url_onerror which allows redirect > instead of raise HTTP(404). I kept reading that as "url one error", and struggled to understand the logic. I realise now that it is me that is bro

[web2py] Anyone using flake8 / pyflakes?

2012-05-06 Thread Keith Edmunds
I've just started using flake8 from within vim. Flake8 checks code for PEP8 conformance and general errors, including undefined names. That means that running it when editing, say, a web2py controller, lots of warnings are given: /path/to/file.py|16| W802 undefined name 'session' There is an opti

Re: [web2py] Anyone using flake8 / pyflakes?

2012-05-06 Thread Keith Edmunds
In case anyone's interested, I've posted a quick and dirty hack to fix this problem at https://bitbucket.org/tarek/flake8/issue/14/flake8-fails-to-ignore-errors-warning-from#comment-1385353 -- "You can have everything in life you want if you help enough other people get what they want" - Zig Zigl

Re: [web2py] Web-framework+db with the widest scalability?

2012-05-13 Thread Keith Edmunds
On Sun, 13 May 2012 06:21:17 -0700 (PDT), abasta...@gmail.com said: > I suspect there wouldn't be much difference in performance > between the two frameworks (similarly and properly configured). So long as this is broadly true (which I suspect it is), there are other considerations to take into

Re: [web2py] [noob]html not properly rendered, class="ten columns" has no effect on where the elements are positioned.

2012-05-16 Thread Keith Edmunds
On Tue, 15 May 2012 14:28:04 -0700 (PDT), shortempe...@gmail.com said: > all I get is a page with elements placed on default location I would start by looking in the browser at the page source, and see what is wrong, and I'd check that the CSS file is being loaded. Once you know how the HTML diff

[web2py] cpdb errors

2012-05-17 Thread Keith Edmunds
I'm trying to copy a database from Sqlite to MySQL using the cpdb.py script. In the manual, it states: cd web2py python scripts/cpdb.py \ -f applications/app/databases \ -y 'sqlite://storage.sqlite' \ -Y 'postgresql://username:password@hocalhost/mydb' However, if I do that I get "gluon p

[web2py] SQLFORM.grid: sorting

2012-05-21 Thread Keith Edmunds
y the displayed field? Thanks, Keith -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

Re: [web2py] SQLFORM.grid: sorting

2012-05-21 Thread Keith Edmunds
determine the sort order when I click on a SQLFORM.grid header? Thanks, Keith -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

[web2py] Advice on building a search form

2012-06-14 Thread Keith Edmunds
27; (populated from the customer table). The resulting query will be fed into a SQLFORM.grid, if that's important. Any pointers to a good way of doing this? Thanks, Keith -- We're looking for good Linux people: http://www.tiger-computing.co.uk/jobs

Re: [web2py] Advice on building a search form

2012-06-14 Thread Keith Edmunds
s week thru Monday. I can help if > Tuesday is soon enough. Next Tuesday is great: I look forward to learning more then. Thanks, Keith -- We're looking for good Linux people: http://www.tiger-computing.co.uk/jobs

[web2py] Need DISTINCT query for combo box

2012-06-22 Thread Keith Edmunds
works, but the query may return more than one row for any given company, and thus the combo repeats the company name, once for each row. I need to make the query DISTINCT, but can't see how to do that. Can anyone help? Thanks, Keith -- We're looking for good Linux people: http://www.tiger-computing.co.uk/jobs --

[web2py] How does keepvalues work?

2012-07-01 Thread Keith Edmunds
valid. Thanks, Keith -- We're looking for good Linux people: http://www.tiger-computing.co.uk/jobs

Re: [web2py] Re: How much python is needed to learn web2py

2012-07-03 Thread Keith Edmunds
On Tue, 3 Jul 2012 15:11:10 -0700, bruce.w...@gmail.com said: > So sorry if I find it a little humorous when you think it is still in > development mode FWIW, I thought the same when I saw, "We welcome all the new commers to join this incredible site, Please full-fill the following form." Maybe

Re: [web2py] Re: How much python is needed to learn web2py

2012-07-03 Thread Keith Edmunds
On Tue, 3 Jul 2012 15:17:59 -0700, bruce.w...@gmail.com said: > The good news is development is becoming a lot faster as we learned from > a lot of mistakes. That's nice. I realise you won't have the time right now, but an article summarising what you've learned would be good one day. -- We're l

Re: [web2py] Re: please help us test web2py

2012-07-08 Thread Keith Edmunds
On Sun, 8 Jul 2012 23:31:31 -0700 (PDT), too...@gmail.com said: > +1 on removing it... > The internet is covered with too many meaningless share buttons already. Surely the whole point of the 'welcome' application is to be a scaffolding to be modified as required? It is much easier for someone ne

[web2py] Detect change in sqlform.grid

2013-01-25 Thread Keith Edmunds
I have a SQLFORM.grid, and I hook into edits with 'onupdate'. Is there an easy way to tell which field(s) have been edited? It seems that by the time onupdate is called, the database has already been updated, so comparing the form record with the db shows no differences. Thanks. -- We're looking

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-26 Thread Keith Edmunds
Thanks Massimo, but I'm struggling with how to apply this as I don't ever process the form. I'm doing: grid = SQLFORM.grid(...) return dict(grid=grid, ...) How would I hook into the grid's process() function? > SQLFORM(...).process(...) > > takes two callback functions > > process(onvalidatio

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-27 Thread Keith Edmunds
On Sat, 26 Jan 2013 13:05:50 -0800 (PST), niph...@gmail.com said: > grid takes formargs={}, createargs={}, editargs={} Thanks. I'm sorry if I'm being a bit slow here, but I *still* can't get what I want to work. I've tried:

Re: [web2py] web2py cookbook

2013-01-27 Thread Keith Edmunds
On Sun, 27 Jan 2013 09:07:50 -0800 (PST), pythonn...@gmail.com said: > for learn more about web2py. That appears to be the Web2py Cookbook, Copyright Packt Publishing. Is this legitimate to share in this way? It would appear not, given that the link on the Web2py pages is to purchase this bo

Re: [web2py] Re: Detect change in sqlform.grid

2013-01-28 Thread Keith Edmunds
Sorry to bump: can anyone give me a pointer on this? Thanks. On Sun, 27 Jan 2013 09:02:45 +, k...@midnighthax.com said: > On Sat, 26 Jan 2013 13:05:50 -0800 (PST), niph...@gmail.com said: > > > grid takes formargs={}, createargs={}, editargs={} > > Thanks. I'm sorry if I'm being a bit slow

[web2py] Representing foreign field with image (format/represent)

2012-02-12 Thread Keith Edmunds
I have a form based on a table which includes foreign fields. By default, the foreign fields are displayed as the name from the foreign table as expected. I want to have an image displayed rather than the name from the foreign table. Not having used 'format' before, I changed the format of the fo

Re: [web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Keith Edmunds
Thanks Alan, that has enabled me to do what I want. -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

[web2py] Odd auth problem

2012-03-17 Thread Keith Edmunds
/logout. Can anyone offer any suggestions as to what is going on here? Thanks, Keith

Re: [web2py] Re: Odd auth problem

2012-03-18 Thread Keith Edmunds
On Sat, 17 Mar 2012 15:03:39 -0700 (PDT), abasta...@gmail.com said: > Instead, you can use auth.user_id, which > will simply return None when the user isn't logged in rather than an > error. Thanks, that's fixed the problem. -- "You can have everything in life you want if you help enough other

[web2py] DAL or SQL?

2012-03-19 Thread Keith Edmunds
I need to run a reasonably complex query, and I'm wondering whether it would be better to code it in SQL, or should I try to get the DAL to provide the data (or maybe there's another way). There's no right or wrong answer, but I'd welcome opinion on the best approach. Simply put, consider two tabl

Re: [web2py] Re: DAL or SQL?

2012-03-20 Thread Keith Edmunds
Thanks Niphlod, that looks good and I will try it soon. -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

Re: [web2py] Re: DAL or SQL?

2012-03-20 Thread Keith Edmunds
I've hit an error (web2py bug?) in Niphlod's well-explained example. I *was* running web2py.1.99.4, which gave this: >>> duration=(db.t_periods.f_period_end.seconds() - >>> db.t_periods.f_period_start.seconds()).sum() >>> result=db(db.t_periods>0).select(db.t_periods.id,duration,groupby=db.t_per

Re: [web2py] Re: DAL or SQL?

2012-03-20 Thread Keith Edmunds
I'm using sqlite, and I'm embarrassed about my errors. Thanks for your help. -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

[web2py] Bug(?) using list:string in 1.99.7

2012-03-21 Thread Keith Edmunds
My application has broken moving from 1.99.4 to 1.99.7. I have a field of type list:string (using Sqlite). In 1.99.7, dal.py breaks at line 1405 (marked with >>>): return str(obj) if fieldtype.startswith('list:'): if not obj: obj = [] el

Re: [web2py] Re: DAL or SQL?

2012-03-21 Thread Keith Edmunds
I'm having problems getting a valid value for seconds() from a time field under Sqlite. I can extract a time: >>> for row in db(db.t_periods.id==40).select(db.t_periods.f_period_end): ... print row ... However, if I try to get the seconds(), it returns None: >>> for row in >>> db(db.t_periods

Re: [web2py] Re: DAL or SQL?

2012-03-21 Thread Keith Edmunds
On Wed, 21 Mar 2012 14:43:42 -0700 (PDT), niph...@gmail.com said: > rows = db(db.t_periods.id==40).select(db.t_periods.f_period_end) > for row in rows: > print row.f_period_end.seconds() No, that gives an error: >>> rows = db(db.t_periods.id==40).select(db.t_periods.f_period_end) >>> for row

Re: [web2py] Re: DAL or SQL?

2012-03-21 Thread Keith Edmunds
On Mon, 19 Mar 2012 14:45:51 -0700 (PDT), niph...@gmail.com said: > for every "period", duration is calculated as: > duration = db.periods.end_time.seconds() - > db.periods.start_time.seconds() > > now, get a list of all "durations"... > > result = db(db.periods.id>0).select(db.periods.id, durat

Re: [web2py] Re: DAL or SQL?

2012-03-22 Thread Keith Edmunds
> Perhaps you could add the seconds as a virtual lazy field. That sounds worth investigating, thanks. > We shall come to an agreement when you explain plainly what is your real > model... it seems that your start and end columns are "time" and not > "datetime"... Time fields don't have a "seconds

[web2py] Documentation suggestion

2012-03-25 Thread Keith Edmunds
If something like this has already been suggested, please point me at the earlier discussion. I've read the Web2py manual (and bought three of them) since v1, and the quality of both web2py and the manual has improved hugely. To my mind, however, the manual tries to fulfil two roles currently: it

  1   2   >