Re: [web2py] bootstrap3 formstyle checkboxes

2015-11-04 Thread Gary Cowell
uot;ul", or "divs" in order to match the formstyle of the > containing form. > > On Wed, Nov 4, 2015 at 2:27 AM, Gary Cowell > wrote: > >> That the labels for boolean fields are consistent in appearance with the >> labels for other classes of field. >> >

Re: [web2py] bootstrap3 formstyle checkboxes

2015-11-06 Thread Gary Cowell
Okay, I see that now. Thank you and everyone else for the input. On Friday, 6 November 2015 07:06:34 UTC, Annet wrote: > > > That the labels for boolean fields are consistent in appearance with the >> labels for other classes of field. >> >> So, emboldened and on the left. >> > > That's not th

[web2py] REST service POST responses

2015-11-09 Thread Gary Cowell
Lookint at providing simple REST API to database tables through web2py. I used this example from the book: @request.restful() def secapi(): response.view = 'generic.'+request.extension def GET(*args,**vars): patterns = 'auto' parser = db.parse_as_rest(patterns,args,vars)

[web2py] Re: Oracle perfomance issues with version 2.12.3

2015-11-09 Thread Gary Cowell
If it was me, I'd eneable oracle events trace and look at the plans and wait times for the two executions. There are a few ways to do this, don't know of a web2py DAL specific one, but look for This article explains. https://oracle-base.com/articles/misc/sql-trace-10046-trcsess-and-tkprof O

[web2py] Re: REST service POST responses

2015-11-10 Thread Gary Cowell
t; as the > response. > > You have a few options: > > 1. Put the result in a dictionary: > > return dict(result=db[table_name].validate_and_insert(**vars)) > > 2. Convert the Row object itself to a dictionary: > > return db[table_name].validate_and_

[web2py] Re: Scheduler - Worker node heartbeats stop randomly

2015-11-12 Thread Gary Cowell
I use supervisord because it brings the configuration of daemon services within a consistent configuration. I can write one supervisord.conf, and so long as the supervisor is installed in any given distro, I can run my services. No need to then worry about upstart vs systemd vs SysV init vs ..

[web2py] Make variable available to all sessions in memory

2015-12-16 Thread Gary Cowell
Hello I want to encrypt fields in the database, because of reasons. I've been through the arguments, but there we have it. I look at this web2py slice: http://www.web2pyslices.com/slice/show/2012/encrypt-information-into-the-database And it gives a good illustration of how to do it in model wi

[web2py] Re: web2py as an API provider

2015-12-16 Thread Gary Cowell
I'm using it to build REST services atop legacy data. So, it certainly can be used in a 'professional' way, whatever that means. I find that DAL is useful, and JSON and REST are easy to implement and as you say, can concentrate on the API rather than the nuts and bolts to a great extent. If yo

[web2py] Re: Make variable available to all sessions in memory

2015-12-16 Thread Gary Cowell
re is a passphrase per user, you would need a unique > key for each user (e.g., the user ID), and you would also need to do some > occasional cleanup of old passphrases. > > Anthony > > On Wednesday, December 16, 2015 at 10:27:22 AM UTC-5, Gary Cowell wrote: >> >> He

[web2py] Re: web2py 2.14.2

2016-03-30 Thread Gary Cowell
Hello Running 2.14.3 - upgraded from 2.12.(something) Seems all the btn-default are now almost invisible? E.g. from the log in page: Sign Up Gives me now. I upgraded web2py, then copied the static/js and static/css from welcome I notice bootstrap version changed from 3.3.4 to 3.3.5. butt

[web2py] Total newbie, advice on storing scans

2014-08-21 Thread Gary Cowell
Hi I'm writing a web app for my home server to allow me to scan and store images of official correspondence, so I can shred the paper and recycle it. A document archive. I have the scanner components written [using pyinsane] I have an idea of the models required, tables to hold the sender, da

[web2py] How to do references, and dropdowns?

2014-08-29 Thread Gary Cowell
Hello I have the following in models: db.define_table('senders', Field('sender','string',length=80,label="Sender")) db.define_table('documents', Field('description','text',requires=IS_LENGTH(256,1),label="Description"), Field('header_date','date',label="Header Date"), Field('rec

[web2py] Re: Total newbie, advice on storing scans

2014-08-29 Thread Gary Cowell
On Thursday, 21 August 2014 16:34:46 UTC+1, Michael Beller wrote: > > Web2py has an 'upload' field type that helps you manage file uploads. > "Upload" is a little bit of a misnomer because you can select the file > path to store the file (or an existing path) and the blob is not stored in > t

[web2py] Re: How to do references, and dropdowns?

2014-09-01 Thread Gary Cowell
On Friday, 29 August 2014 14:22:56 UTC+1, Gary Cowell wrote: > > Hello > > I have the following in models: > > db.define_table('senders', > Field('sender','string',length=80,label="Sender")) > > db.define_table('documen

[web2py] Dropdown based on multiple parents?

2015-01-01 Thread Gary Cowell
Hi, this is probably simple but searching as come up a blank and I'm still very new to web2py I have three tables, 'manufacturer' , 'model', and 'shoe' Manufacturer contains 'Asics','Nike' Then 'model' has parent of 'manufacturer', and will have 'Asics', 'Gel Nimbus' and 'Nike','Vomero' 'sho

[web2py] Format clause for multiple table relationships

2015-01-01 Thread Gary Cowell
I want the 'format' for the dropdown when I create a 'run' entry to be 'manufacturer.name model.model shoe.purchased' e.g. 'Mizuno Wave Rider 10-11-2014' for instance where 'Mizuno' is the manufacturer name, 'Wave Rider' is the model.model, and the date is shoe.purchased I managed to get the

[web2py] Re: Format clause for multiple table relationships

2015-01-02 Thread Gary Cowell
On Friday, 2 January 2015 20:12:31 UTC, Massimo Di Pierro wrote: > > I think you are asking about this: > > db.define_table( > 'manufacturer', > Field('name'), > format = '%(name)s') > > db.define_table( > 'model', > Field('manufacturer', db.manufacturer), > Field('model')

[web2py] Struggling with multi user

2015-01-03 Thread Gary Cowell
Hello Sorry for the probably obvious questions, but I do search for answers honest :) Anyway, what I want is for my table rows to be user specific. Such that when each user registers, the database looks empty to them, until they start creating rows in their forms. I have added these definiti

[web2py] Re: Struggling with multi user

2015-01-05 Thread Gary Cowell
_common_filter = lambda query: db.shoe.created_by == auth.user_id > > Massimo > > > > On Saturday, 3 January 2015 13:00:24 UTC-6, Gary Cowell wrote: >> >> Hello >> >> Sorry for the probably obvious questions, but I do search for answers >> hone

[web2py] How can I have optional, or vairable buttons in a sqlform.smartgrid 'links' ?

2015-01-14 Thread Gary Cowell
I have a smartgrid, thus: grid = SQLFORM.smartgrid(db.exsystem,linked_tables=['exsystem', 'disks'], user_signature=False, deletable=False, links = [ lambda row: A( SPAN(_class='icon

[web2py] Re: why use the admin interface, at all?

2015-01-29 Thread Gary Cowell
I use the built in editor heavily. Lots of my web2py coding is done on a chromebook, so it's completely perfect for me. Be really hard if it worked any other way than this. On Friday, 12 February 2010 17:35:49 UTC, snfctech wrote: > > I'm just getting started with web2py and I must say - I lo

[web2py] dynamic buttons in sqlform.grid

2015-01-29 Thread Gary Cowell
Hello I have a SQLFORM.grid, where I wanted some buttons to do different things, and to look different based on the status of the entities being reported in the grid. Here's what I did for one of them: links = [ dict(header=T('Running'),body=lambda row: testslot(row

[web2py] Re: submenus in layout

2015-02-10 Thread Gary Cowell
I don't know if I understand your problem, but I do this: adminmenu = [ (T('Admin'), False, '', [ (T('Disk'), False, URL('dynamic', 'diskadmin'), []), (T('Slot'), False, URL('dynamic', 'systemadmin'), []), ]), ] Which creates a cascaded menu option, then I if auth.has_mem

[web2py] web2py on Microsoft Azure PAAS

2015-02-10 Thread Gary Cowell
Anyone any experience on deploying a web2py app on Microsoft Azure Web? Can it be done? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this

[web2py] Re: submenus in layout

2015-02-11 Thread Gary Cowell
oh and the reason mine didn't work is, the layout plugins on web2py don't use bootstrap it seems. I changed to using a bootstrap3 scaffold, and a themed bootstrap.min.css, and it worked fine. On Tuesday, 10 February 2015 08:33:01 UTC, Yebach wrote: > > > I would like to create a drop down menu i

[web2py] can we have web2py groups with AD authentication ?

2015-02-11 Thread Gary Cowell
I would like my app to authenticate with AD (ldap) for users and passwords. But, I'm not in control of the LDAP, and I can't get them to add new groups etc. and the app requires users to be in a web2py admin group to do certain admin functions within the app. So at the moment, I'm using standar

[web2py] Difference in TEXT field presentation between View and Edit modes

2015-02-13 Thread Gary Cowell
I have a SQLFORM.grid containing : grid = SQLFORM.grid( query=queryInstalled, fields=[db.e5systemstatus.id, db.e5systemstatus.patch, db.e5systemstatus.patchstatus, db.e

[web2py] Re: can we have web2py groups with AD authentication ?

2015-02-13 Thread Gary Cowell
n actions. > > I've never used such a "mixed system". This is just what it came to my > mind... > > Regards. > > > El miércoles, 11 de febrero de 2015, 0:12:07 (UTC+1), Gary Cowell escribió: >> >> I would like my app to authenticate with AD (ldap) f

[web2py] Re: Difference in TEXT field presentation between View and Edit modes

2015-02-13 Thread Gary Cowell
Many thanks, that worked great. Looks good too in the way it formats it. On Friday, 13 February 2015 19:54:15 UTC, Niphlod wrote: > > HTML doesn't preserve line breaks by default: that's why there are > or tags > > you need a "custom" represent function to fill the cell of the grid with >

[web2py] Re: IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?

2015-03-11 Thread Gary Cowell
On Saturday, 7 March 2015 19:18:17 UTC, Massimo Di Pierro wrote: > > Who is opposed? Why? > It would mean support going for Red Hat 5 I think Red Hat 6 is on 2.6, Red Hat 7 is 2.7. Everything I have is at least Red Hat 6. But that would be the reason, most probably -- Resources: - http://

[web2py] How to approach presenting API data in web2py ?

2015-03-28 Thread Gary Cowell
Hello Looking at writing a front end to an AWS orchestration tool in web2py, I already have the functionality required coded in python defs, so just looking at presenting things nicely. One thing I'll have to do a lot of, is present grids and dropdowns of data that have come from lists and dic

[web2py] w2p_clone broke web2py installation

2015-04-05 Thread Gary Cowell
Hello I installed web2py from pip, I think it's at 2.1.1 Then ran w2p_clone to bring in latest version. On launch I get the following error: Traceb Traceback (most recent call last): File "web2py.py", line 18, in import gluon.widget File "/home/gary/python/web2py/web2py/gluon/__init

[web2py] Bug in SQLFORM.factory bootstrap3 formstyles ?

2015-04-12 Thread Gary Cowell
Hi Running with: 2.10.3-stable+timestamp.2015.04.02.21.42.07 (Running on Rocket 1.2.6, Python 2.7.5) I find that this code: xadb = DAL('sqlite:memory:') xadb.define_table('regiontable', Field('region', length=20,label= 'Region')) form = SQLFORM.factory(SQLField('Region', label=

[web2py] Re: Bug in SQLFORM.factory bootstrap3 formstyles ?

2015-04-15 Thread Gary Cowell
It makes it end up looking like this when using a dropdown: Wide Dropdown <http://i.imgur.com/qKRRpST.png> On Monday, 13 April 2015 06:35:05 UTC+1, Gary Cowell wrote: > > Hi > > Running with: > > > 2.10.3-stable+timestamp.2015.04.02.21.42.07 > > (Running on Roc

[web2py] Re: Run linux ssh script

2015-04-15 Thread Gary Cowell
I might be inclined (have done, in fact) to use a python ssh implementation to do this, rather than using shell. paramiko would be one such module, 'spur' module is easier to use. Not using shell gives the python greater control over error handling and recovery, among other things. Of course,

[web2py] HTML helpers to build a bootstrap dropdown button?

2015-04-15 Thread Gary Cowell
Hello I use code such as this: status = 'Delete' buttonTitle='Delete' buttonURL='deleteStack' buttonClass='button btn btn-danger' buttonIcon='icon trash icon-trash glyphicon glyphicon-trash' button = A( SPAN(_class=buttonIcon) ,buttonTitle

[web2py] question about components

2015-04-18 Thread Gary Cowell
Hello I'm struggling with components, with ajax. I've been trying to follow examples in the book and blog and not getting very far. I have an application that's based on five controller functions, with a page each. Each page has the same header at the top, and the bottom two thirds of the pag

[web2py] Re: question about components

2015-04-20 Thread Gary Cowell
Thanks for the opinions. I'm looking at ractive On Monday, 20 April 2015 04:30:32 UTC+1, Ramkrishan Bhatt wrote: > > I am agree with Massimo you must try angular or reactive to make SPA. It > will surly solve your problem. -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] AJAX div reload indicator

2015-04-21 Thread Gary Cowell
Hello I have a DIV component I'm reloading using another controller , so I end up calling: response.js = "jQuery('#stackList').get(0).reload()" Problem is, my stackList controller function does a lot of work to rebuild the grid, it makes many AWS api calls, to populate the grid. The re

[web2py] Re: AJAX div reload indicator

2015-04-25 Thread Gary Cowell
tually I think my solution ended up being much simpler than almost any example of this I've seen so perhaps it can help some people. On Tuesday, 21 April 2015 16:05:32 UTC+1, Gary Cowell wrote: > > Hello > > I have a DIV component I'm reloading using another controller , so I

[web2py] Re: AJAX div reload indicator

2015-04-25 Thread Gary Cowell
kay on page load, but spinner is missing on refresh. Do I have to do something more to get the spinner to work on refresh, or should I be doing my component refresh a different way? On Tuesday, 21 April 2015 16:05:32 UTC+1, Gary Cowell wrote: > > Hello > > I have a DIV component I&

[web2py] Re: AJAX div reload indicator

2015-04-25 Thread Gary Cowell
x27;#stackList').html('{0}');jQuery('#stackList').get(0).reload()". format(spinner) So instead of just sending the div a reload, I'm using a JQUERY call to replace the DIV with a CENTER IMG of my spinner. It seems to work, can anyone think why this is a b

[web2py] Re: Best way to load password at startup.

2015-04-28 Thread Gary Cowell
For one of my apps, I added extra fields to auth to hold some Amazon AWS credentials for the logged in user. This means that I can access the required API keys when logged in , but because it's part of the database, it doesn't get committed to source control. For accessing external database le

Re: [web2py] Re: Web2py mobile app using Kivy

2015-06-04 Thread Gary Cowell
This UI independence is the most important thing, actually (for me) There's the 'Visual Basic' way of coding, where each control component will contain the business logic for the thing that happens when you press the button. I see this so often. But better, is to have a module, or modules, that

[web2py] listen on all interfaces 0.0.0.0 or specific interface - how ?

2015-07-15 Thread Gary Cowell
I'm trying to get the web2py.py to listen on all interfaces in development. I'm sure I've done this before. I know I have. But I can't make this work at all now. I get this: $ ./web2py.py --ip 10.2.1.15:8000 web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2015 Version 2.11.2-st

[web2py] Re: listen on all interfaces 0.0.0.0 or specific interface - how ?

2015-07-16 Thread Gary Cowell
gt; On Wednesday, 15 July 2015 18:36:58 UTC-5, Gary Cowell wrote: >> >> I'm trying to get the web2py.py to listen on all interfaces in >> development. >> >> I'm sure I've done this before. I know I have. But I can't make this work >> at all n

[web2py] Make custom SQLFORM grid LINKS buttons give feedback like regular web2py form buttons?

2015-07-24 Thread Gary Cowell
I have a SQLFORM grid with some buttons in the LINKS : They are generated thus: def makeButton( ... ) ... if result == 0: status = 'Up' buttonTitle='Stop' buttonURL

[web2py] Re: Grid without consulting database

2015-09-22 Thread Gary Cowell
The need to represent data from web services inside a web2py app must be a fairly common requirement, I think. I certainly need(ed) to for a project. I used a sqlite mem db for each page (I was calling Amazon AWS through boto, get lists of stuff, etc.). I did three things to represent my data.

[web2py] Re: Make custom SQLFORM grid LINKS buttons give feedback like regular web2py form buttons?

2015-10-09 Thread Gary Cowell
ry little html/javascript. Going to keep trying for a solution to this. On Saturday, 25 July 2015 01:40:53 UTC+1, Anthony wrote: > > I think that is set up to work only with links that fire Ajax requests or > submit buttons in forms. > > On Friday, July 24, 2015 at 4:52:24 PM UTC-4, Gar

[web2py] Re: Don't laugh but I like the admin editor ;o)

2015-10-10 Thread Gary Cowell
I like it too. It makes it possible to work on sites with just a browser, like on a Chromebook. Which in fact, I do. On Saturday, 10 October 2015 13:06:32 UTC+1, Edward Shave wrote: > > Only thing is I can't find much by way of instructions for it so if anyone > can point me in the right directi

[web2py] How to provide feedback on button in LINKS section of sqlform.grid ?

2015-10-11 Thread Gary Cowell
Hello. I'm trying to give the user some feedback when they click on a links (link button) in the links section of a sqlform grid. I have this button code: button = A( SPAN(_class="icon play icon-play glyphicon glyphicon-play") ,"Start" ,_id="startstop"

[web2py] Re: Pretty printing a string in a view

2015-10-13 Thread Gary Cowell
When I'm presenting for example log data from a process execution with web2py, I'll use PRE and put it in a textarea. On Monday, 12 October 2015 11:07:52 UTC+1, Callum Daw wrote: > > Thank you so much, the tag worked a charm, the issue I was facing is > that it returns XML to my unit which conn

[web2py] Re: How to provide feedback on button in LINKS section of sqlform.grid ?

2015-10-15 Thread Gary Cowell
Oh yes! I was so close. Thanks for the help, you solved it :) On Friday, 16 October 2015 04:34:04 UTC+1, DenesL wrote: > > Change that to > > el.text = "Working..."; > > > > > > On Sunday, October 11, 2015 at 4:20:58 AM UTC-4, Gary Cowell wrote: >>

[web2py] bootstrap3 formstyle checkboxes

2015-11-03 Thread Gary Cowell
Web2py version: >>> import gluon.widget >>> print gluon.widget.ProgramVersion Version 2.12.3-stable+timestamp.2015.08.19.00.18.03 When using bootstrap3_inline for forms, the checkbox lables are not correctly styled: This is my form code: form=SQLFORM.factory( Field('SystemName',

[web2py] Re: Has somebody used codenvy for web2py application deployment?

2015-11-03 Thread Gary Cowell
No, but could you not use pythonanywhere free app, and host mercurial (or, git, if you must) on bitbucket? Small projects on bitbucket can have up to five users. On Monday, 2 November 2015 16:55:02 UTC, at wrote: > > Hi, > > I was looking for a place where I can deploy a database driven web2py

Re: [web2py] bootstrap3 formstyle checkboxes

2015-11-03 Thread Gary Cowell
That the labels for boolean fields are consistent in appearance with the labels for other classes of field. So, emboldened and on the left. On Tuesday, 3 November 2015 16:28:15 UTC, Richard wrote: > > What is the expected behavior? > > On Tue, Nov 3, 2015 at 4:50 AM, Gary Cow