Re: [web2py] Re: a new html editor

2011-05-07 Thread Vasile Ermicioi
fixed, try now, thank you guys for feedback

[web2py] Re: Computed fields from multiple tables

2011-05-07 Thread Happy Rob
Thanks a lot guys I followed pbreits advice and just got rid of the computed fields, doing it instead in the controller. Much more elegant. To D Villas - I like your framework more than mine, but at the moment I'm working on 'minimum specs', I'll come back to yours when I actually understand the ba

[web2py] Re: help

2011-05-07 Thread pbreit
Input boxes are a form. I'd suggest doing it in the usual way: http://web2py.com/book/default/chapter/07#Forms-and-redirection

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread pbreit
You don't want "redirect" and "return" in the same block since both end the function. A typical form handling plus redirect pattern is shown here: http://web2py.com/book/default/chapter/07#Forms-and-redirection

[web2py] Re: a new html editor

2011-05-07 Thread Plumo
http://8plus2.org/init/static/bolteditor/index.html currently throws a 502 error.

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread Plumo
Will depend on your use case whether you should redirect or just change view. You can change the view with: response.view = 'default/other.html'

[web2py] Re: CRUD.search sorting order

2011-05-07 Thread villas
Hi Niknok This was indeed confirmed as a problem which has now been fixed by Massimo. You would have to download the latest version of the file tools.py from the 'trunk' in google code. Regards, D On May 6, 2:00 pm, niknok wrote: > Thanks for the response Villas. > > Do note that my use of >  

Re: [web2py] Re: a chance to vote for web2py

2011-05-07 Thread Bruno Rocha
I registered it, it grabbed the images from google search using 'web2py' and I could not find better image than that, now I have no permission to edit this. On Sat, May 7, 2011 at 3:39 PM, Anthony wrote: > It would be cool if it showed the web2py logo instead of just the Python > logo. > > On Sa

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread Anthony
On Saturday, May 7, 2011 4:16:03 PM UTC-4, JagChris wrote: > > > def index(): > > if request.vars : > quest_types = request.vars.typeofques > quest_num = request.vars.numofques > RetURL="http://mathmakerapi.appspot.com/cs34wmathmaker/default/ > worksheet.json?num

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread JagChris
i also have a mathworksheet view which i believe would output the data, but i wantd to try the code what i have written for it : {{extend 'layout.html'}} This is the default/mathworksheet.html template {{extend 'layout.html'}} {{=message}} Number of Problems: {{=number_of_problems}}

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread JagChris
There is a table i building in another view to show the relevant json data but i was starting to wonder if it is feasible

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread JagChris
they are in the mathworksheet function...i paste everything below...i want that after i slick submit on my form it redirects to another view called mathworksheet where it will look to display everything from the json import urllib from gluon.contrib import simplejson as json ##

Re: [web2py] Re: help

2011-05-07 Thread TÅ®å ßrown
smiles.. thanks again On Sat, May 7, 2011 at 1:53 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This line is wrong > > > success: function() { {{redirect(URL(f="mathgen"))}}} > > because everything inside {{}} is executed by the server BEFORE > the page is rendered and ret

Re: [web2py] Re: help

2011-05-07 Thread TÅ®å ßrown
thanks On Sat, May 7, 2011 at 1:36 PM, Anthony wrote: > On Saturday, May 7, 2011 12:48:41 PM UTC-4, Resa wrote: >> >> success: function() { >> {{redirect(URL(f="mathgen"))}}} > > > The above is a Javascript function that will be called on the client side, > so the web

[web2py] Re: Problem with Mail.Attachment

2011-05-07 Thread Massimo Di Pierro
This should now be fixed. The problem was a lack of __all__ in gluon/ __init__.py On May 6, 2:47 pm, pbreit wrote: > attachment = Mail.Attachment(filename) > > "is not callable" usually means there is something in () that should not > bet.

[web2py] Re: View errors

2011-05-07 Thread Anthony
See other thread... On Saturday, May 7, 2011 3:01:11 PM UTC-4, JagChris wrote: > ##this block is in my index function : > json_gotten = simplejson.load(json_data) > redirect(URL('mathworksheet')) > #redirect(URL(r=request,f='manageJSON',args=json_gotten)) > > return di

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread Anthony
def mathworksheet(): return dict(message=T('Hello World'), number_of_problems=json_gotten["number_of_problems"], questions=json_gotten["questions"]) Sorry, I missed the comma on the second line -- now I see it's all part of the returned dictionary of mathworksheet. Same problem, though. j

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread Anthony
On Saturday, May 7, 2011 3:08:50 PM UTC-4, JagChris wrote: > > ##this block is in my index function : > json_gotten = simplejson.load(json_data) > redirect(URL('mathworksheet')) > #redirect(URL(r=request,f='manageJSON',args=json_gotten)) > return dict(passedin=json_gott

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread JagChris
##this block is in my index function : json_gotten = simplejson.load(json_data) redirect(URL('mathworksheet')) #redirect(URL(r=request,f='manageJSON',args=json_gotten)) return dict(passedin=json_gotten) ## then i have this def mathworksheet(): return dict(message=T('Hell

[web2py] Re: SyntaxError: Table: missing required field: post_id

2011-05-07 Thread Massimo Di Pierro
Do not use the wordpress clone. It is a very old app which predates lot of the cool new features include authentication. It was written by a student and it is not mantained by anybody. I strongly suggest you use InstantPress or PowerPack instead. On May 7, 12:06 pm, Malahal wrote: > Hi All, I jus

[web2py] Re: View errors

2011-05-07 Thread JagChris
##this block is in my index function : json_gotten = simplejson.load(json_data) redirect(URL('mathworksheet')) #redirect(URL(r=request,f='manageJSON',args=json_gotten)) return dict(passedin=json_gotten) ## then i have this def mathworksheet(): return dict(message=T('Hel

[web2py] Re: help

2011-05-07 Thread Massimo Di Pierro
This line is wrong > success: function() { {{redirect(URL(f="mathgen"))}}} because everything inside {{}} is executed by the server BEFORE the page is rendered and returned to client, therefore it is executed before the client executes any JS, before the Ajax call, before the success fun

[web2py] Re: View errors

2011-05-07 Thread Anthony
On Saturday, May 7, 2011 2:41:23 PM UTC-4, JagChris wrote: > > When i try a view, it gives me an error about inavlid function > (default/whatever)...how to resolve this What do you mean by "try a view"? If you attempt to go to the URL /default/whatever, web2py expects a whatever() function in

[web2py] SyntaxError: Table: missing required field: post_id

2011-05-07 Thread Malahal
Hi All, I just installed web2py and wordpress clone (pypress). If I post a new comment, I get the following traceback. What did I do wrong? Traceback (most recent call last): File "/home/malahal/gae/web2py/gluon/restricted.py", line 181, in restricted exec ccode in environment File "/home

Re: [web2py] Re: How do i redirect to a different view

2011-05-07 Thread Jonathan Lundell
On May 7, 2011, at 11:34 AM, JagChris wrote: > > so if the next view is default/other.html > > it would be redirect(URL('other'))? Right, assuming that the current function is in default. Otherwise redirect(URL('default', 'other'))

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread Anthony
On Saturday, May 7, 2011 2:34:31 PM UTC-4, JagChris wrote: > > so if the next view is default/other.html > > it would be redirect(URL('other'))? Yes, though keep in mind that in web2py, you're not technically calling or redirecting to *views*. Rather, you are redirecting to a *function* (i.e.

[web2py] View errors

2011-05-07 Thread JagChris
When i try a view, it gives me an error about inavlid function (default/whatever)...how to resolve this

Re: [web2py] Re: a chance to vote for web2py

2011-05-07 Thread Anthony
It would be cool if it showed the web2py logo instead of just the Python logo. On Saturday, May 7, 2011 1:25:55 PM UTC-4, rochacbruno wrote: > Now it is 7 of the list, I amm curious about the stats, is there any stats > counter for web2py downloads? Analytics on refering sites to know how many

[web2py] Re: help

2011-05-07 Thread Anthony
On Saturday, May 7, 2011 12:48:41 PM UTC-4, Resa wrote: > > success: function() { > {{redirect(URL(f="mathgen"))}}} The above is a Javascript function that will be called on the client side, so the web2py template code has to evaluate to valid Javascript for it to

[web2py] Re: How do i redirect to a different view

2011-05-07 Thread JagChris
so if the next view is default/other.html it would be redirect(URL('other'))?

[web2py] Re: Can web2py support chaining response.files inside a component?

2011-05-07 Thread Anthony
I see. One option might be to include code in your "component.load" view that makes use of the component's response.files, just like the code in web2py_ajax.html. For example, in "component.load" include: {{ for _k,_file in enumerate(response.files or []): if _file in response.files[:_k]:

Re: [web2py] How do i redirect to a different view

2011-05-07 Thread Jonathan Lundell
On May 7, 2011, at 11:16 AM, JagChris wrote: > > I want after the user clicks the submit button that he/she gets > redirect to a different view how do i do that? redirect(URL(whatever)) in your form.accepts clause

[web2py] How do i redirect to a different view

2011-05-07 Thread JagChris
I want after the user clicks the submit button that he/she gets redirect to a different view how do i do that?

[web2py] Re: help

2011-05-07 Thread Resa
but its not really a form tho... it just input boxes On May 7, 12:36 pm, pbreit wrote: > I'm very confused as to what you are trying to do. Are your users filling > out a form? Do you really need the JavaScript? What are you trying to do > exactly? > > To link between pages, you simply do this (s

[web2py] Re: help

2011-05-07 Thread Resa
oh woe.. thanks for trying to understand tho... ok so yes teh user fill out a form and the Ajax sends the result of the form to a function that updated the db.. after the function updates the database i want to to redirect it to another page.. the problem is teh function for teh page is being calle

[web2py] Re: help

2011-05-07 Thread pbreit
I'm very confused as to what you are trying to do. Are your users filling out a form? Do you really need the JavaScript? What are you trying to do exactly? To link between pages, you simply do this (similar to http://web2py.com/book/default/chapter/03#Say-My-Name): === default.py === def a():

Re: [web2py] Re: a chance to vote for web2py

2011-05-07 Thread Bruno Rocha
Now it is 7 of the list, I amm curious about the stats, is there any stats counter for web2py downloads? Analytics on refering sites to know how many people saw that list and came to web2py.com to know about it, and how many downloaded (google analytics can do the goal analytics) -- Bruno Rocha [ A

[web2py] Re: help

2011-05-07 Thread Resa
all that u are suggesting i have done it already.. the ajax does call the function but instead of a 303 status it gives a 200 status... so thats how i know that the function is actually being called.. it just does not redirect to the default view.. and i have read it already :) On May 7, 11:46 am

[web2py] Re: help

2011-05-07 Thread Resa
jQuery.ajax({url:'{{=URL('insert_updatedb')}}', data: {'numBer':numBer,'totaltime':total_time,'mgp':mgp,'correct':correct}}, success: function() { {{redirect(URL(f="mathgen"))}}} what im trying to do here is after it calls update it goes to another page called mathgen

Re: [web2py] Re: help

2011-05-07 Thread pbreit
If you just want to redirect: def index(): redirect(URL('physics')) def physics() return dict() I'd highly encourage going through the Web2py Overview: http://web2py.com/book/default/chapter/03

Re: [web2py] Re: new code editor?

2011-05-07 Thread Shishir Ramam
the autocompletion (seemed to be setup only for javascript in the demo), is really cool! -shishir On Sat, May 7, 2011 at 8:13 AM, Bruno Rocha wrote: > Will replace EditArea with this? > > > On Sat, May 7, 2011 at 12:08 PM, Anthony wrote: > >> On Saturday, May 7, 2011 10:36:34 AM UTC-4, Massimo

Re: [web2py] Re: help

2011-05-07 Thread Shishir Ramam
if you are still struggling with it, please post the simplest example that exhibits the problem. -shishir On Sat, May 7, 2011 at 9:26 AM, TÅ®å ßrown wrote: > honestly its not that i prefer to do that..i just didn't know how to do > it.. i used JavaScript to call some functions in the controller

Re: [web2py] Re: help

2011-05-07 Thread TÅ®å ßrown
honestly its not that i prefer to do that..i just didn't know how to do it.. i used JavaScript to call some functions in the controller but the functions are not goin to their default view.. so i figured i had to call it manually On Fri, May 6, 2011 at 9:39 PM, pbreit wrote: > http://grizzlyweb

[web2py] Re: Can web2py support chaining response.files inside a component?

2011-05-07 Thread Iceberg
Thank you Anthony for your comments and here comes my clarification. You are right that, adding response.files within a component, has no effect at all when called by "component.load". But I still keep a copy of those response.files inside the component, because they are needed when visiting "comp

Re: [web2py] Re: new code editor?

2011-05-07 Thread Bruno Rocha
Will replace EditArea with this? On Sat, May 7, 2011 at 12:08 PM, Anthony wrote: > On Saturday, May 7, 2011 10:36:34 AM UTC-4, Massimo Di Pierro wrote: >> >> http://codemirror.net/ > > > In IE, EditArea has some weird behavior. CodeMirror seems to work in IE. >

[web2py] Re: new code editor?

2011-05-07 Thread Anthony
On Saturday, May 7, 2011 10:36:34 AM UTC-4, Massimo Di Pierro wrote: > > http://codemirror.net/ In IE, EditArea has some weird behavior. CodeMirror seems to work in IE.

[web2py] Re: Can web2py support chaining response.files inside a component?

2011-05-07 Thread Anthony
Does adding to response.files within a component controller work at all? With ajax=False, it looks like LOAD creates a new environment (and response) to run the component controller, so I'm not sure appending to response.files within a component controller will affect the response.files of the p

Re: [web2py] new code editor?

2011-05-07 Thread Vasile Ermicioi
yep I mentioned it as new good software in a post before it has about 30kb minimized (not gziped) and seems very fast, autocompletion + old good features it just doesn't support code wrapping

[web2py] Re: Can web2py support chaining response.files inside a component?

2011-05-07 Thread pbreit
Can you do something like this? js_files = [ URL(..., 'fancy_helper1.js'), URL(..., 'fancy_helper2.js'), .., URL(..., 'fancy_helper10.js'), ] def index(): response.files.extend(js_files) return {'': LOAD('default', 'skeleton.load', ajax=Fa

[web2py] Can web2py support chaining response.files inside a component?

2011-05-07 Thread Iceberg
Hi Massimo, Can web2py support chaining response.files inside a component? Scenario. def component(): response.files.extend([ URL(..., 'fancy_helper1.js'), URL(..., 'fancy_helper2.js'), .., URL(..., 'fancy_helper10.js'), ]) return {'': 'Some fa

[web2py] Re: webfaction python2.5 -> python2.6

2011-05-07 Thread robsan
Thanks Vasile, I will give it a go.

[web2py] Re: Skytoop : a web desktop like, created with Web2Py on server side

2011-05-07 Thread Alexandre Strzelewicz
Thanks for advices ! Jason, I had this idea to include a shoutcast radio widget like that http://www.di.fm/shoutcast/SHOUTcast_DI.png But shoutcast disabled it... Else there is http://kiss100.ukradioplayer.totalkiss.com/console/ but they include adds :( Syed, I continue to work on Skytoop and in

[web2py] Re: crud - delete with update permissions?

2011-05-07 Thread Anthony
Have you tried linking auth and crud (see http://web2py.com/book/default/chapter/08#Authorization-and-CRUD) with: crud.settings.auth = auth Also, you can check for specific permissions within the controller via auth.has_permission (see http://web2py.com/book/default/chapter/08#Authorization)

[web2py] crud.select() breaks since introducing crud.row()

2011-05-07 Thread Iceberg
Hi Massimo, There are typos. See the following patch, especially the last two modifications. (By the way, I am not sure about my first modified line, i.e. "self.environment = current # for backward compatibility". Some of my legacy apps uses a sub-classed Crud, which referencing the self.environm

[web2py] crud - delete with update permissions?

2011-05-07 Thread Marin
Hi web2py, here's my controller: def index(): #create forms = [] ### forms = [crud.create(db.category)] #update parentId = request.vars.cat or "0" categories = db(db.category.parent_id == parentId).select() for cat in categories: forms.append(crud.update(db.cat

[web2py] Re: CRUD.search sorting order

2011-05-07 Thread villas
Issue 264. On May 6, 5:59 pm, Massimo Di Pierro wrote: > Please open an issue in google code > > -- Forwarded message -- > From: villas > Date: May 6, 10:56 am > Subject: CRUD.search sorting order > To: web2py-users > > Hi Niknok > > I have looked at this in a little more detail

[web2py] Re: Multiuser mode issues with uploading project

2011-05-07 Thread Nico de Groot
See http://web2pyslices.com/main/slices/take_slice/125 for info on the multiuser mode, it's work in progress. Please comment and add issues. Nico

Re: [web2py] Re: spatial page load by ajax

2011-05-07 Thread Stifan Kristi
thank you so much for your hints and pointers, anthony. i admited my fault on the code, i've already corrected it and using that u've suggested but the ajax function is still not working. for components, i've already read it, i think components is not work in my case, and that i caught on that cha