Re: Update a model using UpdateView

2012-10-10 Thread Stefano Tranquillini
Ok thx. it make sense and does not seem too complex (as the others look like ;) ). On Wednesday, October 10, 2012 1:17:08 PM UTC+2, Kurtis wrote: > > By the way, that 'owner' field would be something like this: > > owner = ForeignKey(User) > > And in my example, I use the Form to make sure the O

Re: Update a model using UpdateView

2012-10-10 Thread Kurtis Mullins
By the way, that 'owner' field would be something like this: owner = ForeignKey(User) And in my example, I use the Form to make sure the Owner is set properly. On Wed, Oct 10, 2012 at 7:14 AM, Kurtis Mullins wrote: > You've got it. I included an 'owner' field on any model that I wanted to > sho

Re: Update a model using UpdateView

2012-10-10 Thread Kurtis Mullins
You've got it. I included an 'owner' field on any model that I wanted to show ownership with. This is actually not too insanely hard as you could make a Parent Model or Mixin to make things easier. Another option is to use something like django-guardian to handle all of your permissions. However,

Re: Update a model using UpdateView

2012-10-10 Thread Stefano Tranquillini
Thanks. one question: this works great if you are modifying user data. in fact, you do the checking qs = super(RequestUpdateView, self).get_queryset() return qs.filter(owner=self.request.user) now. let's image i've a form (call it Task) that must be updated by someone (or a group of u