[web2py] Re: Google Maps API

2022-03-16 Thread Rob Paire
rySelector("#FLD_MILES").blur(); } catch(e) { document.querySelector("#FLD_MILES").innerHTML = ('error:'+e); console.log('error'); console.log(e); } {{pass}} } -Rob On Friday, March 11, 2022 at 2:30:12 PM UTC-5 Kenneth wrote:

[web2py] Re: Share sessions not working

2022-01-18 Thread Rob Paire
\models\session.py into the models folder of my application and sessions started working. -Rob On Saturday, September 11, 2021 at 10:46:52 AM UTC-4 dirman wrote: > In my case, sessions are not shared in my two apps main and sub domain > > > > session.connect(request, response,masterap

[web2py] Re: DAL Select(fields) puzzle

2021-08-26 Thread Rob Paire
Ah! Now it makes sense - Thank you for your help. Exactly the kind of understanding I was looking for. -Rob On Wednesday, August 25, 2021 at 9:44:15 PM UTC-4 snide...@gmail.com wrote: > On Wednesday, August 25, 2021 at 3:39:34 PM UTC-7 Rob Paire wrote: > >> Hi Web2py >>

[web2py] DAL Select(fields) puzzle

2021-08-25 Thread Rob Paire
*rows = db(db.person.name == 'Bob').select(db.person.name).as_dict() * This last example in red throws a KeyError('id') error when trying to name specific fields, but works fine when returning ALL fields, or when a condition is specified. Thank you -Rob -- Resources: - http://web2py.

Re: [web2py] DAL how to increment column value

2021-05-25 Thread Rob Paire
Ah ha!!! Excellent - that looks so much better now! I appreciate your help -Rob On Tuesday, May 25, 2021 at 4:06:04 PM UTC-4 valq...@gmail.com wrote: > > http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Expressions > > вторник, 25 мая 2021 г. в 22

Re: [web2py] DAL how to increment column value

2021-05-25 Thread Rob Paire
Hi All Thank you for the helpful comments! I am fine leaving the SQL Execute statement in place, but thought the question was worth asking. -Rob On Tuesday, May 25, 2021 at 8:06:46 AM UTC-4 Carlos Correia wrote: > Às 18:20 de 20/05/21, Rob Paire escreveu: > > Hello all, > >

[web2py] DAL how to increment column value

2021-05-20 Thread Rob Paire
Hello all, I am wondering if it's possible to use DAL update method to increment the value of table column H_REVNO in one line of code, and one trip to the database? I tried this query, and a couple of similar variations, but could not get it to work. db(db.KICKER.id ==

[web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Rob Paire
object like this: now the ajax call works as expected. A dash of CSS to hide the field borders and the end results look acceptable! Thank you for all your help On Friday, July 31, 2020 at 6:34:45 PM UTC-4, Rob Paire wrote: > > Hi All, > I am trying to send dat

Re: [web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Rob Paire
message which leaves me guessing it's something in the W2P JavaScript include file. Sounds like I am moving towards debugging the actual function call itself to get my solution. Open source is wonderful! -Rob On Sat, Aug 1, 2020, 11:55 AM AGRogers wrote: > Is there a reason you can't

Re: [web2py] Re: How to send contenteditable to web2py AJAX call

2020-08-01 Thread Rob Paire
the HTML and it looks good, only problem is how to save the input data. My backup plan is to put a hidden form with one input and use that form variable as a proxy to make the AJAX call. This kind of hacky solution goes against the grain and it's seems like there has to be a better way. -Rob

[web2py] How to send contenteditable to web2py AJAX call

2020-07-31 Thread Rob Paire
how do I pass the contenteditable data M to the AJAX function? Thank you kindly -Rob -- 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

[web2py] How to make jQuery Mobile respect URL redirect

2019-03-01 Thread Rob Paire
URL(''),client_side=True) # "client_side" parameter is necessary for redirects when using jquery-mobile* -Rob -- 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 Iss

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
the source distribution and install the appropriate driver for the required back end. Looks like the path forward is to run from source and upgrade the drivers. You guys were great - Thank you! -Rob On Thursday, March 1, 2018 at 5:35:59 PM UTC-5, Rob Paire wrote: > > Anthony, > This is s

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Anthony, This is surprising information, the server is brand new and all software is freshly installed. I will research further. Thank you for your help. -Rob On Thursday, March 1, 2018 at 4:40:19 PM UTC-5, Anthony wrote: > > On Thursday, March 1, 2018 at 3:58:52 PM UTC-5, Rob Paire

Re: [web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
Hi Anthony, Yes web2py PG driver works fine, except it is too old, doesn't support Postgres v10.2 -Rob On Mar 1, 2018 3:53 PM, "Anthony" <abasta...@gmail.com> wrote: > Looks like it's finding the psycopg2 driver just fine -- the problem is > that it is not finding a databas

[web2py] Re: PostgreSQL 10.2

2018-03-01 Thread Rob Paire
on\packages\dal\pydal\adapters\postgres.py", line 105, in connector return self.driver.connect(**self.driver_args) File "psycopg2/__init__.py", line 164, in connect OperationalError: FATAL: database "booster_i" does not exist In file: C:\web2py_2_16_1\applications\Booster_

[web2py] PostgreSQL 10.2

2018-03-01 Thread Rob Paire
the latest version of psycopg2 to my local Python installation and I can talk to the database, but how do I make web2py use the latest drivers? It is necessary to run from source to do this? Comments are appreciated. Thank you for your help! -Rob -- Resources: - http://web2py.com - http

[web2py] Re: login form

2017-03-30 Thread Happy Rob
This is a quick one here, It's (extremely) ugly and basic, but should give you a framework to figure out from. I did it on pythonanywhere for free which is pretty cool. The template below should work on local or others though. No email out or $ because the pythonanywhere free version doesn't

Re: [web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-28 Thread Happy Rob
Looking a little deeper (thanks google) it seems that the free version of python anywhere is unable to send the JSON thing through some proxy. To be honest I'm not entirely sure what that means, but the solution seems to be to get the app working locally, then later upgrade to a paid plan when

Re: [web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-27 Thread Happy Rob
> > OK,I'm down to just this now: def pay(): from gluon.contrib.stripe import StripeForm form = StripeForm( pk='pk_test_xx', sk='sk_test_xx', amount=1000, description="Example charge").process() if form.accepted:

Re: [web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-27 Thread Happy Rob
Oops, it would be $1000, and I also need to put in a proper description, but that's not the tricky bit. Thanks Rob -- 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

Re: [web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-27 Thread Happy Rob
charge", source=token, ) So - where do I put the token, the test code, etc? I've tried to strip out everything so it's as bare bones as possible eg only able to submit $10, no shopping cart, but still confused. I'd be very grateful for your help Cheers Rob -- Resources: - http://we

[web2py] Re: Custom Login View

2017-03-24 Thread Happy Rob
SOLVED Hi Marlysson Thanks for your help In the end I didn't need to do any defining or anything too much. For 1 (failed login), I put the auth settings into the controller instead of the model For 2. (selecting login page) I also put the auth settings into the controller For 3. (logout)

Re: [web2py] Re: Using Stripe's Checkout w/ web2py

2017-03-23 Thread Happy Rob
I'd be very interested too! -- 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 message because you are subscribed to the Google Groups

[web2py] Custom Login View

2017-03-23 Thread Happy Rob
Hi guys I'm trying to make a membership site but I'm struggling a little and would love a little help # 1. How can I select where go if login fails? Can I add something next to the 'next=URL' that's similar? # 2. How can I select so uses c/b/b3 to login instead of c/default/user/login? # 3.

Re: [web2py] Re: use jquery mobile with image upload functionality in web2py - is a hack is necessary?

2016-10-24 Thread Rob Paire
your form definition add: > form['data-ajax]'='false' and it should work. > I'm sure you know it by now, but it is always good to share > knowledge/experience. > ATB, > Archie > > On Friday, October 3, 2014 at 6:59:13 PM UTC+2, Rob Paire wrote: >> >> Hello all, >>

[web2py] Re: Linux, connect to MSSQL 2012, LD_library_path (venv)

2016-04-18 Thread Rob Johnson
If anyone else finds this via Google (it's the top hit), and because the link below is dead (redirects to an archive), I solved the LD_LIBRARY_PATH problem by installing python-pyodbc through APT on Ubuntu. I figured this out by looking at the pypyodbc source on GitHub to see what paths it was

[web2py] Re: Seeing SQL Create Statements

2015-12-03 Thread Rob N
Hi Stifan, That's brilliant! Many thanks, Rob. On Tuesday, December 1, 2015 at 11:41:43 PM UTC, 黄祥 wrote: > > there is sql.log file in databases folder of your applications, or you can > simply looking in the appadmin as well (near models) > > best regards, > stifan > >

[web2py] Seeing SQL Create Statements

2015-12-01 Thread Rob N
something here. Thanks, Rob. -- 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 message because you are subscribed to the Google Groups "w

[web2py] Re: Displaying values from a different table in a drop down (SQLFORM)

2015-10-17 Thread Rob N
Hi Stifan, Thanks for the reply. I tried: db.define_table( 'place_info', Field('place_id', db.place, requires=IS_IN_DB(db, 'place.id', '%(name)s')), Field('category_id', 'reference category'), Field('specific_desc', 'text'), Field('picture', 'upload'), format =

[web2py] Displaying values from a different table in a drop down (SQLFORM)

2015-09-12 Thread Rob N
and is not/cannot show the 'name' values in the drop down for the 'place_info' field. Is there any way to make this happen? I thought about restructuring the database but that seems like a rather sketchy fix for the sake of a form. Many thanks in advance, Rob. -- Resources: - http://web2py.com

[web2py] Re: Uploaded PDF viewing

2015-01-08 Thread Rob Paire
Hi Dominic, I found the simplest way to serve PDF files is to save them in the static directory, and then pass in the folder and the name of the file you want to serve as url parameters. See sample code below. I have also had good success building PDF's on the fly using the pyfpdf module

[web2py] use jquery mobile with image upload functionality in web2py - is a hack is necessary?

2014-10-03 Thread Rob Paire
Hello all, I am working on an app using web2py and the jquery.mobile plug-in which I upgraded from v1.3.1 to v1.3.2. So far everything is working fine except for the image upload feature. I managed to solve the problem and enable the upload, but I had to hack the jquery.mobile-1.3.2.js source

[web2py] Re: use jquery mobile with image upload functionality in web2py - is a hack is necessary?

2014-10-03 Thread Rob Paire
working. On Friday, October 3, 2014 12:59:13 PM UTC-4, Rob Paire wrote: Hello all, I am working on an app using web2py and the jquery.mobile plug-in which I upgraded from v1.3.1 to v1.3.2. So far everything is working fine except for the image upload feature. I managed to solve the problem

[web2py] Re: Bootstrap3 package - help to test

2014-04-30 Thread Rob Goldsmith
Hi - I'm very late to this thread but just wanted to say thank you to Paolo ... your package massively helped me get up and running quickly on a new project without having to hack away at the old code. I'd also be happy to contribute via Github if there are areas that need work? On Monday, 23

[web2py] Re: Best way to implement SQL select query

2014-04-17 Thread Rob Goldsmith
' ...] On Wednesday, 16 April 2014 13:39:02 UTC+1, Rob Goldsmith wrote: I tried posting this earlier, but it doesn't seem to have appeared yet - so apologies if this comes up twice. I am writing a web2py application which accepts a UK postcode then provides information about nearby postcodes

[web2py] Best way to implement SQL select query

2014-04-16 Thread Rob Goldsmith
give any advice as to the correct / most efficient way to accomplish this? thanks Rob. -- 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

[web2py] Most efficient way to do SQL select with condition constrained by a list

2014-04-16 Thread Rob Goldsmith
recursion depth exceeded in cmp Now, I'm pretty certain that I could fix the error by moving to MySQL or another db, but I think I may not be approaching the query in the correct / most efficient way. Does anyone have any suggestions of the best way to proceed? thanks Rob -- Resources

[web2py] Re: Simple question for registrations to filter bots

2014-04-03 Thread Rob Mayhue
Lately I've been taking the opposite approach. I add a field that should always be empty and use CSS to set the field to `display: none; `. When the form is submitted if that field contains a value, its probably spam. Usually a bot will POST values for all the fields that were found. --

[web2py] Re: parse_as_rest combined with accessible_query

2014-03-01 Thread Rob Mayhue
I've been looking at parse_as_rest(...) myself lately for use as a REST api for AngularJS and after studying the code in DAL I've discovered there are some undocumented features to the parse_as_rest method(...). I'm guessing they are undocumented because it is still considered as experimental

[web2py] Re: Crash on SQLFORM submission

2014-01-13 Thread Rob Mayhue
Have a look at the request vars on the ticket page and see what was actually submitted. That might provide you a clue. On Monday, January 13, 2014 1:10:43 PM UTC-5, Neil wrote: This doesn't seem to be the case: - I looked at the database, and the types match the definition in the

[web2py] Re: iframe without iframe

2014-01-13 Thread Rob Mayhue
Have a look at jQuery.load() http://api.jquery.com/load/ You should be able to do something like $( '#element').load( //web2py/a/f/c/view.html ); On Sunday, January 12, 2014 6:30:40 PM UTC-5, Kenneth wrote: Hello, is there a way of integration data from an web2py site into an other

Re: [web2py] syntax error in code

2014-01-09 Thread Rob Mayhue
It looks like you are missing the closing ')' on the entered.update_record line. If that doesn't fix it please include the error message that you are getting. On Thursday, January 9, 2014 6:00:52 AM UTC-5, Federico Ferraro wrote: form.process().accepted: El ene 9, 2014 7:00 a.m., kartik

Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-21 Thread Rob Mayhue
, then it overrides any `path_prefix` that happens to be set. Thoughts? @Massimo I haven't created a ticket yet as I was reworking the original idea. On Saturday, December 14, 2013 6:02:22 PM UTC-5, Rob Mayhue wrote: I like this idea better. It took me a little while to figure out exactly what

[web2py] Re: Can not run web2py_no_console.exe. Version 2.8.2 on win 7 x 64

2013-12-15 Thread Rob Paire
Hello all, I am having same problem running on Windows server 2003 32bit. When I launch web2py.exe the following dialog error appears: *Title: Error Entry Point Not Found* *Description: The procedure entry point wcscpy_s could not be located in the dynamic link library msvcrt.dll* Clicking

[web2py] Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Rob Mayhue
Proposal - use the value of an environment variable as a path_prefix When using the parametric router there is an option called `path_prefix` that's described as a path fragment that is prefixed to all outgoing URLs and stripped from all incoming URLs. I'm not sure what the original use case

Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Rob Mayhue
://domain.com/web2py/app/ On Saturday, 14 December 2013 15:07:02 UTC-6, Rob Mayhue wrote: Proposal - use the value of an environment variable as a path_prefix When using the parametric router there is an option called `path_prefix` that's described as a path fragment that is prefixed to all

[web2py] Re: rocket, windows server, bad file descriptor error due to gluon debug message

2013-11-13 Thread Rob Paire
For what it's worth, I worked through a series of apparently random connection errors when I was using MSSQL database. Searching the net it appeared to be a problem with MSSQL and not web2py DAL. I decided to change the database to Postgres. There were some challenges getting Postgres

[web2py] web2py 2.7.4 mysterious lock-ups necessitating a service restart

2013-10-23 Thread Rob Paire
Hello all, I have been running web2py for about 6 months, and I am on the latest version 2.7.4 - I have a small in-house app developed which was just put into production this month. Things had been very stable until I released the app and people begin using it. Now this morning, for the third

[web2py] Re: web2py 2.7.4 mysterious lock-ups necessitating a service restart

2013-10-23 Thread Rob Paire
Thank you all for taking time to look at this error and making such useful and prompt replies. I will pursue the solution using the latest source code as advised - I am grateful for your help. On Wednesday, October 23, 2013 12:17:15 PM UTC-4, Rob Paire wrote: Hello all, I have been running

[web2py] Re: Creating Auth Groups

2013-08-11 Thread Rob Paire
in appadmin. Now it all makes sense. On Friday, August 9, 2013 5:19:42 PM UTC-4, Rob Paire wrote: I would like to create security groups for my newly minted web2py app, and so I have been reading the chapter on Access Controlhttp://www.web2py.com/books/default/chapter/29/09/access-control

[web2py] Re: Creating Auth Groups

2013-08-10 Thread Rob Paire
This is helpful feedback, I will do some digging and see if I can figure out what is causing this behavior. And yes I see all my other tables which are in a different model file besides db.py; the only tables missing from the appadmin interface are the various auth tables. On Saturday, August

[web2py] Creating Auth Groups

2013-08-09 Thread Rob Paire
I would like to create security groups for my newly minted web2py app, and so I have been reading the chapter on Access Controlhttp://www.web2py.com/books/default/chapter/29/09/access-control#Access-Control; in the section titled *Authorization *it states: You can create groups, give

[web2py] Re: Creating Auth Groups

2013-08-09 Thread Rob Paire
: The appadmin application definitely DOES show the auth_* tables for me. Maybe you didn't cause the tables to be built? You need to put in the auth.define_tables() somewhere in your models to cause web2py to build them. -- Joe On Friday, August 9, 2013 2:19:42 PM UTC-7, Rob Paire wrote: I would

[web2py] www.web2py.com link does not resolve - is site down?

2013-07-24 Thread Rob Paire
When I browse to www.web2py.com in chrome I get a page which says: 502 bad gateway, I tried this from two different connections. PythonAnywhere.com seems to resolve correctly. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe

[web2py] Re: Session variables disappearing

2013-05-26 Thread Rob Mayhue
You say your app users were logged in but after a given time the _load_settings function stopped working (stopped storing data)? The _load_settings() function is only called once, right after the user logs in using auth.settings.login_onaccept.append(). The idea was to store certain

[web2py] Re: Session variables disappearing

2013-05-25 Thread Rob Mayhue
Its been a few days so I'm just giving this a bump... Does anyone have any insight as to what could be happening to the session variables? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving

[web2py] Session variables disappearing

2013-05-21 Thread Rob Mayhue
Hi everyone, Long time lurker... first question I've had to ask. I usually find answers here without having to ask. I'm having a problem with session variables I've added when a user logs in disappearing after a while and throwing exceptions when attempting to access them later on and I'm

[web2py] Problem with New application wizard; plugin_attachements.py

2013-01-13 Thread Rob Paire
any other side-effects. Thanks for supporting a great program! -Rob --

[web2py] web2py command line -taskbar parameter bug?

2012-12-10 Thread Rob Paire
is needed, and thanks for supporting a great program! -Rob --

[web2py] Small typo in book

2012-10-12 Thread Rob Goldsmith
In chapter 5, under Mobile development... Notice that the decorator must be important once before using it in a controller. I assume should be Notice that the decorator must be imported before using it in a controller. --

[web2py] Re: Displaying a message following auth.requires_login() redirect

2012-08-21 Thread Rob Goldsmith
On Monday, August 20, 2012 5:48:33 AM UTC-4, Rob Goldsmith wrote: Is it possible to display a message to the user on the login form when they have been redirected as a result of an auth.requires_login() redirect? (e.g. You must be logged in to view this page) I found this discussion

[web2py] Displaying a message following auth.requires_login() redirect

2012-08-20 Thread Rob Goldsmith
Is it possible to display a message to the user on the login form when they have been redirected as a result of an auth.requires_login() redirect? (e.g. You must be logged in to view this page) I found this discussion of the functionality from 2010

[web2py] Re: Triggering LOAD

2012-08-14 Thread Rob Goldsmith
','mydiv'); //--/scriptdiv id=mydivloading.../div Bruno mentioned the use of web2py_ajax_page() -- that function is ultimately called by web2py_component(), so either will work, but web2py_component() is probably easier. Anthony On Friday, August 10, 2012 5:08:49 AM UTC-4, Rob Goldsmith

[web2py] Triggering LOAD

2012-08-10 Thread Rob Goldsmith
Hi Is it possible to trigger the LOAD component when a user clicks on something, or can it only be used when a page is first loaded? I have been using the ajax function to do this but would prefer the extra flexibility of LOAD if it is possible. thanks Rob. --

[web2py] Re: template.render() and whitespace [patch attached]

2012-07-11 Thread Rob
when using my original syntax. Although, I don't know if there are any unforeseen consequences since I'm not using the templating engine to it's full potential right now. Thanks, Rob On Tuesday, July 10, 2012 8:07:16 PM UTC-7, Massimo Di Pierro wrote: You can do {{for d in data[:3

[web2py] Re: template.render() and whitespace [patch attached]

2012-07-11 Thread Rob
just like the view code without a bunch of extra white space and carriage returns. Thanks a lot for making this template library available to use outside of web2py! On Wednesday, July 11, 2012 11:33:44 AM UTC-7, Rob wrote: Thanks Massimo. That prints out: hihihi If you change

[web2py] template.render() and whitespace

2012-07-10 Thread Rob
({{...}}) and whitespace, just remove it. If the line contains {{=..}} and other whitespace then it stays. Does this break all sorts of HTML output? Thanks, Rob

[web2py] Re: Dropdown field not being accepted

2011-07-02 Thread Happy Rob
Thanks for the ideas, I'm looking at the source code now. On Jul 1, 6:15 pm, Bruno Rocha rochacbr...@gmail.com wrote: Here is a modified versionhttps://bitbucket.org/rochacbruno/surveycloud Bug fixes Auth included No more cpuckle Powertables Smart reports http://zerp.ly/rochacbruno Em

[web2py] Dropdown field not being accepted

2011-06-30 Thread Happy Rob
Hi I'm looking at doing a neural net 20 questions type program at some stage, but still having difficulty with the basics. Currently if I do a dropdown field, it won't let me enter the data unless the question on the NEXT screen is the same as this one. I know it's something to do with the fact

[web2py] Re: Computed fields from multiple tables

2011-05-07 Thread Happy Rob
the basic coding! (ie phase 2) All the best Rob On May 6, 2:05 am, villas villa...@gmail.com wrote: HiHappyRob, If you want this to be flexible,  I guess you would need something more like this: entrants: id, name exams: id, descr exam_entry: exam_id, entrant_id, total_scrore questions: id

[web2py] Computed fields from multiple tables

2011-05-04 Thread Happy Rob
Computed fields from multiple columns I'm new to programming and have a question How can I make a computed field that adds up from another table depending on the contents of the first table? eg A multi choice exam has the results entered by formfactory. The answers and their scores are stored in a

[web2py] Re: list:reference problem?

2010-08-19 Thread Rob
just a guess, but: requires=IS_IN_DB(db,db.service_provider.id, '%(name)s') should be: requires=IS_IN_DB(db,db.service_provider, '%(name)s') On Aug 19, 12:15 pm, Johann Spies johann.sp...@gmail.com wrote: The model: db.define_table(gr01,                 Field(service_provider,

[web2py] Re: Decimal data types?

2010-08-15 Thread Rob
Looks like it does: http://web2py.com/book/default/chapter/06?search=decimal On Aug 15, 3:25 pm, Philip philip.el...@gmail.com wrote: Does web2py support python decimal data type for fields? The info on the web athttp://www.web2py.com/examples/default/dal suggests the answer is no, but I just

[web2py] Re: Online book updated again

2010-08-11 Thread Rob
I just noticed a typo just above: http://web2py.com/book/default/chapter/13?search=cid which can be accessed by the action via the variables: 1. request.env.http_web2py_component_location 2. request.env.http_web2py_component_location (should be http_web2py_component_element?) On Aug 11, 4:23 

[web2py] Re: proper way to transform a query GAE #1

2010-08-11 Thread Rob
Where is this syntax documented? db(query1)(query2) Is this the same as 'db(query1 query2)' except web2py does the join and not the database? On Aug 11, 12:27 pm, mdipierro mdipie...@cs.depaul.edu wrote: d1=datetime.date(year_full,month,1) d2=datetime.date(year_full,month,31) count =

[web2py] Re: JS question

2010-08-09 Thread Rob
Massimo, You go above and beyond! Thanks you so much for the through explanation. This second version is much much cleaner then the version before it - thanks for hacking trunk to add the change! Now I have to integrate it and make sure I understand how everything works! -Rob On Aug 8, 4:32

[web2py] Re: crud + hidden fields that need to go into the DB?

2010-08-09 Thread Rob
, 10:21 pm, Rob r...@rmdashr.com wrote: I have a model that has a 'Address', 'Lat' and Lon' field.  When the user enters an address, some javascript currently populates the 'Lat' and 'Lon' fields and they get inserted into the DB via crud.create() or crud.update(). How do I hide these fields

[web2py] Re: crud + hidden fields that need to go into the DB?

2010-08-09 Thread Rob
at this point here. Am I making sense? Thanks, Rob On Aug 9, 3:07 pm, mdipierro mdipie...@cs.depaul.edu wrote: You can make something like this work you should not. It is a security vulnerability to have a editable hidden field because it does not prevent the client from editing. In web2py you

[web2py] Re: crud + hidden fields that need to go into the DB?

2010-08-09 Thread Rob
dont know what values you need it. If you dont have any other way nobody prohibit to do that. On 9 ago, 20:46, Rob r...@rmdashr.com wrote: It's probably lame, but I'm attempting to port NerdDinner to web2py (http://nerddinnerbook.s3.amazonaws.com/Part11.htm), in this section they have some

[web2py] Re: Managing routes.py with mercurial checkout

2010-08-09 Thread Rob
You could use the hg bookmark extension and keep 2 local branches. One branch for upstream code and the other branch for your own changes. Before you did a pull, you'd switch back to your upstream branch, pull, switch to local change branch, merge (or rebase) with upstream branch, etc... At

[web2py] JS question

2010-08-07 Thread Rob
for this event, Register, RSVP, new { id=Model.DinnerID }, new AjaxOptions { UpdateTargetId=rsvpmsg, OnSuccess=AnimateRSVPMessage}) % I'd only like to animate if web2py_component returns 'not None'. Possible? Thanks, Rob

[web2py] Re: JS question

2010-08-07 Thread Rob
(javascript) in html need to be between script type=text/ javascript charset=utf-8/script On Aug 7, 6:41 pm, Rob r...@rmdashr.com wrote: Hi, In my attempts to learn, I've been redoing the NerdDinner example from the .NET MVC tutorial with web2py.  But I'm stuck here:http://nerddinnerbook.s3

[web2py] Re: JS question

2010-08-07 Thread Rob
Hi Massimo, I'd love to hear about a more web2py-ese way to do it. Thanks for the solution... your help is much appreciated! -Rob On Aug 7, 6:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: This is not very web2py-ese and there are simpler ways to achieve it. Anyway. I assume the action

[web2py] crud + hidden fields that need to go into the DB?

2010-08-07 Thread Rob
I have a model that has a 'Address', 'Lat' and Lon' field. When the user enters an address, some javascript currently populates the 'Lat' and 'Lon' fields and they get inserted into the DB via crud.create() or crud.update(). How do I hide these fields from the user, but allow the JS to insert

[web2py] Re: crud + custom form broken?

2010-08-04 Thread Rob
(db.Dinners, id) -- Thadeus On Tue, Aug 3, 2010 at 10:16 PM, Rob r...@rmdashr.com wrote: web2py Version 1.81.5 (2010-07-22 23:56:21) def index():    rows = db().select(db.Dinners.ALL)    form = crud.select(db.Dinners)    return dict(form=form, rows=rows) default/index.html

[web2py] crud + custom form broken?

2010-08-03 Thread Rob
web2py Version 1.81.5 (2010-07-22 23:56:21) def index(): rows = db().select(db.Dinners.ALL) form = crud.select(db.Dinners) return dict(form=form, rows=rows) default/index.html: {{extend 'layout.html'}} {{=form.custom.begin}} {{=form.custom.end}} Results in: Traceback (most recent

[web2py] which is the preferred way?

2010-07-23 Thread Rob
does it matter? I'm just trying to get an idea of how everyone builds their stuff. Sorry for asking such basic questions... but I have no one else to ask! :) Thanks, Rob

[web2py] Re: generic.load question

2010-07-21 Thread Rob
data... at least in my example. Why would I use one and not the other? On Jul 21, 12:56 am, mdipierro mdipie...@cs.depaul.edu wrote: Anyway... even with the bug it should work if you set ajax=True which is the most typical use case. On Jul 21, 1:52 am, Rob r...@rmdashr.com wrote: views/item

[web2py] Re: Response.Flash help me understand

2010-07-17 Thread Rob
I'd like to know the answer to this as well - what is the preferred way. In the meantime, can you pass 'keepvalues=True' to your form.accepts() ? http://web2py.com/book/default/section/7/1 The nice thing about doing the redirect is that you're not constantly bothered with the resubmit form data

[web2py] Re: generic.load

2010-07-16 Thread Rob
/ea6bed4a71253a1d Thanks, Rob On Jul 13, 10:06 am, mdipierro mdipie...@cs.depaul.edu wrote: BTW since 1.80.1 welcome include a generic.load what is it? Say you have      def someaction():           any action          return dict(form=crud.create(db.mytable)) which may or may not have a view

[web2py] Re: general design question

2010-07-16 Thread Rob
.  You just have to remember to move your view files and change your redirect() calls as needed to accommodate the new URL mapping. That being said, my intent from here on out is to start with each controller in own file. Cheers, Mike On Jul 16, 4:33 pm, Rob r...@rmdashr.com wrote: Hi

[web2py] IS_IN_DB(..., multiple=True)

2010-07-15 Thread Rob
I had an existing table defined and just added multiple=True to the IS_IN_DB statement because I want to convert it from a '1 to 1' to a '1 to many'. So, I had some data in the DB before I set 'multiple=True'. (btw, is there a bug tracker setup so I don't have to spam the group with reports?) I

[web2py] Re: AttributeError: 'Set' object has no attribute 'uploadseparate'

2010-07-15 Thread Rob
Thanks! On Jul 15, 1:06 am, mdipierro mdipie...@cs.depaul.edu wrote: this has been fixed in trunk. Will repost today. On 14 Lug, 23:57, Rob r...@rmdashr.com wrote: Hi guys! I just got this traceback: Traceback (most recent call last):   File /home/rhd/Desktop/web2py/gluon

[web2py] Re: IS_IN_DB(..., multiple=True)

2010-07-15 Thread Rob
Many thanks! On Jul 15, 11:21 am, mdipierro mdipie...@cs.depaul.edu wrote: multiple=True is  afake 1 to many. It stores references as a string '| 1|5|8|' therefore it requires the field to be of type 'string' not int or reference. On 15 Lug, 09:51, Rob r...@rmdashr.com wrote: I had

[web2py] AttributeError: 'Set' object has no attribute 'uploadseparate'

2010-07-14 Thread Rob
Hi guys! I just got this traceback: Traceback (most recent call last): File /home/rhd/Desktop/web2py/gluon/restricted.py, line 178, in restricted exec ccode in environment File /home/rhd/Desktop/web2py/applications/list/controllers/ default.py, line 124, in module File

[web2py] Re: crud.update not updating image correctly?

2010-07-13 Thread Rob
any word on getting SQLFORM to work correctly? it doesn't work in Version 1.80.1 form = SQLFORM(db.Item, item, upload=URL(r=request,f='download'), deletable=True, next=URL(r=request, args=item)) On Jul 11, 12:16 am, Rob r...@rmdashr.com wrote: FYI, the problem also appears when using

[web2py] Re: crud.update not updating image correctly?

2010-07-11 Thread Rob
(db.Item, item,next=URL(r=request)) but this should be considered a bug in sqlhtml.py and I will try fix it. On 10 Lug, 20:06, Rob r...@rmdashr.com wrote: db: db.define_table('Item',                 Field('description'),                 Field('need', 'boolean

[web2py] Re: submit many forms

2010-07-11 Thread Rob
after a quick google search: http://www.codetoad.com/forum/15_24387.asp Looks like it can easily be done with JS. Good luck! On Jul 11, 7:02 am, Rick sababa.sab...@gmail.com wrote: Hi, Let's say that there are a number of forms on the same page. There would be no problem to put a submit

[web2py] Re: submit many forms

2010-07-11 Thread Rob
http://www.9lessons.info/2009/06/submit-multiple-forms-jquery-ajax.html that might be better? apparently the issue is somewhat painful... On Jul 11, 7:02 am, Rick sababa.sab...@gmail.com wrote: Hi, Let's say that there are a number of forms on the same page. There would be no problem to put

  1   2   >