zacharyvoase/dagny — Issue #6: Dagny and django-guardian
Author: rlander
Created: 2011-10-19 02:06:39+00:00
State: open

Hello!

First, thanks to Dagny writing django views is not a chore anymore. Thank you for this fine piece of code.

I'm trying to use dagny in conjunction with django-guardian, but it doesn't seem to be working. I'm using a decorator from guardian called permission_required_or_403 wich has the following signature:

@action.deco(permission_required_or_403('edit_post', (models.Post, 'post__slug', 'slug'))))

where 'edit_post' is the permission, models.Post is the model to which the permission is attached, 'post_slug' the field and finally 'slug' is the parameter that is passed by the url.

I'm getting the following error:

GuardianError: Argument slug was not passed into view function

I checked the source code in "/dagny/action.py" but I wasn't able to debug it. Other decorators like "login_required" work normally.

Here's the full method:

http://pastie.org/2721422

Here's the full trace:

http://pastie.org/2721407

Thanks!