On Sat, Oct 13, 2012 at 1:40 PM, Jonathan Vanasco <[email protected]> wrote:
> I'm migrating an old Pylons app to 1.0 ( eventually to Pyramid )
>
> I've never migrated from .9.7 to 1.x before.  I've used 1.x, but this
> migration is confusing me a bit.
>
> I've run into a few issues I'm hoping someone before me found/solved :
>
> 1. I had a lot of misc functions access the pylons.config variable .  i've
> migrated most to use the explicit pass-around, but I haven't been able to do
> that to all of them.  are there any good ways to access it when:
>
>     a - in a request
>     b - not in a request ( ie, class definition )
>
> 2. Pages don't render on 0.1.0  TypeError: No object (name: buffet) has been
> registered for this thread
>
>  Module beaker.cache:65 in get         view
>>>  return self._get_value(key, **kw).get_value()
> Module beaker.container:263 in get_value         view
>>>  v = self.createfunc()
> Module myapp.controllers.splash:33 in _index         view
>>>  return render('/splash.mako')
> Module pylons.templating:662 in render         view
>>>  return pylons.buffet.render(template_name=template, fragment=fragment,
> Module paste.registry:137 in __getattr__         view
>>>  return getattr(self._current_obj(), attr)
> Module pylons.legacy:166 in _current_obj         view
>>>  return StackedObjectProxy._current_obj(self, *args, **kwargs)
> Module paste.registry:194 in _current_obj         view
>>>  'thread' % self.____name__)
> TypeError: No object (name: buffet) has been registered for this thread
>
> 3. before i tried to migrate things under 0.1.0, i ran it under 1.0 -- and i
> got a bunch of errors about "from pylons import c" not being valid anymore.
> is this expected?

from pylons import tmpl_context as c

The name 'c' was deprecated at some point, and removed in 1.0. It was
decided that self-explanatory names were better than sticking to the
Myghty one-letter names.

Glad you got your template issue solved. I thought that was documented
somewhere, but it's been so long since 1.0 came out that I've
forgotten where.

Also see the "Pylons application maintenance" message I'm about to write.

-- 
Mike Orr <[email protected]>

-- 
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.

Reply via email to