-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
django.contrib.sites integration #130
Comments
This wouldn't work outside of a request. I can see it would be useful though — maybe even better to just expose the request to predicates, if it's available? |
Passing the request sounds much more useful, but I wouldn't want to make it a required argument. The request could be passed as a context argument however. For plain rules, the caller can provide that directly, and for permissions it's trivial to write a custom backend that forwards it. I'd happily accept a PR. |
Getting the whole request would be fantastic and I think it is the way to go. I can try to watch into it if somebody guides me into where these modifications should be made: I use rules a lot but never looked into it deeply. |
I've looked into it a bit and looks like when some view checks a permission the following happens: What I should do, if I got it right, is: Any idea/thoughts/suggestion? Thanks for the support |
Regarding the third point I tried to open a ticket on the django tracker: https://code.djangoproject.com/ticket/32255 Feel free to join the discussion |
It would be really cool to have, in the predicates, an optional "site" parameter to easily integrate with the django.contrib.sites framework
The text was updated successfully, but these errors were encountered: