[web2py] Re: response.view does not work with @cache

2011-01-27 Thread selecta
very nice, thank you On Jan 26, 6:19 pm, Massimo Di Pierro wrote: > You can put this in a model: > > if application.function='option': response.view='default.html' > > On Jan 26, 9:41 am, selecta wrote: > > > > > this will not work since the inforamtion that a different view should > > be userd

[web2py] Re: PDF Reports with Pisa

2011-01-27 Thread mart
This is nice stuff! On Jan 26, 9:56 pm, "Lucas D'Avila" wrote: > Hi! > > I added support for Pisa [1] on appreport plugin [2], appreport now has two > engines to generate PDF documents: the pyfpdf and Pisa. > > Simply import the appreport plugin in web2py and use, no need to install > other depen

[web2py] Test controller again

2011-01-27 Thread walter
Excuse me. May be I'm stupid, but I don't understand how to test next case. I want to test that a response.status really has 303. Bit of my code: def show(): if request.args(0) == None: redirect(URL('index')) How should I write a doctest for this?

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-27 Thread cjrh
On Jan 27, 4:09 am, Rupesh Pradhan wrote: > I have made enough of mistakes in learing how to code and analyse software > coding properly and now my application are basically a bloatware and > increasing in complexity year after year. Good! That application is probably your greatest source of lea

[web2py] Re: Change in URL args handling

2011-01-27 Thread cjrh
On Jan 27, 7:04 am, Jonathan Lundell wrote: > This applies to both the old and new URL rewrite paths, regardless of whether > there's any rewriting going on. I had another fight with the old routes.py yesterday. Is there any kind of timeline on the new router making it into stable? :))

[web2py] Modify calendar.js

2011-01-27 Thread luifran
I would like to change the calendar.js date format, I want the format d / m / y instead ofy / m / d ¿It´s possible?

[web2py] Re: can web2py support RESTful api calls? if so any pointers on how to build one?I

2011-01-27 Thread superavit
awesome thanks for the pointer! On Jan 26, 7:50 pm, pbreit wrote: > It should be possible. After all, REST is usually just making GETs and POSTs > to URLs/URIs. Web2py has some features to help out. Take a look at the > chapter on Services:http://web2py.com/book/default/chapter/09 > > RESTful sys

[web2py] AJAX in Web2py -> Synchronous

2011-01-27 Thread Phoboss
Hi Experts, how can I turn off asynchron AJAX in web2py? It sounds strange but I need it synchronous! BTW, I implemented this example: http://www.web2py.com/book/default/chapter/10#Ajax-Form-Submission Thank you so much! Best Regards Phoboss

[web2py] web2py hosting on google app engine and pointing to my own domain

2011-01-27 Thread superavit
Can anybody suggest how to host a web2py app? I know that google app engine is an option, but if I use that can I make it show as my own domain? Any other hosting options better? I appreciate the help Jason

[web2py] Re: Another instance of No such file or directory: '/opt/web-apps/web2py/applications/admin/..

2011-01-27 Thread Ed Greenberg
Hi Massimo, I posted an issue on Google code for checking the return value of app_create. That is only a side-issue for me, since the real real question is why app_create is failing. After much poking around, I discovered that I was missing the file welcome.w2p from the web2py directory. This cau

[web2py] how to user the html helper?

2011-01-27 Thread web2pyer
I tried the below what is given in the official documentation >>> a = DIV(SPAN('a', 'b'), 'c') >>> print a abc >>> del a[1] >>> a.append(B('x')) >>> a[0][0] = 'y' >>> print a ybx I typed >>>a = DIV(SPAN('a', 'b'), 'c') >>>print a abc but when I typed >>> del a[1] >>> a.append(B('x')) >>> a[0][0]

[web2py] Re: URL formation in CRUD

2011-01-27 Thread Running Clam
If this isn't something anyone else has encountered, can anyone clue me in as to how to start digging into this? I'm not sure whether to start with my own set-up (Windows, Version 1.91.6), or dive into the web2py source, which I've not had reason to do before...

[web2py] creating html for the user to save or copy/paste

2011-01-27 Thread Ed Greenberg
I have a controller function that we can call "next()" since that's what it is called :) I have created a block of html in that function, contained in a string. I'd like to return it to the user so he can reuse it (not just view it in the browser.) Sending it to the browser causes the various sp

Re: [web2py] Re: URL formation in CRUD

2011-01-27 Thread web2py noob
ref: http://web2py.com/book/default/chapter/07#CRUD crud.settings.controller = 'crm' 2011/1/27 Running Clam : > > If this isn't something anyone else has encountered, can anyone clue > me in as to how to start digging into this? > > I'm not sure whether to start with my own set-up (Windows, Vers

Re: [web2py] creating html for the user to save or copy/paste

2011-01-27 Thread Bruno Rocha
Try XML with escape set to True/False {{=XML(htmlobject, escape=True|False)}} -- Bruno Rocha http://about.me/rochacbruno/bio 2011/1/27 Ed Greenberg > I have a controller function that we can call "next()" since that's > what it is called :) > > I have created a block of html in that function

Re: [web2py] Re: Represent not working in details on Powertable

2011-01-27 Thread web2py noob
good job jclevy. i hope the fix for this could reach stable version soon. 2011/1/26 jclevy : > Bruno Rocha writes: > >> >> >> 2011/1/21 web2py noob >> >> >> >> bruno, what you say above is wrong. the workaround is: >> >> db.define_table('tablename', >>     Field('fieldname',db.othertable, repres

[web2py] Re: URL formation in CRUD

2011-01-27 Thread Running Clam
Hi, On Jan 27, 1:56 pm, web2py noob wrote: > ref:http://web2py.com/book/default/chapter/07#CRUD > > crud.settings.controller = 'crm' > D'Oh! Will retest and report back as to how I got on. -- Clam

[web2py] IS_IN_SET texts

2011-01-27 Thread Kenneth Lundström
I have a field priority = integer, can be anything between 1-5 (or 6 in Python way) but I´d like to make a dropdown with options, '1, Fixed yesterday', '2, to be fixed today', '3, fixed before release' and so on. Is this possible with IS_IN_SET or do I have to make my own form? When viewing

[web2py] Re: how to user the html helper?

2011-01-27 Thread DenesL
The original works for me. Do a 'print a' after each command and see how it changes. On Jan 27, 1:55 am, web2pyer wrote: > I tried the below what is given in the official documentation>>> a = > DIV(SPAN('a', 'b'), 'c') > >>> print a > > abc>>> del a[1] > >>> a.append(B('x')) > >>> a[0][0] = 'y'

[web2py] Re: AJAX in Web2py -> Synchronous

2011-01-27 Thread DenesL
Hi Phoboss, web2py uses the jQuery.ajax API which has a parameter named async for that. Try changing your app's web2py_ajax.html file where the jQuery.ajax calls are made and specify async : false . Denes On Jan 27, 3:53 am, Phoboss wrote: > Hi Experts, > > how can I turn off asynchron AJAX in

[web2py] Can't generate index.yaml

2011-01-27 Thread devGS
Hello, I'm can't make my GAE Launcher to generate the indexes file. I tried to clean the datastore locally, tried to play with models/0.py file, to place my own index.yaml in web2py folder with "# AUTOGENERATED", but so far nothing have worked. I use Janrain for logging in, and the only table at d

[web2py] Re: AJAX in Web2py -> Synchronous

2011-01-27 Thread Phoboss
Hi Denes, firstly thank you for your swift response! I'm now at work. So in 4 hours or so I'll try it at home. After that I'll report here if it's works. Best Regards Phoboss On 27 Jan., 15:49, DenesL wrote: > Hi Phoboss, > > web2py uses the jQuery.ajax API which has a parameter named async f

[web2py] Re: web2py hosting on google app engine and pointing to my own domain

2011-01-27 Thread Anthony
Here's my answer from Stackoverflow: http://stackoverflow.com/questions/4810295/web2py-hosting-on-google-app-engine-and-pointing-to-my-own-domain/4813410#4813410 Welcome to the list. Anthony On Wednesday, January 26, 2011 9:27:17 PM UTC-5, superavit wrote: > Can anybody suggest how to host a

Re: [web2py] Re: Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 6:16 AM, cjrh wrote: > > On Jan 27, 7:04 am, Jonathan Lundell wrote: >> This applies to both the old and new URL rewrite paths, regardless of >> whether there's any rewriting going on. > > I had another fight with the old routes.py yesterday. Is there any > kind of timelin

[web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2011-01-27 Thread ghoulmann
I've gotten feedback from one person, but could use some more. If anyone has a chance, please check out the ISO (preferably) or virtual appliances derived from the TKLpatch; they're available at http://9while9.com. I appreciate the time you may commit to testing this. Much appreciated, Rik Goldman

Re: [web2py] Change in URL args handling

2011-01-27 Thread Jason Brower
I wonder if there is an example where this could be an advantage for us? BR, Jason On Wed, 26 Jan 2011, Jonathan Lundell wrote: This applies to both the old and new URL rewrite paths, regardless of whether there's any rewriting going on. Previously, a trailing slash after args would cause an

[web2py] Re: We should have this plugin...

2011-01-27 Thread Massimo Di Pierro
This is doable... On Jan 27, 1:19 am, Jason Brower wrote: > How many plugin... > It would, every once in a while, at triggers etc.. tweet some session > variable. > The reason I say this is I think it would be cool to see tweets of how > many downloads a day we get from web2py.com and how many wh

[web2py] Re: web2py launcher for Debian package

2011-01-27 Thread Massimo Di Pierro
The message is still there for me. On Jan 27, 1:24 am, José L. wrote: > This message has disappeared from the web2py google groups site . I don't > know why. > So, I'm bumping it > > > > > > > > On Wednesday, January 26, 2011 8:33:37 PM UTC+1, José L. wrote: > > > Hello, in order to do the packag

[web2py] Re: Test controller again

2011-01-27 Thread Massimo Di Pierro
def show(): """ >>> request.args.clear() >>> try: print show() >>> except HTTP, http: print 'ok' ok """     if request.args(0) == None:         redirect(URL('index')) On Jan 27, 4:08 am, walter wrote: > Excuse me. May be I'm stupid, but I don't understand how to test next

[web2py] Re: Change in URL args handling

2011-01-27 Thread Massimo Di Pierro
Correct. I am trying to close the majority of open issues are release 1.92 next week. On Jan 27, 9:21 am, Jonathan Lundell wrote: > On Jan 27, 2011, at 6:16 AM, cjrh wrote: > > > > > On Jan 27, 7:04 am, Jonathan Lundell wrote: > >> This applies to both the old and new URL rewrite paths, regardle

Re: [web2py] Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 9:25 AM, Jason Brower wrote: > > I wonder if there is an example where this could be an advantage for us? The change was driven by a report that /a/c/f/arg and /a/c/f/arg/ generated different request.args lists, when we ordinarily expect a trailing slash to be ignored. The

[web2py] Re: Callable as Field.default

2011-01-27 Thread Bernd Rothert
Sorry, I just saw that you had to revert the change, most probably because it makes test_dal.py fail. Row and Reference are callable() as well! This patch passes the tests but unfortunately doesn't make represent() look any nicer. diff -r 7c6da73479e7 gluon/dal.py --- a/gluon/dal.py Wed Jan

Re: [web2py] Re: Adding fields to the default register form;

2011-01-27 Thread Vinicius Assef
On Thu, Jan 27, 2011 at 3:27 AM, Bruno Rocha wrote: > Thinking a bit more, taking the Vinicius comment and some examples of > another O.O frameworks. > I was wondering about... > #2 > auth.settings.formstyle = 'divs' > form = auth() > print form #  return the HTML with divs OK, but formstyle isn'

Re: [web2py] Callable as Field.default

2011-01-27 Thread Ole Martin Maeland
instead of default=now use default = request.now also change default = now in modified_on to update=request.now regards Martin On Wed, Jan 26, 2011 at 1:36 AM, Bernd Rothert wrote: > A table definition from the DAL chapter of the Web2py book: > > db.define_table('person', >Field('uuid', len

[web2py] Re: Can't generate index.yaml

2011-01-27 Thread Michael McGinnis
I had a similar experience. My app ran fine on web2py and on the GAE SDK, but when I deployed it, the indexes (which surely were created while running it on the SDK), never arrived. On Jan 27, 8:49 am, devGS wrote: > Hello, > I'm can't make my GAE Launcher to generate the indexes file. I tried >

[web2py] Re: URL formation in CRUD

2011-01-27 Thread Running Clam
Hi, OK, specifying the controller as follows: - crud.settings.controller = 'crm' ...as suggested by web2py.n00b resolves the controller name issue, and I feel suitably foolish for having overlooked it. However, the omission of the "data" function name still happens when I drill down to a record

[web2py] Re: Can't generate index.yaml

2011-01-27 Thread devGS
So, is there any way to fix that today? Unlike what you'd mentioned, my indexes are not created at all. On Jan 27, 6:11 pm, Michael McGinnis wrote: > I had a similar experience. My app ran fine on web2py and on the GAE > SDK, but when I deployed it, the indexes (which surely were created > while

Re: [web2py] Extend Field Type "upload" to a CDN

2011-01-27 Thread Bruno Rocha
I am in the way of doing that to work with DropBox API. 2011/1/27 Art Zemon > Has anyone extended or overloaded the Field type "upload" to work with a > CDN such as Rackspace Cloud Files or Amazon S3 instead of a local > filesystem? > > Thanks, > -- Art Z. > > -- > > Art Zemon, President >

Re: [web2py] Re: Adding fields to the default register form;

2011-01-27 Thread Anthony
On Thursday, January 27, 2011 11:00:45 AM UTC-5, viniciusban wrote: > > On Thu, Jan 27, 2011 at 3:27 AM, Bruno Rocha wrote: > > Thinking a bit more, taking the Vinicius comment and some examples of > > another O.O frameworks. > > I was wondering about... > > #2 > > auth.settings.formstyle = 'divs

[web2py] Auth callbacks when using Janrain

2011-01-27 Thread scausten
I'm using Janrain and I need to perform some actions post- registration, but the usual auth callbacks don't seem to be working. I'm running a very simple test function in my model: db.define_table('user_data',Field('testfield')) auth.settings.register_onvalidation.append(lambda form:db.user_data.i

Re: [web2py] Re: Adding fields to the default register form;

2011-01-27 Thread David J.
The fact that auth is so tightly coupled with the view is very frustrating; It would be better if auth return an object that was wrappable; in FORM(); rather than the rendered form This way you can do things like addfield() to the form before it is rendered or just render it as it is; I as

[web2py] Pass variables from javascript to a controller

2011-01-27 Thread Ialejandro
Hi! I'm playing with web2py, and I'm making a booking system, I have a model as follow: db.define_table('room', Field('name','string'), Field('location','string')) I'm showing the rooms as a list with jqueryUI selectable (http:// jqueryui.com/demos/selectable/display-grid.html), so every

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-27 Thread Rupesh Pradhan
Thanks a lot for sharing the philosophy behind coding!!! I get the point. Now for some *real* help by nitpicking at my coding!

Re: [web2py] Re: Adding fields to the default register form;

2011-01-27 Thread Bruno Rocha
2011/1/27 David J. > I asked before "what is the easiest way to add a non-database field to the > registration form" > > > Right now I dont see an easy way to do this; > You can interact with the HTML for the FORM object. form = auth() form.elements[0].append(SOME_OTHER_ELEMENT) The FORM is re

[web2py] Re: Callable as Field.default

2011-01-27 Thread Bernd Rothert
On Jan 27, 5:08 pm, Ole Martin Maeland wrote: > instead of default=now use default = request.now > > also change default = now in modified_on to update=request.now > > regards > Martin > You are right - that works because request.now is a datetime value. The point is that it should be possible to

Re: [web2py] creating html for the user to save or copy/paste

2011-01-27 Thread Bruno Rocha
Sorry my mistake. I mean: {{=XML(htmlobject, sanitize=True|False)} #not escape Bruno Rocha http://about.me/rochacbruno/bio 2011/1/27 Bruno Rocha > Try XML with escape set to True/False > > {{=XML(htmlobject, escape=True|False)}} > > > -- > Bruno Rocha > http://about.me/rochacbruno/bio > > >

[web2py] Re: Pass variables from javascript to a controller

2011-01-27 Thread Mathew Grabau
Have you tried anything yet? A skeleton solution/recommendation: - If I assume correctly that the values are the HTML INPUT values, then use the selected event on the jQueryUI objects - for the above event, the handler adds the selected rooms to a stored collection (Array perhaps) in client-side

Re: [web2py] Re: Adding fields to the default register form;

2011-01-27 Thread Anthony
Sorry, my misunderstanding. Thanks for clarifying, Bruno. Anthony On Thursday, January 27, 2011 12:53:34 PM UTC-5, rochacbruno wrote: > > 2011/1/27 David J. > >> I asked before "what is the easiest way to add a non-database field to the >> registration form" >> >> >> Right now I dont see an

[web2py] Fix for kpaxcms

2011-01-27 Thread Martin Barnard
Hi. I've been lurking here whilst trying out web2py (thanks for the software, Massimo!). I'm looking at building something similar to kpax, with a few modified tweaks. However, when I tried to change group permissions, I'd get this error. It's in access.py controller, change function: Error Tr

[web2py] Re: GAE Flow doesn't seems work. (fixed & closed)

2011-01-27 Thread Arun K.Rajeevan
Actually the problem was something I really do not expected. items.append(DIV(DIV(*[data[item]], _id = 'wrap'), _id = 'ui-tabs-'+str(i))) needed to be items.append(DIV(DIV([data[item]], _id = 'wrap'), _id = 'ui-tabs-'+str(i))) No star (*) needed!!!

Re: [web2py] django admin like app/plugin in web2py

2011-01-27 Thread Richard Vézina
appadmin is for the admin and not for users since there is no CRUD restriction that apply to the db views that appear into it. It not accessible in prod deployment instead you access your app in https mode (with ssl certificat). I am not aware of any appadmin goodies (other appadmin implementation

[web2py] Re: django admin like app/plugin in web2py

2011-01-27 Thread rif
I requested this feature in uservoice: http://web2py.uservoice.com/forums/42577-general You can vote for it. rif On Jan 27, 6:37 am, William wrote: > Hi all, > I just got started in web2py and like it so far. > I noticed that it has a admin and an appadmin for each app. > > but i think appadmi

[web2py] Re: Change in URL args handling

2011-01-27 Thread DenesL
Hi Jonathan, On Jan 27, 12:04 am, Jonathan Lundell wrote: > This applies to both the old and new URL rewrite paths, regardless of whether > there's any rewriting going on. > > Previously, a trailing slash after args would cause an extra arg to be added > to the list with a value of '' (empty st

[web2py] Re: IS_IN_SET texts

2011-01-27 Thread DenesL
You can use requires=IS_IN_SET({1:'Fixed yesterday', 2:'to be fixed today', ...}) On Jan 27, 9:32 am, Kenneth Lundström wrote: > I have a field priority = integer, can be anything between 1-5 (or 6 in > Python way) > > but I d like to make a dropdown with options, '1, Fixed yesterday', '2, > to

[web2py] Re: New User - a few simple questions...

2011-01-27 Thread g...@rtplanb.com
Cheers Anthony, Ill get started on the menu's. Not far from being able to deploy my first Web2Py website!!!

Re: [web2py] Re: Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 11:54 AM, DenesL wrote: > Hi Jonathan, > > On Jan 27, 12:04 am, Jonathan Lundell wrote: >> This applies to both the old and new URL rewrite paths, regardless of >> whether there's any rewriting going on. >> >> Previously, a trailing slash after args would cause an extra ar

[web2py] Re: Overwriting the default "register" action

2011-01-27 Thread DenesL
Please post your 'register' controller and related models.

[web2py] Re: Change in URL args handling

2011-01-27 Thread DenesL
> >> Now, trailing slashes are stripped, so the first two examples about give > >> ['arg1'], as does /a/c/f/arg1/ > > > Maybe that should be parsed as ['arg1', '', '', '', ''] > > Maybe, but it seems to me that it's confusing unless we also recognize a > single trailing slash as an empty arg.

[web2py] Re: can web2py support RESTful api calls? if so any pointers on how to build one?I

2011-01-27 Thread howesc
while the current version does not prescribe to RESTfulness very well, check out http://starmakerapp.com/ this iPhone app's database backend is web2py on GAE. it's still kinda beta version, but many enhancements (including converting the website for the app to web2py) are coming! so yes, it's

[web2py] Re: Test controller again

2011-01-27 Thread howesc
to enhance massimo's response, you can test the HTTP status code in the except block: >>> try: ... index() ... except HTTP, e: ... assert(e.status == 400) ... assert(e.body == "Not permitted") ...

[web2py] GAE belongs (how to map long list)

2011-01-27 Thread Arun K.Rajeevan
Hi, I know belongs is not supported on GAE >From http://www.web2py.com/AlterEgo/default/show/248 > *it's clear that we have to convert* rows = db(purchase.buyer.belongs((kenny,cartman)))\ .select(orderby=purchase.quantity) *to* *

Re: [web2py] Re: Powertable remarks

2011-01-27 Thread António Ramos
That was an excelent question! Any answer from Bruno? Thanks António 2011/1/18 Johann Spies > I started this thread: > > > On 17 December 2010 12:11, Johann Spies wrote: > >> >> * I have tested it this morning on a table with more just over 8200 >> entries and it took 70-90 seconds on Firefo

[web2py] Re: django admin like app/plugin in web2py

2011-01-27 Thread William
Just vote it! why nobody care this? They claim django admin is the kill feature of django.

[web2py] Re: can web2py support RESTful api calls? if so any pointers on how to build one?I

2011-01-27 Thread William
Thanks cfh. I am wondering could you write a blog or forum post about the post interface you did? that will be very helpful. -Bill

Re: [web2py] Re: T-Shirts web2py

2011-01-27 Thread mikech
+1 Zazzle is another alternative. I don't know if you've ordered t-shirts from Cafe Express, but I did some time ago, and they seemed very lightweight. Don't know if Zazzle is any better. Here is a comparison: http://www.squidoo.com/cafepress_alternative

Re: [web2py] Re: Callable as Field.default

2011-01-27 Thread Vinicius Assef
On Thu, Jan 27, 2011 at 3:54 PM, Bernd Rothert wrote: > > Multiple inserts for the same request should get unique uuids of > course, so we need a function here. I faced this problem some time ago. Default values defined in models are not assigned in INSERT time, but in REQUEST time. So, if you

Re: [web2py] Re: Change in URL args handling

2011-01-27 Thread Jonathan Lundell
On Jan 27, 2011, at 12:48 PM, DenesL wrote: > Now, trailing slashes are stripped, so the first two examples about give ['arg1'], as does /a/c/f/arg1/ >> >>> Maybe that should be parsed as ['arg1', '', '', '', ''] >> >> Maybe, but it seems to me that it's confusing unless we also r

[web2py] Troubles with index action

2011-01-27 Thread walter
This is my code. I specifically made it so primitive. def index(): ''' >>> db.news.insert(title="Test", body="Test-test") ''' return dict(table="news") Next code is my db: db.define_table('news', Field('title'), Field('body', 'text'), Field('created_at',

Re: [web2py] Troubles with index action

2011-01-27 Thread Bruno Rocha
You can try def index(): >''' >>>> db.news.insert(title="Test", body="Test-test") > >>> db.commit() > >''' >return dict(table="news") > sqlite locks on multiple connections.

[web2py] Re: Troubles with index action

2011-01-27 Thread walter
Many thanks

[web2py] Re: AJAX in Web2py -> Synchronous

2011-01-27 Thread Phoboss
OK, I tried to change the code of web2py_ajax.html BUT all function code was commented out!! What is going on? Why is all commented out? Is it commented out because all the code in web2py_ajax.html is only for changing AJAX-settings? Like turning asynchronisation off? I built my app by using the fo

[web2py] Re: AJAX in Web2py -> Synchronous

2011-01-27 Thread Anthony
On Thursday, January 27, 2011 6:55:24 PM UTC-5, Phoboss wrote: > > OK, I tried to change the code of web2py_ajax.html BUT all function > code was commented out!! What is going on? Here's the file in trunk: http://code.google.com/p/web2py/source/browse/applications/welcome/views/web2py_ajax.ht

[web2py] Fwd: web2py basic auth

2011-01-27 Thread miguel
I suppose this is mentioned in the Change Log by: "on_failed_authorization can be a function, thanks Niphold" How is this used? could the function be a lambda, does it take params, is it an action (i.e. a controller function)? Also, is it possible to allow the usual login redirection in case it i

[web2py] CRUD onaccept - get inserted record id?

2011-01-27 Thread DJ
Hi there, I would like to perform another database transaction using crud.settings.create_onaccept soon after a CRUD create action using the newly created record id. That is, does CRUD create return the ID of the new record for downstream processing? If so, how do I get it? If this is not p

[web2py] Re: CRUD onaccept - get inserted record id?

2011-01-27 Thread DenesL
Hi, onaccept is called with form as a parameter after the form is accepted, so form.vars.id has the newly inserted record id. You can multiple functions called by onaccept: onaccept=lambda form: (f1(form),f2(form),f3(form),...) Denes. On Jan 27, 8:16 pm, DJ wrote: > Hi there, > > I would lik

[web2py] Re: Can any help me with new dal in trunk?

2011-01-27 Thread drayco
Hi, Now my old application is work's with trunk. Thank's a lot to fix it. Hi, Now one of my old application is work's with trunk version. Thanks a lot to fix it. However I obtain the same issue with mysql and legacy database, this is other old application, this is the issue Traceback (most rec

[web2py] Re: Need help in standardizing my coding and naming schemes before I start my main project

2011-01-27 Thread Rupesh Pradhan
Thanks a lot MARTIN for the nitpick. REALLY needed that! Inspite of what you mentioned that you are relatively new to web2py, that was a lot of help. I don't know if other are going to help me out as much as you did. But since you did take the trouble to pore through my code, I was hoping that

[web2py] Possible DB bug on update;

2011-01-27 Thread David J.
I am using 1.9.1.4 I see a strange behavior I am doing this simple test; def update(): rows = db((db.nums.hold==False) & (db.nums.active==False)).select() for row in rows.find(lambda row: row.num[len(row.num)-2:]=='55'): row.update(hold=True) db.commit() return loca

[web2py] Re: Possible DB bug on update;

2011-01-27 Thread ron_m
>From the DAL chapter of the manual update_record update_record web2py also allows updating a single record that is already in memory using update_record 1. 2. 3. >>> rows = db(db.person.id > 2).select() >>> row = rows[0] >>> row.update_record(name='Curt') This should not be confused with 1.

Re: [web2py] Re: Possible DB bug on update;

2011-01-27 Thread David J.
Darn; I missed that; Thanks for the help; I really thought I read the chapter through. Thanks. On 1/27/11 11:44 PM, ron_m wrote: >From the DAL chapter of the manual |update_record| update_record web2py also allows updating a single record that is already in memory using |update_re

Re: [web2py] Re: Possible DB bug on update;

2011-01-27 Thread ron_m
It is quite a lot to learn, no problem. Glad I could help.

[web2py] image as background

2011-01-27 Thread mart
Hi, Anybody know how to set an image as background (would fit the entire page)? Thanks in advance, Mart :)

[web2py] What is web2py best practice basis for modular site development?

2011-01-27 Thread JoeCodeswell
Dear web2py users, I am developing a website that will have many features, some of which are not yet specified by my client. Therefore and for other reasons, I would like to develop it in a modular fashion. Should I base my website on a web2py site with a single application, with modularity achie

Re: [web2py] image as background

2011-01-27 Thread Kenneth Lundström
If you have a div that spans the whole page you can via css and background: url(../images/background.jpg) have a background. Kenneth Hi, Anybody know how to set an image as background (would fit the entire page)? Thanks in advance, Mart :)

[web2py] Re: image as background

2011-01-27 Thread mart
Sweet! Thanks for the tip! :) On Jan 28, 1:50 am, Kenneth Lundström wrote: > If you have a div that spans the whole page you can via css and > background: url(../images/background.jpg) have a background. > > Kenneth > > Hi, > > > > > > > > > Anybody know how to set an image as background  (would

Re: [web2py] What is web2py best practice basis for modular site development?

2011-01-27 Thread Kenneth Lundström
My gut tells one application, having applications share layout, database and all is not piece of cake. But I guess it depends on the application, but I would make it as one application. Kenneth Dear web2py users, I am developing a website that will have many features, some of which are no

[web2py] Re: PDF Reports with Pisa

2011-01-27 Thread mart
Just letting you now... I looking to see it in action (the custom _code part looks really interesting), but am stumped as it tries to do the local import ... it doesn't seem to see the plugin On Jan 27, 4:30 am, mart wrote: > This is nice stuff! > > On Jan 26, 9:56 pm, "Lucas D'Avila" wrote: > >