I am not sure I understand, I think you want to archive a model
instance? or put another way, when the model is no longer active or
useful to the user, you would essentially like to treat that database
record differently than other records.  In that case, you could simply
change the archived field to a boolean, set true on it when you
archive it, and the modified field would automatically record the
date.  Then all you have to do is filter out all of the archived or
non archived models via Assessment.objects.filter(archived__exact =
True) or = False.  This would make your views much easier to customize
as would only be dealing with one model.
hth,
-richard

On Aug 10, 7:40 pm, Carlos Hanson <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> I have a model which I would like to archive.  My thought was to
> extend that model with one additional DateTimeField called archived.
> But I am having difficulty saving an instance of the archived object
> based on an existing object.
>
> class Assessment(models.Model):
>     student = models.ForeignKey(Student)
>     created = models.DateTimeField(auto_now_add=True, editable=False)
>     modified = models.DateTimeField(auto_now=True, editable=False)
>     background = models.TextField(blank=True)
>     ...
>
> class ArchivedAssessment(Assessment):
>     archived = models.DateTimeField(auto_now_add=True, editable=False)
>
> I am working within the admin interface and creating a view to take
> the saved Assessment and save it as an ArchivedAssessment.  It seems
> like it should be relatively easy to do, but I am not seeing how.
> I've been learning about and playing with Manipulators for a couple
> hours now.
>
> Any suggestions?
>
> Carlos Hanson


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to