Here is my easy_install pth fine so you can see what version of what I have
installed:
import sys; sys.__plen = len(sys.path)
#./setuptools-0.6c6-py2.5.egg
./paste-1.4-py2.5.egg
./pastescript-1.3.5-py2.5.egg
./pastedeploy-1.3.1-py2.5.egg
./mako-0.1.8-py2.5.egg
./myghtyutils-0.52-py2.5.egg
./nose-0.9.3-py2.5.egg
./simplejson-1.7.1-py2.5.egg
./formencode-0.7.1-py2.5.egg
./myghty-1.1-py2.5.egg
./decorator-2.1.0-py2.5.egg
./beaker-0.7.4-py2.5.egg
./webhelpers-0.3.1-py2.5.egg
./routes-1.7-py2.5.egg
./pylons-0.9.6rc2dev_r2256-py2.5.egg
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:];
p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert =
p+len(new)
On 7/16/07, Jose Galvez <[EMAIL PROTECTED]> wrote:
>
> Sure,
> First I was testing with pylons-0.9.6rc2dev_r2256-py2.5.egg
>
> The project was created with pylons 0.9.4.1 and then converted after
> installing rc2 using overwrite the test project was not installed using
> easy_install simply created and run from the created egg
>
> my controller is:
> from rc.lib.base import *
>
> class MainController(BaseController):
> def index(self):
> res = Response()
> res.write('hello world')
> return res
>
> def template(self):
> return render_response('/main.html')
>
>
> when I run http://localhost:5000/main I get
> [image: Warning] Warning, your browser does not support JavaScript so you
> will not be able to use the interactive debugging on this page.
>
> full traceback <http://localhost:5000/main#full_traceback>
> URL: http://localhost:5000/main
> Module pylons.error:*245* in respond <http://localhost:5000/main#>
> << <http://localhost:5000/main#> *try** :*
> __traceback_supplement__ *=* Supplement*,* self*,* environ
> app_iter *=* self*.*application*(*environ* ,*
> detect_start_response*)*
> *try**:*
> return_iter *=* list*(*app_iter*)* >>
> <http://localhost:5000/main#>app_iter *=* self*.*application*(*environ*,*
> detect_start_response
> *)*
> Module pylons.wsgiapp:*291* in __call__ <http://localhost:5000/main#>
> << <http://localhost:5000/main#> *def* *__call__**(**self**,* *environ
> **,* *start_response**)**:*
> environ*[*'pylons.environ_config'*]* *=* self*.* econf
> *return* self*.*app*(*environ*,* start_response *)*>>
> <http://localhost:5000/main#>*return* self*.*app*(*environ*,*
> start_response*)*
> Module beaker.cache:*180* in __call__ <http://localhost:5000/main#>
> << <http://localhost:5000/main#>
> environ['paste.registry'].register(
> self.cache, self.cache_manager)
> environ[self.environ_key] = self.cache_manager
> return self.app(environ, start_response)>>
> <http://localhost:5000/main#> *return* self*.*app*(*environ*,*
> start_response*)*
> Module beaker.session:*393* in __call__ <http://localhost:5000/main#>
> << <http://localhost:5000/main#> return start_response(status,
> headers, exc_info)
> try:
> response = self.wrap_app(environ, session_start_response)
> except:
> ty, val = sys.exc_info()[:2]>>
> <http://localhost:5000/main#> response *=* self*.*wrap_app*(*environ*,*
> session_start_response*)*
> Module routes.middleware:*104* in __call__
> <http://localhost:5000/main#>
> << <http://localhost:5000/main#> environ['SCRIPT_NAME'] =
> environ['SCRIPT_NAME'][:-1]
>
> response = self.app(environ, start_response)
> del config.environ
> del self.mapper.environ>> <http://localhost:5000/main#>response
> *=* self*.*app*(*environ*,* start_response*)*
> Module pylons.wsgiapp:*88* in __call__ <http://localhost:5000/main#>
> << <http://localhost:5000/main#>
> controller *=* self*.*resolve*(*environ*,* start_response *)*
> response *=* self*.*dispatch*(*controller*,* environ*,*
> start_response*)*
>
> *if* 'paste.testing_variables' *in* environ *and* hasattr*(*
> response*,* >> <http://localhost:5000/main#>response *=* self*.*dispatch*
> (*controller*,* environ *,* start_response*)*
> Module pylons.wsgiapp:*214* in dispatch <http://localhost:5000/main#>
> << <http://localhost:5000/main#> # Controller is assumed to handle
> a WSGI call
> log.debug("Calling controller class with WSGI interface")
> return controller(environ, start_response)
>
> def load_test_env(self, environ):>> <http://localhost:5000/main#>
> * return* controller*(*environ*,* start_response*)*
> Module rc.lib.base:*23* in __call__ <http://localhost:5000/main#>
> << <http://localhost:5000/main#> # request is routed to. This
> routing information is available in
> # environ['pylons.routes_dict']
> *return* WSGIController*.*__call__*(*self*,* environ*,*
> start_response*)*
>
> # Include the '_' function in the public names
> >> <http://localhost:5000/main#>*return* WSGIController*.*__call__*(*
> self*,* environ*,* start_response*)*
> Module pylons.controllers:*212* in __call__
> <http://localhost:5000/main#>
> << <http://localhost:5000/main#> return response(environ,
> start_response)
>
> response = self._dispatch_call()
> if not start_response_called:
> # If its not a WSGI response, and we have content, it
> needs to >> <http://localhost:5000/main#>response *=* self*.*
> _dispatch_call*(**)*
> Module pylons.controllers:*167* in _dispatch_call
> <http://localhost:5000/main#>
> << <http://localhost:5000/main#> req.environ['
> pylons.action_method' ] = func
>
> response = self._inspect_call(func)
> else:
> log.debug("Couldn't find '%s' method to handle response",
> action) >> <http://localhost:5000/main#>response *=* self*.*_inspect_call
> *(*func*)*
> Module pylons.controllers:*133* in _inspect_call
> <http://localhost:5000/main#>
> << <http://localhost:5000/main#> func *.*__name__*,*
> args*)*
> *try**:*
> result *=* func*(*****args*)*
> log*.*debug*(*"'%s' method returned a response"*,* func *.
> *__name__*)*
> *except* HTTPException*,* httpe*:* >>
> <http://localhost:5000/main#>result *=* func*(*****args*)*
> Module rc.controllers.main:*5* in index <http://localhost:5000/main#>
> << <http://localhost:5000/main#>*class* *MainController**(**
> BaseController**)**:*
> *def* *index**(**self**)**:*
> res *=* Response*(**)*
> res*.*write*(*'hello world'*)*
> *return* res >> <http://localhost:5000/main#>res *=* Response
> *(**)*
> *<type 'exceptions.NameError'>: global name 'Response' is not defined*
>
> and if I run http://localhost:5000/main/template I get
>
> URL: http://localhost:5000/main/template
> Module pylons.error:*245* in respond
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> *try* *:*
> __traceback_supplement__ *=* Supplement*,* self*,* environ
> app_iter *=* self*.*application*(*environ* ,*
> detect_start_response*)*
> *try**:*
> return_iter *=* list*(*app_iter*)* >>
> <http://localhost:5000/main/template#>app_iter *=* self*.*application*(*
> environ*,* detect_start_response *)*
> Module pylons.wsgiapp:*291* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> *def* *__call__**(**self**,*
> *environ**,* *start_response**)**:*
> environ*[*'pylons.environ_config'*]* *=* self*.* econf
> *return* self*.*app*(*environ*,* start_response *)*>>
> <http://localhost:5000/main/template#>*return* self*.*app*(*environ*,*
> start_response*)*
> Module beaker.cache:*180* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> environ['
> paste.registry'].register( self.cache, self.cache_manager)
> environ[self.environ_key] = self.cache_manager
> return self.app(environ, start_response)>>
> <http://localhost:5000/main/template#> *return* self*.*app*(*environ*,*
> start_response*)*
> Module beaker.session:*393* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> return
> start_response(status, headers, exc_info)
> try:
> response = self.wrap_app(environ, session_start_response)
> except:
> ty, val = sys.exc_info()[:2]>>
> <http://localhost:5000/main/template#> response *=* self*.*wrap_app*(*
> environ*,* session_start_response*)*
> Module routes.middleware:*104* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#>
> environ['SCRIPT_NAME'] = environ['SCRIPT_NAME'][:-1]
>
> response = self.app(environ, start_response)
> del config.environ
> del self.mapper.environ>>
> <http://localhost:5000/main/template#> response *=* self*.*app*(*environ*,
> * start_response*)*
> Module pylons.wsgiapp:*88* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#>
> controller *=* self*.*resolve*(*environ*,* start_response *)*
> response *=* self*.*dispatch*(*controller*,* environ*,*
> start_response*)*
>
> *if* 'paste.testing_variables' *in* environ *and* hasattr*(*
> response*,* >> <http://localhost:5000/main/template#>response *=* self*.*
> dispatch*(*controller*,* environ *,* start_response*)*
> Module pylons.wsgiapp:*214* in dispatch
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> # Controller is assumed
> to handle a WSGI call
> log.debug("Calling controller class with WSGI interface")
> return controller(environ, start_response)
>
> def load_test_env(self, environ):>>
> <http://localhost:5000/main/template#> *return* controller*(*environ*,*
> start_response*)*
> Module rc.lib.base:*23* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> # request is routed to.
> This routing information is available in
> # environ['pylons.routes_dict']
> *return* WSGIController*.*__call__*(*self*,* environ*,*
> start_response*)*
>
> # Include the '_' function in the public names
> >> <http://localhost:5000/main/template#>*return* WSGIController*.*
> __call__*(*self*,* environ*,* start_response*)*
> Module pylons.controllers:*212* in __call__
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> return
> response(environ, start_response)
>
> response = self._dispatch_call()
> if not start_response_called:
> # If its not a WSGI response, and we have content, it
> needs to >> <http://localhost:5000/main/template#>response *=* self*.*
> _dispatch_call*(**)*
> Module pylons.controllers:*167* in _dispatch_call
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> req.environ['
> pylons.action_method' ] = func
>
> response = self._inspect_call(func)
> else:
> log.debug("Couldn't find '%s' method to handle response",
> action) >> <http://localhost:5000/main/template#>response *=* self*.*
> _inspect_call*(*func*)*
> Module pylons.controllers:*133* in _inspect_call
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#> func*.*
> __name__*,* args*)*
> *try**:*
> result *=* func*(*****args*)*
> log*.*debug*(*"'%s' method returned a response"*,* func *.
> *__name__*)*
> *except* HTTPException*,* httpe*:* >>
> <http://localhost:5000/main/template#>result *=* func*(*****args*)*
> Module rc.controllers.main:*10* in template
> <http://localhost:5000/main/template#>
> << <http://localhost:5000/main/template#>
> *def* *template**(**self**)**:*
> *return* render_response*(*'/main.html'*)* >>
> <http://localhost:5000/main/template#>*return* render_response*(*
> '/main.html'*)*
> *<type 'exceptions.NameError'>: global name 'render_response' is not
> defined*
> full traceback text
> version<http://localhost:5000/main/template#long_text_version>
>
>
> On 7/16/07, Ben Bangert <[EMAIL PROTECTED]> wrote:
> >
> > On Jul 16, 2007, at 11:30 AM, jose wrote:
> >
> > > Well I just tried using render_response and it generates an error not
> > > a warning, so I looks like I may have to migrate my projects anyway,
> > > not a huge deal just something to work on. I think I'll do my
> > > migration within a working env and then just port the new build once I
> > > know it works rather then upgrade my existing code base all at once.
> >
> > There shouldn't be errors using render_response, can you post the
> > traceback of what happened?
> >
> > Cheers,
> > Ben
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---