[web2py] SQLTABLE and linkto

2010-03-02 Thread Philip
ect the id field, there is no link shown, even if linkto argument is specified. Thanks, Philip -- 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 unsubscri

[web2py] data type for .sum()?

2010-03-03 Thread Philip
e performed. I can't tell if this is an error on my part. Thanks, Philip -- 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

[web2py] disabling https/local host restriction for admin?

2010-03-26 Thread Philip
be a problem if any of them had the admin password). Given this setup, I'd like to be able access admin over http from machines other than the server hosting the app. Is there an easy way to enable that? possibly an edit to the default controller in the admin app? Thanks, Philip -- You rec

[web2py] Proposed patch for SQLTABLE

2010-04-29 Thread Philip
ensure that a proposed patch such as this has no unintended side effects. And, of course, if others have a better way of solving this problem, please speak up. Regards, Philip

[web2py] Re: Proposed patch for SQLTABLE

2010-04-29 Thread Philip
Thadeus, I have noticed the same bug in appadmin, but unfortunately I do not believe this will help resolve that bug. -Philip On Apr 29, 4:49 pm, Jonathan Lundell wrote: > On Apr 29, 2010, at 1:43 PM, Thadeus Burgess wrote: > > > There is also a bug in appadmin that when you sort

[web2py] Re: Proposed patch for SQLTABLE

2010-04-29 Thread Philip
/init/default/show_invoices?orderby=invoices.amount" We have lost the customer variable. -Philip On Apr 29, 5:14 pm, Yarko Tymciurak wrote: > I am confused...  or missing something... > > On Apr 29, 3:35 pm, Philip wrote: > > > I'm not sure the patch submittal pr

[web2py] Decimal data types?

2010-08-15 Thread Philip
Does web2py support python decimal data type for fields? The info on the web at http://www.web2py.com/examples/default/dal suggests the answer is no, but I just wanted to confirm. I have a data base with a lot of financial data that needs to be accurate to four decimal places (sometimes more), an

[web2py] error when changing field type from float to decimal

2010-08-17 Thread Philip
Any suggestions? The reason for the switch was that the DB includes a lot of financial data, so the rounding errors that were resulting from using floats were unfortunately material. If there's a better way to solve this problem, I'm all ears. Thanks, Philip

[web2py] Re: error when changing field type from float to decimal

2010-08-20 Thread Philip
I am using SQLite. Thanks, Philip On Aug 17, 5:54 pm, mdipierro wrote: > The problem is that web2py relies on the database to perform the data > conversion. Which database do you use? > > Massimo > > On Aug 17, 4:38 pm, Philip wrote: > > > > > I have an applicat

[web2py] Passing attributes to SQLTable?

2010-09-12 Thread Philip
les from **attributes are never put into the HTML tag. Am I missing something? The relevant source code is http://www.web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pysrc.html#SQLTABLE.__init__ and the related Table and DIV definitions. Thanks, Philip

[web2py] Re: ADVOCACY: "every single other Python program ever written uses imports"?

2011-01-07 Thread Philip
> These guys seem to have no clue about the increasingly > pervasive nature of computing in society today.  There are many very > smart and intelligent "beginners" who know little about web frameworks > or even Python.  They simply look for tools to develop their ideas. > In fact, you see many scie

[web2py] Capturing history of values in a field

2011-02-03 Thread Philip
a db().select() back to another table in a subsequent select. Am I correct in that? If so, is there a better way to do this in web2py? any ideas on either making this approach work in web2py or a totally different approach would be much appreciated. Thanks, Philip

[web2py] Re: Capturing history of values in a field

2011-02-03 Thread Philip
Thanks - I haven't used _select - I'm checking into it now. Thanks, Philip On Feb 3, 2:54 pm, DenesL wrote: > This might be doable by using _select (note the underscore) for the > inner selection. > Can you post the SQL command that you wish to accomplish?. > > On Feb

[web2py] Executing functions that don't have an associated view (is there web2py command line?)

2011-03-02 Thread Philip
This may be a dumb question - Is there a way to type a short python script into a prompt to execute within an application? I want to import (once) a number of csv files with a shared dictionary (so uploading them one at a time through app admin won't work). It seems a little strange to write a new

[web2py] Re: Executing functions that don't have an associated view (is there web2py command line?)

2011-03-02 Thread Philip
uot;Controllers". It's discussed in the book > here:http://web2py.com/book/default/chapter/03#More-on-admin > > Anthony > > > > > > > > > > > 2011/3/2 Philip > > >> This may be a dumb question - Is there a way to type a short

[web2py] maintaining references while importing records from multiple tables

2011-03-07 Thread Philip
I am importing data into an existing web2py application. The tables are connected - I'll pretend for the moment that they are the owners and dogs tables from the web2py book. I used the shell and typed in the following commands (based on an example previously posted by Massimo): map = {} db.owne

[web2py] Re: maintaining references while importing records from multiple tables

2011-03-08 Thread Philip
problem solved - my error. There was a second reference field that had a broken reference in it. On Mar 7, 5:43 pm, Philip wrote: > I am importing data into an existing web2py application.  The tables > are connected - I'll pretend for the moment that they are the owners > and do

[web2py] very slow pageload time (20+ secs)

2011-03-09 Thread Philip
I am having an issue with an application. Page load times are 20+ seconds. This is true for all pages, even in admin functions (as soon you select the application in question). It appears to be a database problem, since the problem appeared after adding about 15,000 records to an application tha

[web2py] Re: very slow pageload time (20+ secs)

2011-03-09 Thread Philip
ators etc which create drop down boxes and > consider using sub-sets of data to populate them,  or replace with > autocomplete. > > Without seeing any code,  it is difficult to be specific. > > Regards, D > > On Mar 9, 5:52 pm, Philip wrote: > > > > > > > &g

[web2py] images not loading completely

2011-04-23 Thread Philip
I'm building a photo gallery site and my images are only partially loading. Currently I'm just running it from my computer, and if I view the site from there the images load fine, but if I use another computer they only load partially. Usually they load the first 128kB and then stop, although I h

[web2py] Re: using another unique column in IS_IN_DB

2011-04-24 Thread Philip
try 'db.country.iso2' rather than 'country.iso2' On Apr 24, 12:40 am, niknok wrote: > I have the following: >     db.profile.citizenship.requires=IS_IN_DB(gdb,'country.iso2', > '%(name)s',multiple=True,zero=None) > > It works fine until I try accessing the record from appadmin (I can view > the t

[web2py] Re: images not loading completely

2011-04-24 Thread Philip
Thanks Tim, I emailed you my project. I captured the traffic while attempting to load an image, and the HTTP response had the correct Content-Length (519074), but the server started sending FIN after just 152501 bytes. -Philip On Apr 24, 9:04 pm, Timothy Farrell wrote: > VP, > > T

[web2py] Re: images not loading completely

2011-04-29 Thread Philip
.php?title=File:Puch_500_green.jpg to the welcome app and named it test.jpg). 3. http://127.0.0.1:8000/welcome/static/test.jpg displays fine 4. accessed from another computer, the image only displays partially. How much is displayed varies. But the HTTP response header has the correct (full image) Content-Length. -P

[web2py] Re: images not loading completely

2011-04-30 Thread Philip
Aha! This appears to be a bug in OS X or in Python. It sounds very similar to this: http://www.cherrypy.org/ticket/598 Following that cherrypy ticket, I changed the Connection class in rocket.py: removed: self.sendall = self.socket.sendall added: def sendall(self, buf): pending = le

[web2py] python 2.7 for web2py on windows?

2011-05-10 Thread Philip
Is there a web2py for windows package that uses python 2.7 instead of 2.5? or is there an easy way to upgrade it? Thanks, Philip

[web2py] profiler: ImportError: No module named pstats?

2011-05-13 Thread Philip
r feature other than a few posts on this group and the listing of -F as one of the command line options. Thanks, Philip

[web2py] Re: profiler: ImportError: No module named pstats?

2011-05-14 Thread Philip
python 2.6.5 running on Linux (ubuntu) using current web2py src. Does the profiler require 2.7? Thanks, Philip On May 14, 1:22 pm, Massimo Di Pierro wrote: > -F profiler.log > > works for me. Which python version? which os? > > On May 13, 6:45 pm, Philip wrote: > > > &g

[web2py] Re: profiler: ImportError: No module named pstats?

2011-05-15 Thread Philip
Solved - default debian/ubuntu install of python no longer includes the profiler because of license issues. The package python-profiler needs to be installed. Sorry for wasting your time. Thanks, Philip On May 14, 4:56 pm, Massimo Di Pierro wrote: > I am running it with 2.5 > > On May

[web2py] Re: How to make a constant for list of fields in select()?

2011-05-24 Thread Philip
Use the python * operator to unpack the list, like this: item_summary_fields = [db.item.id, db.item.title, db.item.image_thumb, db.item.currency, db.item.shipping_method, db.item.start_price, db.item.drops, db.item.duration, db.item.price_change, db.item.created_on] rows = db(db.item.id>0).sel

[web2py] Re: how to write if else in controller in web2py

2011-06-10 Thread Philip
To expand on the first answer, if you want something to appear in the browser, you need to return a value to the view. For example else: msg = 'invalid statement' return dict(display_string=msg) The generic view will show the display_string (you can name the variable anything you want, a

[web2py] How do you use multiselection with Web2py and JQuery's Datatables?

2014-07-24 Thread Philip
run a debug, only the data from the first selected UPC is shown on the server. Thanks for your time, Philip Relevant default.py section and all relevant files are attached: form_labels = { 'sku_wb': XML('SKU for WBShop '), 'zip_code': XML('Zip Code (5

[web2py] Re: Slickgrid header is blocked when layout.html is extended

2015-07-09 Thread philip
/web2py.com/books/default/chapter/29/05/the-views#Blocks-in-views > > Anthony > > On Thursday, July 9, 2015 at 8:46:52 AM UTC-4, philip wrote: >> >> It seems there should be a simple solution or others with a similar >> problem, but I can't find anything on this. >

[web2py] Re: Slickgrid header is blocked when layout.html is extended

2015-07-09 Thread philip
With the following, now part of the header is showing (the columns of the grid). However, the title bar is now only partially showing. Am I missing anything? in layout.html: {{block header}} {{end}} in view extending layout.html: * {{block header}}* * {{super}} *

[web2py] Where am I going wrong with JSON?

2015-07-12 Thread philip
After attempting to draw from JSON examples with and without using @service.json: The following use of JSON does not retrieve data from the JSON callback in the controller $(function () { // this function is for SlickGrid $.getJSON('/appname/controller/jsonfunc.json', function (vals) {

[web2py] AttributeError when writing the year: response.write(request.now.year)

2015-07-12 Thread philip
I am having difficulty tracing anything on this. I tried testing by populating the tables, deleting the database and populating manually, and am pretty clueless here. Is there anything wrong with the following? *error info:* it looks like the AttributeError is raised when response.write(request

[web2py] Re: AttributeError when writing the year: response.write(request.now.year)

2015-07-12 Thread philip
response.write(request.now.year) is called in layout.html, as extended from the view (line 96). response.write(' \n\n \n', escape=False) response.write(T('Copyright')) response.write(' © ', escape=False) *response.write(request.now.year)* response.write('\n \n

[web2py] Re: AttributeError when writing the year: response.write(request.now.year)

2015-07-14 Thread philip
Yes. In the view: 'for *request* in rows' is used. Thank you for your help On Sunday, July 12, 2015 at 6:14:30 PM UTC-5, Anthony wrote: > > It looks like somewhere you have overwritten the web2py "request" object > with a Row object from you db.request table. Do you have any code in that > do

[web2py] jQuery / Ajax not responding, without errors. (reddit_clone tutorial walkthrough)

2015-07-14 Thread philip
I'm trying to understand and implement Ajax in Web2py with the reddit_clone tutorial Is there a prerequisite or something else I am missing? The following should be quite verbatim {{for data in rows:}} -{{=data.votes}} + {{=A(data.name + ' - ' + data.info,_href=URL('

Re: [web2py] Re: How to insert _blank in A html helper

2010-06-30 Thread Philip Kilner
Hi Massimo, On 30/06/10 15:33, mdipierro wrote: what is a _black attribute? Can you provide an HTML example of the output you want? As I read it, the OP wants to set the target attribute = _blank, e.g. to open the link in a new window. HTH -- Regards, PhilK 'work as if you lived in t

[web2py:23158] Re: windows service problem in 1.63 (source)

2009-06-02 Thread Philip Kilner
Hi Massimo, mdipierro wrote: > running from source or binary? > Source. -- Regards, PhilK 'work as if you lived in the early days of a better nation' - alasdair gray --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[web2py:23778] Re: web2py perfomance

2009-06-09 Thread Philip Kilner
Hi Guys, Joe Barnhart wrote: > Got it. Please do not call it "is_integer". Names are important. > Having a name that implies one thing but does another is a big no-no. > > How about "is_id"? -- PhilK --~--~-~--~~~---~--~~ You received this message because

[web2py:23830] Re: windows service problem in 1.63 (source)

2009-06-10 Thread Philip Kilner
Hi Hans, 2009/6/3 Hans Donner : > > see the docstring in gluon.Winservice > it needs the win32 lib, to be installed seperately. > Yes - sorry, I should have mentioned that I have Mark Hammond's Win32 extensions installed. -- Regards, PhilK Email: p...@xfr.co.uk 'a bell is a cup...until it

[web2py:23831] Re: windows service problem in 1.63 (source)

2009-06-10 Thread Philip Kilner
Hi Massimo, Apologies for the delay in following up. 2009/6/3 mdipierro : > If you start python from the web2py folder, can you do > import gluon.winservice? > If you start python from the gluon folder can you do > import winservice? > Can you edit main and at the bottom insert > print os.getcwd

[web2py:23848] Re: windows service problem in 1.63 (source)

2009-06-10 Thread Philip Kilner
Hi Massimo, 2009/6/10 mdipierro : > This is already fixed in trunk. Thanks for bringing it up. > Any objection to my adding a note to the AlterEgo page to help until that makes it into a release? (Feels like a silly question - meaning that I think I should, unless that release will be RSN - but

[web2py:24370] Re: Using jQuery UI ThemeRoller with web2py

2009-06-17 Thread Philip Kilner
Hi Massimo, mdipierro wrote: > I think this is a great idea. > Have seen your comments in earlier threads when you state that you don't want to burden web2py with too much stuff by default, and I can see the logic of that. However, the Theme Roller tool is so useful that I want to have the opti

[web2py:27647] Re: Help! URL rewrite using apache mod_rewrite

2009-07-30 Thread Philip Kilner
Hi, LB22 wrote: > Thanks Jonathan, I'll take another look at the server log and see if I > find any clues. > Is the rewrite rule within a virtual host block? I've mistaken vhost probs for regex probs in the past - wrong vhost, wrong regex... Just a shot in the dark! -- Regards, PhilK Em

[web2py:27700] Re: Help! URL rewrite using apache mod_rewrite

2009-07-31 Thread Philip Kilner
Hi, LB22 wrote: > OK, I don't know how but I missed Philip's post earlier: > > "Is the rewrite rule within a virtual host block?" > > This was exactly the problem - where I was trying Fran's suggestion > for my mod_rewrite issues, I had added a rewrite rule to a virtual > hosts block in httpd.c

[web2py:28491] eStore + jQueryUI + ThemeRoller

2009-08-13 Thread Philip Kilner
Hi All, As my first non-trivial web2py application, I have been adapting the eStore product for a B2B eCommerce application. That application isn't something that I can release, but once I'm done with this, I'd like to develop and release a standard B2C eCommerce appliance based on eStore but up

[web2py:28495] Re: eStore + jQueryUI + ThemeRoller

2009-08-13 Thread Philip Kilner
Hi Massimo, mdipierro wrote: > This is great. Even if you cannot release it, will you be able to > point us to it so that we can see it up and running? > I will - it's a site selling recycled aircraft components, so not very visually jazzy, but the jQueryUI/ThemeRoller stuff looks a lot nicer t

[web2py:29537] Re: web2py book, 2nd Ed

2009-08-27 Thread Philip Kilner
Hi Massimo, mdipierro wrote: > The new web2py book is available on lulu.com > > http://www.lulu.com/content/e-book/web2py/4968879 > > Lots of new stuff with100 more pages (341 pages in total). Covers > Auth, Crud, Services, interaction with Pyjamas, PyAMF, and better > deployment recipes.

[web2py:29676] Re: estore status

2009-08-31 Thread Philip Kilner
Hi Richard, Richard wrote: > there was a lot of enthusiasm a month back about developing the > estore: > http://groups.google.com/group/web2py/browse_thread/thread/371616dac1584bd5 > I was wondering whether that effort got off the ground. > I'm interested in that, too. > The current descriptio

[web2py:29794] Re: estore status

2009-09-01 Thread Philip Kilner
Hi Richard, Richard wrote: > I'm in Australia and am involved with the manufacturing industry, but > that's an obscure case study. How about a book store? > Good example - not so heavy on the options, but I'm confident I know what the basic requirements are there. >> I suggest that we have a b

Re: [web2py:38372] Re: UliPad as IDE for web2py

2010-01-05 Thread Philip Kilner
Hi Thadeus, Thadeus Burgess wrote: > There is no way for the browser to launch programs on the clients > computer, this would be an inherit security vulnerability which is why > browsers do not allow websites to do this. > > The only way is like a firefox plugin that performs this... but not > ev

Re: [web2py] import table

2010-01-09 Thread Philip Kilner
Hi Leone, leone wrote: > I must import tables from a database manteining the id value of > original tables. > How can I do? It seems not possible force a value in rowid. Let web2py assign the id incrementally, as normal. Treat the imported row_id as a separate column of data, but set it as uniqu

Re: [web2py] Re: ADVOCACY: "every single other Python program ever written uses imports"?

2011-01-07 Thread Philip Kilner
Hi Philip, On 07/01/11 18:17, Philip wrote: Web2py is to me the next generation of MS Access, and I mean that as a compliment. MS Access first opened up the world of database-driven applications to business people. With Access they could throw together a simple application to manage a

Re: [web2py] Re: Drupal alternatives in Python or web2py

2011-01-07 Thread Philip Kilner
Hi Jonathan, On 07/01/11 17:28, Jonathan Lundell wrote: I'd like to see a good CMS based on web2py (the analogy isn't exact, but sort of like Plone is based on Zope). However, building a good CMS on web2py is at least as much work as building web2py in the first place (order of magnitude, any

Re: [web2py] Forcing SSL on certain requests;

2011-01-29 Thread Philip Kilner
Hi David, On 30/01/2011 01:02, David J. wrote: Is there a utility available to force requests to SSL? (ex: Login, Register, etc..) Are you behind a web server? That may be a better place to manage that than on the web2py side, depending on you needs of course. You can do this with an Apach

[web2py] Accessing id in SQLFORM.process()

2012-09-05 Thread Philip Kilner
Hi, I'm trying to wean myself of CRUD and am doing an insert with SQLFORM.process(). I want to redirect on success to view the newly inserted record. How can I access the ID of the new record in this context? Hoped I could do something like: - SQLFORM(db.t_account).process(next=URL(c='accoun

[web2py] How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi, I'd like to embed a map in a view, and am trying to use plugin_wiki. I have plugin_wiki installed, and when I use a simpler function, like the YouTube example: - {{=plugin_wiki.widget('youtube',code='l7AWnfFRc7g')}} ...all is well. However, if I try to embed a map, I get a ticket with: -

[web2py] Re: How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi, Having dug a bit deeper into the options available, it doesn't look like much of a chore to roll my own Google Maps integration. Looking at my choices this one: - http://code.google.com/p/jquery-ui-map/ ...looked promising, but i wondered what others were using? However, I'm now curious

[web2py] Re: How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi Margaret, On Monday, 17 September 2012 21:36:47 UTC+1, greaneym wrote: > > Here is a copy of my model, controller and view files where I got it to > work. > Great, thanks - just what I needed. > You need to obtain a key from google because if more than a default number > of people visit yo

[web2py] autoroutes.py and static files on GAE

2013-01-24 Thread Philip Kilner
Hi All, I'm deploying an app to GAE, and am exploring the routing options. Because my needs are simple (just need to map to app based on hostname) auroroutes.py would be my preferred option. I've used auroroutes.py before behind Apachge without problems, but on GAE my pages work but the CSS,

[web2py] Re: autoroutes.py and static files on GAE

2013-01-24 Thread Philip Kilner
Hi, I couldn't make any sense of the issue with autoroutes.py, so had a look in the cookbook, only to find that the functionality I was after (map a host-name to an app) is in the "normal" parameter-based router, and have tested and confirmed that this works as expected on GAE. If I can help

Re: [web2py] Re: autoroutes.py and static files on GAE

2013-01-24 Thread Philip Kilner
Hi Jonathan, On 24/01/13 15:27, Jonathan Lundell wrote: Have you disabled static file mapping in app.yaml? I hadn't, no - only the app name and the Python version are changed there. -- Regards, PhilK 'a bell is a cup...until it is struck' --

[web2py] GAE Email Sending Issue

2013-01-30 Thread Philip Kilner
Hi All, Am trying to resolve an issue with sending email on App Engine. My application throws an "Unable to send email" error, and the logged error is: - 2013-01-30 09:06:16.409 Mail.send failure:The API package 'remote_socket' or call 'Resolve()' was not found. Running locally mail is sen

Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner
Hi Alan, Thanks for responding! On 30/01/13 12:01, Alan Etkin wrote: Have you updated your app's code before the issue? Yes, I'm in the process of commissioning this app, and have had to make many changes to the model as I import real world data, but none in the relevant period to the appl

Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner
Hi, On 30/01/13 12:31, Philip Kilner wrote: The more I think about it the more I wonder if the use of the router is an issue Just to close the loop on that, disabling routing made no difference. I've just created a clean app to test, with the following settings for auth and

Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner
Hi Alan, On 30/01/13 12:53, Alan Etkin wrote: I may be wrong, but It seems to me that when creating the mail object in the model, you need to pass explicitly the server='gae' argument. (the class docstring says it so in trunk at least) Perhaps you can test that mail.settings.server is 'gae' bef

Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner
Hi Niphlod, On 30/01/13 13:09, Niphlod wrote: try with mail.settings.server = 'gae' Aargh! That did it, and Googling that line took me straight to: - http://stackoverflow.com/questions/2656068/sending-email-from-an-web2py-on-gae ...which I should have found at 8:30 this morning if my Goog

Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner
Hi Alan, On 30/01/13 13:43, Alan Etkin wrote: > I had understood that web2py detected the server automagically (for mail > as it does for the db) so IOW I believe that "server='gae'" is set in > code, and my working hypothesis is that it is this detection which is > somehow failing. Now I'v

Re: [web2py] Interesting about JSON license...

2013-01-30 Thread Philip Kilner
Hi Angelo, On 30/01/13 10:31, Angelo Compagnucci wrote: Please see in Debian the software Douglas Crockford has polluted with that clause! http://codesearch.debian.net/search?q=The+Software+shall+be+used+for+Good%2C+not+Evil Very sad ... I agree, but this: - http://dev.hasenj.org/p

[web2py] Forcing SSL mode (on GAE)

2013-02-05 Thread Philip Kilner
Hi All, Am just about to test using "request.requires_https()" to force my GAE sessions into SSL mode. Is this the best way to do it (a) generally or (b) on GAE in particular? -- Regards, PhilK 'a bell is a cup...until it is struck' -- --- You received this message because you are sub

Re: [web2py] Re: Forcing SSL mode (on GAE)

2013-02-06 Thread Philip Kilner
Hi, On 06/02/13 20:45, howesc wrote: if you want all requests in SSL it sounds like the best thing to me. Yes, it's working very well from my PoV - but my needs are very simple in that I want to force SSL for everything. I'm used to doing this in Apache, so haven't previously had to think a

[web2py] Customising SQLFORM.grid

2013-02-21 Thread Philip Kilner
Hi, I'm making a lot of use of SQLFORM.grid, which is a great tool, and has saved me an enormous amount of time. Now that I have my application running, I'd like to customise some aspects of it, and wondered if there was a "howto" somewhere, or if anyone has any suggestions about the best way

Re: [web2py] Re: Customising SQLFORM.grid

2013-02-21 Thread Philip Kilner
Hi Niphlod, On 21/02/13 09:47, Niphlod wrote: - I'd like to move the pagination control to the top. Use css rules, or js. Let it be flexible, grid's markup is still experimental (i.e. could change in future versions) OK - is there a decent example of this anywhere? Will roll my sleeves u

[web2py] Fixing Failed Migrations

2013-02-21 Thread Philip Kilner
Hi All, I have a failed migration (on Google Cloud SQL, so MySQL, near enough). Looking at the web2py boo, it suggests using: - db.define_table(,migrate=False,fake_migrate=True) ...to find the problem table - done. I then says "This will rebuild web2py metadata about the table according

[web2py] Re: Fixing Failed Migrations

2013-02-21 Thread Philip Kilner
Hi Niphlod, Thanks for the quick reply. On 21/02/13 13:18, Niphlod wrote: I'll explain the normal behaviour, don't know if it applies to google cloud sql. I think its behaviour is that of MySQL. web2py receives a request. that request execute models. in models you have the db definition.

Re: [web2py] Performance issues while opening webpage with more than 1 lakh records.....

2013-02-22 Thread Philip Kilner
Hi Niphlod, On 22/02/13 08:33, Niphlod wrote: PS: I may be old enough to miss some new-style definitions, but what is precisely " 1 lakh records" ? 100k - see http://en.wikipedia.org/wiki/Lakh -- Regards, PhilK 'a bell is a cup...until it is struck' -- --- You received this message b

[web2py] @auth.requires_login() for every function

2013-02-27 Thread Philip Kilner
Hi All, This is one of those "I really ought to know this one" things... I'm used to selectively requiring login, per function. However, this is too easy to overlook! Is there a quick way to require login for either every function in a given controller, or for the entire app? (Have scoured

[web2py] auth.wiki and the menu

2013-02-27 Thread Philip Kilner
Hi, I'm using auth.wiki() to document my app, and am failing to understand how it interacts with the menu. I've defined my wiki, and added it to the menu as I would any other function. However, when I access it, both the menu defined /within/ the wiki and the wiki menu itself appear in the m

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi, On 28/02/13 05:54, 黄祥 wrote: i've tried to learn ajax callback using form(), but it's not work (no error occured), did anyone know the solution for this? thank you very much before I'm having a little trouble understanding what you are doing here - I would definitely use the tools that w

Re: [web2py] REF: SQLFORM in HTML

2013-02-27 Thread Philip Kilner
Hi Teddy, On 28/02/13 06:51, Teddy Nyambe wrote: I am following the book example with modified tables, the form is not being processed in the controller, what could be wrong with my code below: I think it's the way you have constructed your form: - *add_address.html [View]* {{extend "layou

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi, On 28/02/13 07:01, 黄祥 wrote: do you have any hints, correction or suggestion about this things? I'd very strongly recommend using SQLFORM rather than rolling your own forms, and components + LOAD rather than rolling your own Ajax. Doing this stuff by hand is do-able but fiddly and tedi

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi, On 28/02/13 07:28, 黄祥 wrote: thank you so much for your recommendation, i think sqlform will store it into database table not in session It will - but you can use SQLFORM.factory to get the benefit of web2py's form processing without using the db: - http://web2py.com/books/default/chap

Re: [web2py] REF: SQLFORM in HTML

2013-02-27 Thread Philip Kilner
Hi Teddy, Ignore my last - I'd overlooked that you were using "session=None". I'll drink more coffee! N.B. Using SQLFORM that way turns off some valuable protection. As your other reply suggests, the lack of a form "action" may be the issue. -- Regards, PhilK 'a bell is a cup...until it

Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner
Hi Stifan, On 28/02/13 07:44, 黄祥 wrote: a, i c, i get it to use sqlform.factory and if form accepted store it in session for id and quantity, the main problem is in my view i make a condition for view as grid or view as list, i don't think it can be done by sqlform, since the form place is verti

Re: [web2py] ajax callback not work in form()

2013-02-28 Thread Philip Kilner
Hi, On 28/02/13 08:13, 黄祥 wrote: 1. if i use sqlform.factory the submit button will be automatic generated but not used it, isn't it? You can customise that, as per the custom forms section in the book. 2. if using form custom, the form action can't be modified, because i want to add and sto

Re: [web2py] Re: auth.wiki and the menu

2013-02-28 Thread Philip Kilner
Hi Alan, On 28/02/13 10:32, Alan Etkin wrote: Mind that if this is run in the same action as the app wiki, you'll duplicate the menu item. For solving this, add a conditional statement to the model so the menu item is appended only if it's not a wiki. Thanks for responding. Yes, I think that

[web2py] GAE Hosting Issue

2013-03-04 Thread Philip Kilner
Hi All, I'm developing an app on GAE which has suddenly stopped serving, and just wanted to sanity check that other web2py users were not seeing the same thing. The app uses Python 2.7, HRD and CloudSQL. It's a relatively simple transactional CRUD app - nothing clever at all from the GAE PoV

[web2py] GAE - Datastore and CloudSQL together

2013-03-04 Thread Philip Kilner
Hi, Is there a way to use the datastore for the session, filesystem and ticket tables, whilst using CloudSQL for the actual db? Also, having migrated from the datastore to CloudSQL, I am no longer getting tickets saved in either - is there anything obvious I can look into there? (In the abse

Re: [web2py] Re: GAE - Datastore and CloudSQL together

2013-03-04 Thread Philip Kilner
Hi, On 05/03/13 02:02, howesc wrote: at one point i was running both together. i did something like: db = sqldb = Got it - had tied that, but... and then connected tickets and such to db. ...could not work out how to point these "system" tables at the alternate DB, given that they a

[web2py] Re: GAE Hosting Issue

2013-03-04 Thread Philip Kilner
Hi, On 05/03/13 02:05, howesc wrote: i'm no longer using cloudSQL as i don't need it anymorebut several months ago when i was using it i got weird and varied problems on GAE when i had exceeded my billing quota on could SQL. have you checked that those SQL instances are running and billing

Re: [web2py] Re: GAE - Datastore and CloudSQL together

2013-03-04 Thread Philip Kilner
Hi Christian, On 05/03/13 06:07, Christian Foster Howes wrote: ahh, the connection stuff is in the book: #store sessions in the DB session.connect(request,response,db = db) http://web2py.com/books/default/chapter/29/13#Avoid-the-filesystem D'Oh! Thanks for the pointer - w

[web2py] Re: GAE Hosting Issue

2013-03-04 Thread Philip Kilner
Hi Christian, On 05/03/13 06:12, Christian Foster Howes wrote: hrmmaybe it's time for GAE's next code update. i frequently notice a degradation in performance just before they announce a new SDK version. Interesting observation - will look out for that. i'm not seeing anything out of t

[web2py] Dummy Tables for Views and Legacy Tables vs. Audit Trail

2013-03-05 Thread Philip Kilner
Hi, I'm using a dummy table with "migrate=False" against a database view for reporting, but I have auditing enabled. I'm getting the error: - OperationalError: (1054, "Unknown column 'request_received_by_month.is_active' in 'field list'") ...which suggestes that web2py expects the audit tr

Re: [web2py] Re: Dummy Tables for Views and Legacy Tables vs. Audit Trail

2013-03-05 Thread Philip Kilner
Hi Niphlod, On 05/03/13 13:21, Niphlod wrote: watching at the source code, instead of auth.enable_record_versioning(db) you can pass a list of tables Crikey - that'd be a long list here! Thanks for the pointer - will dig... -- Regards, PhilK 'a bell is a cup...until it is struck' --

Re: [web2py] Re: Dummy Tables for Views and Legacy Tables vs. Audit Trail

2013-03-05 Thread Philip Kilner
Hi Niphlod, On 05/03/13 13:32, Niphlod wrote: luckily python is a programming language. :P | your_table_name ='norecordversioninghere' versioning_only_on =[db[t]fort indb ift !=yourtablename] auth.enable_record_versioning(versioning_only_on) | ...and luckier still that this list and folk

Re: [web2py] Book 5th edition out

2013-03-05 Thread Philip Kilner
Hi Massimo, On 05/03/13 20:48, Massimo Di Pierro wrote: The fifth edition of the book is out! Marvellous - Thank You! (and all the contributors) -- Regards, PhilK 'a bell is a cup...until it is struck' -- --- You received this message because you are subscribed to the Google Groups

[web2py] SQLFORM.grid in Components oddity

2013-03-05 Thread Philip Kilner
Hi All, I'm seeing some odd behaviour, and am trying to work out if it's web2py or me that is confused. I have a page with JQueryUI tabs. The first tab shows a record, the 2nd, 3rd and 4th tabs show grids from different child tables, each within a LOADed component. The templates all use the

[web2py] Re: SQLFORM.grid in Components oddity

2013-03-05 Thread Philip Kilner
Hi, A little more info: - - The 2nd tab is for "subject areas", and if I inspect the contents of this component when first loaded, I see: - href="/GTRZ/suppliers/supplier_subject_areas.load/new/supplier_subject_area?supplier_id=36&_signature=027901658eab6054de2b5f1ecc9095227d138ec9"> ...and

  1   2   3   >