On Oct 25, 3:44 pm, Christophe Pettus <x...@thebuild.com> wrote:
> On Oct 25, 2012, at 8:26 AM, Mike Burr wrote:
>
> > I know there are DBMS-specific ways of doing this. I know that there
> > are Django ways of making fields read-only. What I cannot find is a
> > way to make a table/model append-only.
>
> You can always override the .save() method to check to see if the pk field is 
> None, and refuse to save if it is not:

Good. I'll consider it.

>
>        
> https://docs.djangoproject.com/en/1.4/topics/db/models/#overriding-pr...
>
> That being said, this kind of thing is *much* better done at the DB level, so 
> that you can be certain that there are no other paths that allow data to be 
> updated.

I agree. Now that I think of it, I will probably wait until this goes
into production (MySQL) and implement it therehow.

Many thanks.

-Mike.

>
> --
> -- Christophe Pettus
>    x...@thebuild.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to