These are chat archives for django/django

Jul 2015
Charles Javelona
Jul 31 2015 03:59
Hi, I am confuse as to how to prevent users into editing an article that they did not publish through url. I was already able to hide the buttons to edit or delete if they are not the owner.
How do I do this.
Mir Nazim
Jul 31 2015 05:16
@charlesakio I usually implement a method on the Model. E.g, if user is project owner Project.visible_to(self, user) method should return true of false based on what ever criteria
This is among simpler way. If you need fine grained control, you probably need somethig like django-gaurdian.
Charles Javelona
Jul 31 2015 14:10
I see, @mnazim I did consider using django-guardian, just not familiar with permissions yet.