On 6/6/07, oggie rob <[EMAIL PROTECTED]> wrote: > > Hi all, > I have some models and need to add the capability of versioning the > data. Basically for each object that represents a page, I want to have > a "running" version and an "editing" version of the same page, so that > users can see the "approved" version yet I can work on a newer one.
Is there something wrong with the obvious solution - put a 'version' attribute on the model definition? The 'editing' version is MAX(version), and the 'running' version is MAX(version)-1. Set up your urlpatterns so that your /production and /development views filter out the appropriate version ID, and provide some helper functions to get or create a new editing version. Alternatively, if you want to be able to maintain multiple editing versions, use two fields; a boolean (approved), and an auto_add_now datefield. The published version is the most recently modified approved object. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

