The JSONRpcViewMapper was never supported for classes. However in
pyramid_rpc 0.3 which was released last week it ships with a default view
mapper that works well with classes, as well as a whole new API for defining
the views that allows other things such as permissions.
--
Michael
--
You rec
It's not incorrect, I just merged two thoughts which probably made it
unclear. If he doesn't specify a ``traverse`` parameter then traversal will
not happen, which will use a similar RootFactory to what I showed except
that he might want to raise a HTTPNotFound if the ``page`` is None. The rest
of
On Mon, 2011-09-05 at 15:50 -0500, Michael Merickel wrote:
> Brian, I just want to clarify some points from your original email.
>
>
> Specifying the ``factory`` on the route is telling the traversal
> system how to get the root of your resource tree for that specific
> route. Thus in your exampl
Brian, I just want to clarify some points from your original email.
Specifying the ``factory`` on the route is telling the traversal system how
to get the root of your resource tree for that specific route. Thus in your
example you might do:
def PageFactory(request):
pagename = request.matchd
Just as a followup, I thought I'd mention that we released pyramid_rpc 0.3
last week which revamped the API completely. When using add_jsonrpc_endpoint
you can specify a factory which will be used for security. That factory can
then set the ``__acl__`` based on the ``request.rpc_method`` property,
On Mon, 2011-09-05 at 12:44 -0700, Brian wrote:
> Chris,
>
> Thanks for the reply. One more question...
>
> Is it acceptable for __acl__ to be a callable associated with an
> instance?
>
> def __acl__(self):
> return [
> (Allow, 'user:%s' % self.owner, 'edit'),
> ]
No, it must be an at
>> .. as per the document you linked. Maybe something needs to be jiggled
>> in the nginx config to pass along the port in the host header too?
>> Apache does this by default, IIRC, so not quite sure.
>
> Yeah, I guess that is what I need to look for. Ideas, anyone?
Just found this in the nginx
Chris,
Thanks for the reply. One more question...
Is it acceptable for __acl__ to be a callable associated with an
instance?
def __acl__(self):
return [
(Allow, 'user:%s' % self.owner, 'edit'),
]
Thanks,
Brian
--
You received this message because you are subscribed to the Google Gro
> Sounds like you need the nginx equivalent of Apache's
> "ProxyPreserveHost". That seems to be:
>
>proxy_set_headerHost $host;
I do have that instruction in the nginx conf file but obviously that does not
suffice.
> .. as per the document you linked. Maybe something needs
On Mon, 2011-09-05 at 08:26 -0700, Sascha Boch wrote:
> Hi there,
>
> I followed the example on the following page to deploy my app using
> nginx:
>
> https://docs.pylonsproject.org/projects/pyramid_cookbook/dev/deployment.html#nginx-paster-supervisord
>
> The problem is that I need to use a dif
On Thu, 2011-09-01 at 06:30 -0700, Brian wrote:
> I'm in the early stages of designing a my first Pyramid app and I was
> hoping for some verification on my approach to instance level
> authorization. Most of the stock documentation discusses global ACLs
> which apply to an entire class, not indivi
Hi there,
I followed the example on the following page to deploy my app using
nginx:
https://docs.pylonsproject.org/projects/pyramid_cookbook/dev/deployment.html#nginx-paster-supervisord
The problem is that I need to use a different port than port 80 for
the outside world. In my configuration, N
I'm in the early stages of designing a my first Pyramid app and I was
hoping for some verification on my approach to instance level
authorization. Most of the stock documentation discusses global ACLs
which apply to an entire class, not individual instances of that
class. Consider a simple CMS whic
13 matches
Mail list logo