Re: Automatic swapping of field data?

2009-11-19 Thread Doug Blank
On Thu, Nov 19, 2009 at 4:36 PM, Preston Holmes wrote: > There are some details left out of how you want this to look. > > The lower the level you try to make an object self protecting, the > trickier it's going to be. > > The sweet spot I think here is a custom manager that

Re: Automatic swapping of field data?

2009-11-19 Thread Preston Holmes
There are some details left out of how you want this to look. The lower the level you try to make an object self protecting, the trickier it's going to be. The sweet spot I think here is a custom manager that adds a protect filter, and perhaps a subclass of ModelForm if you need this in forms.

Automatic swapping of field data?

2009-11-18 Thread Doug Blank
Django users, I have data that needs to be handled in two different manners, depending on if the user has certain permissions or not. For example, if a record is marked "private" and a user is not permitted, I want to substitute the word "PROTECTED" for a particular field's value. Now, of course