fixed, try now,
thank you guys for feedback
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
Input boxes are a form. I'd suggest doing it in the usual way:
http://web2py.com/book/default/chapter/07#Forms-and-redirection
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
http://8plus2.org/init/static/bolteditor/index.html currently throws a 502
error.
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'
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
>
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
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
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}}
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
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
##
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
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
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.
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
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
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
##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
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
##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
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
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
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
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'))
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.
When i try a view, it gives me an error about inavlid function
(default/whatever)...how to resolve this
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
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
so if the next view is default/other.html
it would be redirect(URL('other'))?
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]:
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
I want after the user clicks the submit button that he/she gets
redirect to a different view how do i do that?
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
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
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():
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
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
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
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
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
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
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
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
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.
>
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.
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
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
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
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
Thanks Vasile, I will give it a go.
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
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)
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
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
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
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
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
58 matches
Mail list logo