[web2py] Scheduler conflict

2012-10-19 Thread Mike Anson
I upgraded to the newest web2py (2.1.1) Launch it with: ./web2py.py -i xxx.xxx.xx.xx -p 8000 -c /etc/ssl/certs/cert-file.crt -k /etc/ssl/certs/key-file.key -a apassword -K applicationName When I run the -K application (ie scheduler) I am then unable to access the admin or front end of the site.

[web2py] Cron task help

2012-10-18 Thread Mike Anson
I would like to have posted my question right here but with I was unable to post it perhaps due to character count of the question being +800 So I posted it on Stackoverflow . Any help would be greatly appreciated. --

[web2py] AWS Elastic Beanstalk installation Recipe

2012-10-10 Thread CST International Mike
Hi I trying to find an AWS Elastic Beanstalk Web2py installation recipe. Amazon have a Django version http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html My Linux\web2py skill are a little weak and rusty. ( over a year now) Regards Michael --

[web2py] Re: Source install fail

2012-10-04 Thread Mike Anson
Hey Massimo, Where should we make this change. Not in web2py.egg-info/top_level.txt as I can see this gets overwritten somewhere else. Thanks. On Tuesday, 4 September 2012 08:04:59 UTC-4, Massimo Di Pierro wrote: > > The package was renamed fpdf > > On Monday, 3 September 2012 23:38:10 UTC-5, J

[web2py] Re: Source install fail

2012-10-04 Thread Mike Anson
edit setup.py line #59 from: $ gluon/contrib/pyfpdf to: $ gluon/contrib/fpdf Then run python setup.py install again On Tuesday, 4 September 2012 00:38:10 UTC-4, Joe Repka wrote: > > I tried 'python setup.py install' in the downloaded source directory for > 2.0.6 but got > > 'error: package dire

[web2py] autocomplete tweak, jquery fade out time

2012-10-03 Thread Mike
en creating the db.t_port_to_jack.jack_id_string.widget instance but I'm not very adept with Python classes so I didn't get very far. Thanks in advance! Mike --

Re: [web2py] Populating widgets with queries

2012-09-08 Thread Mike Girard
Cezar Rocha** - @rochacbruno* > rocha...@gmail.com | Mobile: +55 (11) 99210-8821 > www.CursoDePython.com.br | www.rochacbruno.com.br > Blog: Using Python to get all the external links from a > webpage<http://rochacbruno.com.br/using-python-to-get-all-the-external-links-from-a-webp

[web2py] Re: Populating widgets with queries

2012-09-07 Thread Mike Girard
I should add that it would be easy for me to customize form elements this way, but I would like to do so in a way that does not sacrifice existing form functionality and is just generally in conformance with the web2py way. On Saturday, September 8, 2012 2:22:21 AM UTC-4, Mike Girard wrote

[web2py] Populating widgets with queries

2012-09-07 Thread Mike Girard
I have a checkboxes widget which I invoke like so: form = SQLFORM.factory( Field('test', type='string', requires=IS_IN_DB(db, db.city.name_url, '%(name)s', multiple=True), widget=lambda f, v: SQLFORM.widgets.checkboxes.widget(f, v, style='divs'), default

[web2py] Re: Checkbox widget with divs?

2012-09-06 Thread Mike Girard
That worked perfectly with one minor alteration: 'formstyle' to 'style' widget=lambda f, v: SQLFORM.widgets.checkboxes.widget(f, v, style='divs') On Thursday, September 6, 2012 3:40:45 PM UTC-4, Anthony wrote: > > Try > > widget=lambda f, v: SQLFORM.widgets.checkboxes.widget(f, v, formstyle= > 'd

[web2py] Checkbox widget with divs?

2012-09-06 Thread Mike Girard
The book says that the checkbox widget takes a 'style' argument for which 'divs' is a possible value. What modification is required in the following code? Thanks. form = SQLFORM.factory( Field('test', type='string', requires=IS_IN_DB(db, db.person.name_url, '%(name)s',

[web2py] Re: Some executesql questions

2012-09-06 Thread Mike Girard
e to make a fool of myself. PLEASE believe me when I say I looked at the docs before asking. I am not good with docs. I do better with examples. On Thursday, September 6, 2012 11:25:10 AM UTC-4, Anthony wrote: > > On Thursday, September 6, 2012 10:38:29 AM UTC-4, Mike Girard wrote: >&

[web2py] Some executesql questions

2012-09-06 Thread Mike Girard
1. Is there a way to pass in parameters to the sql, in accordance with the psycopg2 recommendation? I don't see anything in the docstring about that. Does it matter? 2. Do the sql execution times reported by the toolbar include anything besides the execution time of the actual database query? Qu

[web2py] Querying on 1:M Relationships in SQLFORM.grid and SQLFORM.smartgrid

2012-08-31 Thread Mike Leone
reference fields that I can share as well. Finally, I just want to thank the web2py team. I've really enjoyed using the framework and hope to help out as much as I can. Thanks, Mike Leone Principal, Engineering Panoptic Development, Inc. --

[web2py] Re: web2py 2.0.2 is out

2012-08-30 Thread Mike Girard
This seems like a good place to say that leaving php/Drupal for Python/web2py has been like getting out of jail. This is great software with a supernaturally patient and helpful community. On Wednesday, August 29, 2012 11:41:34 PM UTC-4, Massimo Di Pierro wrote: > > After 5 months. It is done.

[web2py] Re: Usage example for 'executesql(...,fields=,columns=) allows parsing of results in Rows'

2012-08-30 Thread Mike Girard
I hadn't put my fields in order nor told it about my aliases. Now that i have, it's dreamy. You are my hero. On Thursday, August 30, 2012 6:03:26 PM UTC-4, Anthony wrote: > > On Thursday, August 30, 2012 5:24:34 PM UTC-4, Mike Girard wrote: >> >> It's screami

[web2py] Re: Usage example for 'executesql(...,fields=,columns=) allows parsing of results in Rows'

2012-08-30 Thread Mike Girard
epydoc/web2py.gluon.dal.DAL-class.html#executesql > > On Thursday, August 30, 2012 11:00:30 PM UTC+2, Mike Girard wrote: >> >> Sorry, didn't mean to have people running errands for me. Where is the >> docstring? Was poking around here >> http://www.web2py.com/exam

[web2py] Re: Usage example for 'executesql(...,fields=,columns=) allows parsing of results in Rows'

2012-08-30 Thread Mike Girard
4:56:09 PM UTC-4, Anthony wrote: > > On Thursday, August 30, 2012 4:31:37 PM UTC-4, Mike Girard wrote: >> >> So today's announcement of the new release included a suggestion that an >> executesql result can be returned as Rows. If this is true, can I see a >> usage

[web2py] Usage example for 'executesql(...,fields=,columns=) allows parsing of results in Rows'

2012-08-30 Thread Mike Girard
So today's announcement of the new release included a suggestion that an executesql result can be returned as Rows. If this is true, can I see a usage example? A little puzzled by 'fields=,columns='? --

[web2py] Re: web2py 2.0.2 is out

2012-08-30 Thread Mike Girard
Great news. Can't wait to try it out. Thanks, everyone! On Wednesday, August 29, 2012 11:41:34 PM UTC-4, Massimo Di Pierro wrote: > > After 5 months. It is done. This is the most waited and the most > feature-packed release. > > I am sure we'll find some corners that need to be ironed but it is

[web2py] Re: Help with aliases in queries

2012-08-29 Thread Mike Girard
star*.name star**>*, dir*.name,* > left = [db.actor.on(db.movie.id == db.actor.movie_id), > star.on(db.actor.person_id == star.id), > db.director.on(db.movie.id == db.director.movie_id), > dir.on(db.director.person_id == dir.id)] > > On Wednesday, 29 August 2012 17:

[web2py] Re: Help with aliases in queries

2012-08-29 Thread Mike Girard
(actor.person_id = star.id) LEFT JOIN director ON (movie.id = director.movie_id) LEFT JOIN person as dir ON (director.person_id = dir.id) ORDER BY movie.average_rating, movie.id LIMIT 1000 OFFSET 0; On Wednesday, August 29, 2012 6:10:46 PM UTC-4, Mike Girard wrote: > > Hello, > > Could som

[web2py] Help with aliases in queries

2012-08-29 Thread Mike Girard
Hello, Could someone tell me how I should modify the following to alias the results for actor and director? Both actors and directors consist of a movie_id and a person_id, linking them up respectively to a person.id and a movie.id. db(db.movie.title == 'Citizen Kane').select(db.movie.title

[web2py] Re: General knowledge questions about reference fields

2012-08-23 Thread Mike Girard
Every question answered. Thanks a lot, Anthony! On Thursday, August 23, 2012 3:27:07 PM UTC-4, Anthony wrote: > > 1. When you do a select that includes a reference field, how does it >> fetch, say, the name column, when only the id column is in the table you >> are doing a select on? >> > > Unle

[web2py] Re: Web2Py in cluster and DATABASES folder

2012-08-23 Thread Mike
n it joined already. You should be > able to perform this check without looking at the filesystem. > > > > On Thursday, 23 August 2012 12:15:49 UTC-5, Mike wrote: >> >> Perhaps I haven't made myself clear enough... >> >> Forget about development environmen

[web2py] General knowledge questions about reference fields

2012-08-23 Thread Mike Girard
Still working on optimizing updates. Could someone provide high-level answers to the following? 1. When you do a select that includes a reference field, how does it fetch, say, the name column, when only the id column is in the table you are doing a select on? 2. For many-to-many relationship

[web2py] Re: Web2Py in cluster and DATABASES folder

2012-08-23 Thread Mike
the same > way as your codebase ? > > Il giorno giovedì 23 agosto 2012 17:14:51 UTC+2, Mike ha scritto: >> >> We are planning on deploying our Web2Py application under Apache-WSGI on >> a cluster of servers all accessing the same multiple databases. Since the >>

[web2py] Web2Py in cluster and DATABASES folder

2012-08-23 Thread Mike
We are planning on deploying our Web2Py application under Apache-WSGI on a cluster of servers all accessing the same multiple databases. Since the new databases will be created on the fly, as needed, we cannot predict beforehand how many we will end up using and, consequently, how many files wil

[web2py] how to parse xml in web2py?

2012-08-23 Thread Mike Girard
ElementTree or cElementTree are good. CElementTree is said to be faster. The most important thing is the method you use. If your sample is the extent of the document, any parser will do. However, if your actual documents are large, you should consider an iterparsing method to conserve memory.

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
Thanks for all your help, Anthony. I'd like to cast a vote for moving bug fixes into stable as soon as possible, regardless of what's on the horizon. I keep seeing replies on this board directing people to trunk, which likely has new bugs. I think this is at odds with adoption. --

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
gle.com/p/web2py/issues/detail?id=647 > > Try trunk. > > Anthony > > On Wednesday, August 22, 2012 4:44:13 PM UTC-4, Mike Girard wrote: >> >> Traceback (most recent call last): >> >> File "/Applications/web2pystable/gluon/restricted.py", li

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
> http://code.google.com/p/web2py/issues/detail?id=647 > > Try trunk. > > Anthony > > On Wednesday, August 22, 2012 4:44:13 PM UTC-4, Mike Girard wrote: >> >> Traceback (most recent call last): >> >> File "/Applications/web2pystable/gluon/restricted.py", li

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
, > directly before "validate_and_insert(**movie)". Just to pinpoint the issue. > > On Wednesday, August 22, 2012 10:10:40 PM UTC+2, Mike Girard wrote: >> >> Yeah, I get the references directly from the genre/person tables before >> inserting them in movie. I

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
the code is failing? > Perhaps the problem is in the field validator. > > Anthony > > > On Wednesday, August 22, 2012 4:10:40 PM UTC-4, Mike Girard wrote: >> >> Yeah, I get the references directly from the genre/person tables before >> inserting them in movie. I also

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
2, 2012 8:23:23 PM UTC+1, Mike Girard wrote: >> >> Yeah. A result of switching it off and then back on. >> >> Good catch. >> >> On Wed, Aug 22, 2012 at 3:19 PM, Anthony wrote: >> >>> I assume this is a typo too, but just to be sure: >>> &

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
Yeah, I should have included a small script. The script I am using is fairly large, though. Here is an outline of my script which should hit the most salient details. movie = {} for tag in tags: movie[title] = #parsed from xml directly movie[genres] = # genre names pulled from xml.

Re: [web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
27;string' and 'list:reference' there. > > Anthony > > > On Wednesday, August 22, 2012 2:49:29 PM UTC-4, Mike Girard wrote: > >> I have written a script to parse a large xml file and insert the contents >> in to my app db. I am using lxml. >> >>

[web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
One other troubleshooting detail: I did type(obj) on the dict, 'movie' as well as all the items inside it. They all check out. No 'None's anywhere. On Wednesday, August 22, 2012 2:49:29 PM UTC-4, Mike Girard wrote: > > I have written a script to parse a large xml fi

[web2py] Re: Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
There were a couple typos in my post that do not correspond to my code. Should be movie['genre*s*'] = *[*456, 368, 239] On Wednesday, August 22, 2012 2:49:29 PM UTC-4, Mike Girard wrote: > > I have written a script to parse a large xml file and insert the contents > in to my

[web2py] Loading data into list:reference fields eliciting strange "NoneType" "not iterable' error

2012-08-22 Thread Mike Girard
I have written a script to parse a large xml file and insert the contents in to my app db. I am using lxml. After about 10 records get inserted, the script fails with argument of type 'NoneType' is not iterable Troubleshooting determined the following: 1. This error is associated with 3 list:

Re: [web2py] Re: Best way to insert 200k records?

2012-08-20 Thread Mike Girard
input. This community is uniquely helpful. On Monday, August 20, 2012 1:49:46 AM UTC-4, Andrew wrote: > > HI Martin, > It depends on the RDBMS. Some are still one row at a time, which makes > insert and bulk_insert the same speed (it just makes the statement easier > to write. >

Re: [web2py] Re: Best way to insert 200k records?

2012-08-19 Thread Mike Girard
"bulk insert is a way faster than regular insert when you have many rows" I think we need to clarify terms. By Massimo's own account in the web2py book, the DAL bulk insert is not faster than db.insert unless you are using the GAE. So are you talking about your db's native bulk methods or is the

Re: [web2py] Where to host web2py

2012-08-19 Thread Mike Girard
Wow, those are great prices for VPS. Was there anything besides price that made you choose them? On Sunday, August 19, 2012 5:42:32 AM UTC-4, Simon Carr wrote: > > I have just found this service > > http://webkeepers.com > > I think i will give their medium service a try on the one month contrac

[web2py] Re: Where to host web2py

2012-08-18 Thread Mike Girard
Hi Simon: I know from having reviewed the trail on this issue in this group that other members have been successful in getting web2py working on Webfaction and hostgator. Webfaction in particular seems to get high marks and their service seems to have some VPS-like features, though it is not V

[web2py] Re: global name 'psycopg2_adapt' is not defined

2012-08-18 Thread Mike Girard
web2py is now working with Postgres. On Saturday, August 18, 2012 8:38:27 PM UTC-4, Mike Girard wrote: > > Apparently there is something wrong with my installation of the driver. > Going to see if I can sort that before coming back. Consider this closed. > > On Saturday, August 1

[web2py] Re: global name 'psycopg2_adapt' is not defined

2012-08-18 Thread Mike Girard
Apparently there is something wrong with my installation of the driver. Going to see if I can sort that before coming back. Consider this closed. On Saturday, August 18, 2012 8:16:36 PM UTC-4, Mike Girard wrote: > > I am attempting to move from SQLLite to Postgres because I was having &

[web2py] global name 'psycopg2_adapt' is not defined

2012-08-18 Thread Mike Girard
I am attempting to move from SQLLite to Postgres because I was having table locking issues.. I downloaded and installed Postgres and the Psycopg2-2.4.5. They work. I am able to administer Postgres and the installation of the driver was uneventful. I first encountered the self-drivers error (

[web2py] Re: DAL field rules and form constraints

2012-08-18 Thread Mike Girard
use > it will be called automatically at the end of the request). Also, when you > use .insert(), the validators don't run -- they only run when using SQLFORM > or when you insert via .validate_and_insert(). > > Anthony > > On Saturday, August 18, 2012 2:50:18 PM UTC-4,

[web2py] Re: DAL field rules and form constraints

2012-08-18 Thread Mike Girard
post-processing for duplicate records. Thanks. On Saturday, August 18, 2012 2:50:18 PM UTC-4, Mike Girard wrote: > > In preparation for doing a bulk insert into my app's tables I have been > doing some testing from the web2py shell. > > I issued the following command: > > &g

[web2py] DAL field rules and form constraints

2012-08-18 Thread Mike Girard
In preparation for doing a bulk insert into my app's tables I have been doing some testing from the web2py shell. I issued the following command: >>db.person.insert(name = 'Dustin Hoffman') person.name has a unique=true setting as well as an IS_NOT_IN_DB form constraint. Dustin Hoffman is alre

[web2py] Re: Get row count for query without loading data into memory

2012-08-17 Thread Mike Girard
00:20 PM UTC-4, Cliff Kachinske wrote: > > I'm not really a DAL guru, but I can't imagine DAL doing that. > > Every dbms I know about has something like "SELECT COUNT(id) WHERE > ..." > > > > On Friday, August 17, 2012 5:54:32 PM UTC-4, Mike Gir

[web2py] Get row count for query without loading data into memory

2012-08-17 Thread Mike Girard
Does this load the rows into memory? db(db.person.id > 0).count() If so, is there a DAL way to get a row count for a query without loading the rows? Thanks. Mike --

[web2py] Re: Congratulations to Bruno and Mariano

2012-08-17 Thread Mike Girard
Congratulations, guys. I appreciate all the work you do. On Friday, August 17, 2012 10:13:45 AM UTC-4, Massimo Di Pierro wrote: > > Congratulations to Bruno Rocha and Mariano Reingart, > > New members of the Python Software Foundations. > > http://pyfound.blogspot.com.br/2012/08/welcome-new-psf

[web2py] Re: Best way to insert 200k records?

2012-08-17 Thread Mike Girard
being added by the DAL for inserts that a bulk insert using SQLLite directly won't add? On Friday, August 17, 2012 12:58:01 PM UTC-4, nick name wrote: > > On Friday, August 17, 2012 8:29:12 AM UTC-4, Mike Girard wrote: >> >> The data will be coming from a large XML file, so m

[web2py] Re: Best way to insert 200k records?

2012-08-17 Thread Mike Girard
The data will be coming from a large XML file, so my script will parse that and make inserts into several different tables. It's fairly straightforward. So is it correct to say that - 1. There is no compelling reason to do this without the DAL 2. My options in the DAL are bulk_insert, looping

Re: [web2py] Best way to insert 200k records?

2012-08-17 Thread Mike Girard
But what method should I use? Is there anything better than bulk_insert? Naturally I would like this to work as fast as possible. Thanks. --

[web2py] Best way to insert 200k records?

2012-08-17 Thread Mike Girard
Hello: What is the prescribed method for doing large bulk inserts? I am using sqllite as my backend. Is it ok to just write a Python script that talks to the db directly or should the DAL be used? The book says the bulk_insert method is not more advantageous than a for loop. I searched thi

Re: [web2py] Re: Helper for many-to-many result sets?

2012-08-14 Thread Mike Girard
This all looks promising. Meanwhile, here's my model with irrelevant Fields omitted and below that my query for the Select. Thanks for the help! A simplified version of my model: db.define_table('movie', Field('title','string'), db.define_table('person', Field('name', 'string', uni

Re: [web2py] Re: Helper for many-to-many result sets?

2012-08-14 Thread Mike Girard
Salient bits of model at the top of the thread. On Tuesday, August 14, 2012 2:16:56 AM UTC-4, rochacbruno wrote: > > I guess you can also do: > > table = TABLE(*[TR(TD(movie.title), TD(UL(*[LI(star.name) for star in * > movie.stars.select()*])) for movie in movies]) > > when a table is referenced

Re: [web2py] Helper for many-to-many result sets?

2012-08-13 Thread Mike Girard
o that. > > Examples are in the book. > > On Tue, Aug 14, 2012 at 8:59 AM, Mike Girard > > > wrote: > > I don't think you have understood my question. > > > > My concern is not that I have too many fields nor my field names. > > > > I am a

Re: [web2py] Helper for many-to-many result sets?

2012-08-13 Thread Mike Girard
re more > resources than a simple join. So I recommend just sticking with the join, > and displaying in your view what you'd like. > > As for the wrapper to give things easier to work with names, just specify > said information in your controller. > On 14/08/2012 8:04 AM, &q

[web2py] Helper for many-to-many result sets?

2012-08-13 Thread Mike Girard
I have a movie table that has a many-to-many relationship with a person table expressed through a star table. A simplified version of my model: db.define_table('movie', Field('title','string'), db.define_table('person', Field('name', 'string', unique=True), db.define_table('sta

Re: [web2py] retrieve data from many to many relation

2012-08-13 Thread Mike Girard
I am sure that this answer is exactly what I am looking for to solve a problem I am having. However, I don't quite understand the particulars. Vincenzo, could you please provide an example of the queries used here to get the movie linked up with the genre. Maybe some code? On Saturday, July 28

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Mike Girard
work is written to target 2.5, so the > framework code doesn't include any language features that were new in 2.6 > or 2.7 (of course, your app code can include such features if you're > running 2.6 or 2.7). I think we may need to remove 2.4 from that list as > well. >

[web2py] Re: Trouble adding lxml module to application

2012-08-13 Thread Mike Girard
Thanks for the confirmation. Perhaps the official documentation should be updated. On Monday, August 13, 2012 9:17:51 AM UTC-4, Anthony wrote: > > Are you sure? I searched on this list and seemed that there had been some >> problems. > > > Shouldn't be any problems. 2.5 is the *oldest* version

[web2py] Re: Trouble adding lxml module to application

2012-08-12 Thread Mike Girard
Are you sure? I searched on this list and seemed that there had been some problems. In light of this I installed lxml in my 2.5 site-packages and ran web2py with the python2.5 command recommended on the installation page. Can someone confirm what Python version is best for running web2py as of

[web2py] Re: Trouble adding lxml module to application

2012-08-12 Thread Mike Girard
found error went away. Is it ok to run web2py with python 2.6 or am I likely to encounter problems down the road? Thanks for your help. On Sunday, August 12, 2012 11:39:56 PM UTC-4, Mike Girard wrote: > > I am attempting to use lxml in my app. I am using Mac OS X. I placed the > l

[web2py] Trouble adding lxml module to application

2012-08-12 Thread Mike Girard
I am attempting to use lxml in my app. I am using Mac OS X. I placed the lxml files in web2py/Content/Resources/applications//modules. I attempted to import lxml into default.py with this: from lxml import etree I am getting a module-not-found error. I anticipated problems because lxml req

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
I fixed it. My column names were screwed up. Sorry. On Thursday, August 9, 2012 11:20:31 PM UTC-4, Mike Girard wrote: > > Model: > > db.define_table('movie', > Field('title','string'), > Field('api_id', 'string&#x

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
Field('created', 'datetime','datetime', default=request.now), Field('modified', 'datetime','datetime', default=request.now)) Grid code: @auth.requires_login() def manage_movies(): grid = SQLFORM.smartgrid(db.movie) retu

[web2py] Re: Dynamic Ajax Content and Jquery

2012-08-09 Thread Mike
ethod works for me. Thanks again for the help man. Really appreciate web2py and this community. --Mike On Thursday, August 9, 2012 7:02:11 PM UTC-4, Anthony wrote: > > Here is your code reformatted: > > jQuery(".big_search").keyup(function() { > ajax('partial_se

[web2py] Dynamic Ajax Content and Jquery

2012-08-09 Thread Mike
I guess this is really more of a jquery question but I figured there may be some easier web2py builtin way to do this... I'm doing some custom auto completion on an input field and thought the example from the book made more sense for my usage (as opposed to the built in autocomplete widget). T

[web2py] Re: Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
> it points to is represented as "None" > > star looks to be a Set, or the results of a query. something has gone > wrong in the setup of the table or in the representation of that field. > > On Thursday, August 9, 2012 1:00:06 PM UTC-7, Mike Girard wrote: >> &g

[web2py] Just a quick eyeball on this, perhaps?

2012-08-09 Thread Mike Girard
Can anyone tell just by looking at this what the problem with the ID and Star fields might be? The record is actually fine. When I click Edit, everything is as it should be. Sorry for not providing the full background on this, for brevity's sake. Was wondering if someone can see the problem ju

[web2py] Problem with Field display in SQLForm.Smartgrid

2012-08-09 Thread Mike Girard
Hello: I am building a movie database site with web2py. I have a movies table which has a many-to-many relationship with several other items: stars, directors and genres. I am using a SQLForm.Smartgrid declared in my controller like so: def manage_movies(): grid = SQLFORM.smartgrid(db.mov

[web2py] Search in Web2Py

2012-08-07 Thread Mike Girard
I notice that there is no search box on the main web2py site. The search on the book site is somewhat unorthodox in that it only provides links where the search term is located but does not show you where. Does web2py have a robust, conventional search utility? If not, what is the prescribed me

[web2py] Re: grid search behaviour with foreign keys

2012-08-01 Thread Mike
I'm also trying to get around this issue - anyone have any recommendations? On Monday, July 2, 2012 12:08:46 PM UTC-4, simon wrote: > > When you have a grid with a reference field then the search functionality > does not work as expected. > > For example grid shows: > >Owner Dog >

[web2py] Using admin interface on GAE, getting errors on update or insert

2012-06-22 Thread mike haberman
ng I need to do to the model definition to avoid this error ? (Also when trying to create a new entity via GAE's Datastore viewer, some fields are missing even though it displays all the fields for each entity from a query. Is there something by default that makes some fields not show up?) thanks mike --

[web2py] Re: Reference Field, validation and representation

2012-05-22 Thread Mike
], represent= lambda jack,row: db(db.jack_listings.id == row.jack_id_string).select()[0].jack_and_bldg), (db.jack_listings is another table and 'jack_and_bldg' was the field I wanted to show up in the grid tables instead of the id #) --Mike On Tuesday, May 22, 2012 2:35:01 P

[web2py] Reference Field, validation and representation

2012-05-22 Thread Mike
see the db.jack_listings format string instead of the id#. My question is, how can I keep this requires functionality but still have the field display as the correct representation in tables? Thanks for your help in advance! Mike

Re: [web2py] Adding a copy option to a SQLFORM.grid

2012-04-12 Thread Mike Veltman
rec = db(db.lparprofile.lparname == recname).select().first() rec_id = rec.id redirect(URL(r=request, f='manage_profile',args=str(rec_id))) return Problem solved :-) On 04/12/2012 03:19 PM, Mike Veltman wrote: On 04/12/2012 01:08 PM, Mike Veltman wrote: Well I would like

Re: [web2py] Adding a copy option to a SQLFORM.grid

2012-04-12 Thread Mike Veltman
On 04/12/2012 01:08 PM, Mike Veltman wrote: Well I would like to have besides edit delete etc in my SQLFORM.grid also a copy option that copies the record and then gives me the edit so I can modify it. Anyone a idea how to do that ? Mike Aha I have to use links (RTFM) Does anybody have a

[web2py] Adding a copy option to a SQLFORM.grid

2012-04-11 Thread Mike Veltman
Well I would like to have besides edit delete etc in my SQLFORM.grid also a copy option that copies the record and then gives me the edit so I can modify it. Anyone a idea how to do that ? Mike

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-30 Thread Mike Veltman
worked like a charm, its really great Massimo. Thanks On 03/30/2012 03:55 PM, Mike Veltman wrote: I guessed it was something like that :-) Thanks Massimo I am going to test it. On 03/30/2012 10:51 AM, Massimo Di Pierro wrote: You have to pass it SQLFORM.grid(...,field_id=db.lvdisksetup.id,.

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-30 Thread Mike Veltman
aka Mike Veltman wrote: On 03/30/2012 12:01 AM, Massimo Di Pierro wrote: When you say "I want to manipulate db.lvdisksetup but in stead it manipulates db.lvdisk" what do you mean by "manipulates"? That when I delete a record or do add a record it gives me the

Re: [web2py] SQLFORM.grid not doing what I want :)

2012-03-29 Thread Mike Veltman
isksetup table. So I delete or add a record that is supposed to be a reverence. On Wednesday, 28 March 2012 22:58:31 UTC-5, Gwayne aka Mike Veltman wrote: Gentle people, I have the following grid: query = ( (db.lvdisksetup.lvgroupname_id == usedlvdisksetup) &

[web2py] SQLFORM.grid not doing what I want :)

2012-03-28 Thread Mike Veltman
Gentle people, I have the following grid: query = ( (db.lvdisksetup.lvgroupname_id == usedlvdisksetup) & (db.lvgroupname.id == usedlvdisksetup) & (db.lvdisksetup.lvdisk_id == db.lvdisk.id) ) fields = [db.lvdisksetup.id, db.lvgroupname.lvgroupnamedesc , db.lvdisk.lvdiskdesc, db.lvdisksetup

[web2py] SQLFORM.grid not doing what I expect

2012-03-28 Thread Mike Veltman
Gentle people, I have the following grid: query = ( (db.lvdisksetup.lvgroupname_id == usedlvdisksetup) & (db.lvgroupname.id == usedlvdisksetup) & (db.lvdisksetup.lvdisk_id == db.lvdisk.id) ) fields = [db.lvdisksetup.id, db.lvgroupname.lvgroupnamedesc , db.lvdisk.lvdiskdesc, db.lvdisksetup

[web2py] Re: Question about 0.py

2012-03-27 Thread Mike
thing else I have to toggle after going through the app wizard? Thanks! Mike On Monday, February 7, 2011 8:48:09 PM UTC-5, Massimo Di Pierro wrote: > > 0.py is not a web2py file. It is created by the wizard. If a variable > is not used is a bug in the wizard. > > Massimo > >

[web2py] Re: Mongo DB, AMFRPC3 and http 500 errors

2011-12-07 Thread Mike D
I just decided to make copies of the objects. Thanks a lot though! On Nov 12, 10:07 pm, Sathvik Ponangi wrote: > I keep getting a RestrictedError for certain kinds of output, especially > when I try using modules in my views & they are usually hard to trace. > I think web2py restricts the kind of

Re: [web2py] Re: A SQLFORM.grid question

2011-11-08 Thread Mike Veltman
it is failing - e.g. when you press submit is it actually calling the controller? On Nov 3, 2:16 am, Mike Veltman wrote: Now I think of it, you do not need to do a redirect because it creates its own page based on the called page. Its just that the submit does not do anything

Re: [web2py] Re: A SQLFORM.grid question

2011-11-03 Thread Mike Veltman
n'),writable=False,readable=False, update=request.now), migrate=settings.migrate) # Table rules db.lvstorage.setup_id.requires = IS_IN_DB(db, 'setup.id', 'setup.setupname') db.lvstorage.lvsize_id.requires = IS_IN_DB(db, 'lvsize.id', 'lvsize.sizenam

Re: [web2py] Re: A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
led page. > > Its just that the submit does not do anything. > > > SQLFORM.grid does not actually add the records automatically. It just > > calls the grid controller with args action/table. > > > > You have to do something like: > > if

Re: [web2py] Re: A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
gt; You have to do something like: > if request.args(0) in ("edit", "new"): > redirect(URL("edit.html", args=[request.args(1), > request.args(2)]) > > On Nov 2, 9:15 am, Mike Veltman wrote: > > > are you able to see the form? or ar

Re: [web2py] Re: A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
roller with args action/table. > > You have to do something like: > if request.args(0) in ("edit", "new"): > redirect(URL("edit.html", args=[request.args(1), > request.args(2)]) > > On Nov 2, 9:15 am, Mike Veltman wrote: > &

Re: [web2py] A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
> are you able to see the form? or are you getting the "not authorized > message?" > > you can set user_signature=False or ensure that user is logged in. Thanks for the reaction. But no the form is generated perfectly. And the user is logged in. > > On Wed,

[web2py] A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
possible with SQLFORM.smartgrid ? With regards, Mike Veltman

[web2py] Mongo DB, AMFRPC3 and http 500 errors

2011-10-28 Thread Mike D
in Wing IDE if running in debugger if __debug__ and 'WINGDB_ACTIVE' in os.environ: etype, evalue, tb = sys.exc_info() sys.excepthook(etype, evalue, tb) raise RestrictedError(layer, code, '', environment) The second exception block is entered and the exception is: AttributeError: 'ObjectId' object has no attribute 'i' I have no idea what could be causing this. Any help would be greatly appreciated. Thanks, Mike

[web2py] What I do with web2py.

2011-10-24 Thread Mike Veltman
, Mike Veltman

Re: [web2py] Hide menu until after authentication.

2011-10-24 Thread Mike Veltman
> On Friday, October 21, 2011 2:05:29 AM UTC-4, Gwayne aka Mike Veltman wrote: > > Gentle people, > > > > First a remark I started playing with SQLFORM.grid and it was very ugly, > > until > > I did throw away my application and recreated it with the wiz

<    1   2   3   >