sorry, please try again.

On Oct 8, 7:23 am, Alex Fanjul <alex.fan...@gmail.com> wrote:
> With {{=LOAD('plugin_hello',ajax=True)}}   it throws this ticket:
>
> Traceback(most recent call last):
>    
> File"E:\Downloads\Programacion\Python\web2py\devel\gluon\restricted.py",line178,inrestricted
>      execccodeinenvironment
>    
> File"E:\Downloads\Programacion\Python\web2py\devel\applications\test/views/default/index.html",line74,in<module>
>    
> File"E:\Downloads\Programacion\Python\web2py\devel\gluon\compileapp.py",line174,in__call__
>      (html.URL(r=request,c=plugin,f=function,
> UnboundLocalError:local variable'request'referenced before assignment
>
> aLex f
>
> El 05/10/2009 6:40, mdipierro escribió:
>
>
>
> > I like Alvaro work and I tried to merge it with mine. Download the
> > latest trunk and try the following:
>
> > 1) make a new app (say "test")
> > 2) edit the application test and make a new controlled called
> > "plugin_hello.py" that contains
>
> > def index():
> >       form=SQLFORM.factory(Field('your_name'))
> >       if form.accepts(request.vars,session):
> >            return "Hello "+form.vars.name
> >       else:
> >            return form.xml()
>
> > (notice in the design page in admin a new section at the bottom
> > "plugins" which is still incomplete - no upload and packaging of
> > plugins yet).
>
> > 3) edit the view for "default/index.html" and include
>
> > {{=LOAD('plugin_hello')}}
>
> > (for is embedded as Alvaro suggests)
> > 4) visithttp://..../test/default/index
>
> > 5) Now try replace
>
> > {{=LOAD('plugin_hello',ajax_trap=True)}}
>
> > and try again
> > (form is embedded but submission is done via ajax)
>
> > 6) Now replace
>
> > {{=LOAD('plugin_hello',ajax=True)}}
>
> > and try again
> > (for is loaded via ajax and submission is done via ajax).
>
> > All of this is still experimental and the exact behavior of new admin
> > plugin page and LOAD helper will need more work.
>
> > Massimo
>
> > On Oct 4, 10:18 am, Álvaro Justen [Turicas]<alvarojus...@gmail.com>
> > wrote:
>
> >> On Sat, Oct 3, 2009 at 17:33, mdipierro<mdipie...@cs.depaul.edu>  wrote:
>
> >>> Check the new admin in trunk. The edit page has a "plugins" section.
> >>> You create a plugin by creating a model or controller called plugin_
> >>> [name].py or a view called plugin_[name]/whatever.html
>
> >>> This is another experiment, not sure this is the way to go.
>
> >>> If anybody want to help we need the design action to handle plugin
> >>> upload and the plugin action to handle packing.
>
> >>> Massimo
>
> >> I have a implementation of a proof of concept for {{load
> >> 'myapp/plugin_myplugin/action'}}, it's attached.
> >> To test:
> >> - Change gluon/template.py file for thi attached.
> >> - Install this welcome app that have a very simple plugin 
> >> (plugin_testplugin).
> >> - Run web2py and go tohttp://localhost:8000/welcome/default/index
>
> >> --
> >>   Álvaro Justen
> >>   Peta5 - Telecomunicações e Software Livre
> >>   21 3021-6001 / 9898-0141
> >>  http://www.peta5.com.br/
>
> >>   web2py.app.welcome.w2p
> >> 84KViewDownload
>
> >>   template.py
> >> 9KViewDownload
>
> --
> Alejandro Fanjul Fdez.
> alex.fan...@gmail.comwww.mhproject.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to