Hi Russ & ringemup, Thanks for the suggestions. Those are along the lines of what I was thinking but I can't tell (yet) if there is anything wrong with the obvious solutions - that's why I was asking :) However I've also realized this is probably a pretty specific request and it is not all that likely that others have faced the same issue. To clarify my situation, although each page may have multiple versions, a set of pages will be released together. I'm looking at a separate "Version" model with name/number/ordering field, and a status/ stage field. Then theoretically I can "flip the switch" by changing the status/stage of the latest Version, and have all the "development" pages automatically turn into "production" pages (assuming some validation tests pass, etc). I think I'll also throw in an extra class so that there is a ManyToMany relationship between the Version and the Page itself - controlling the name & version link a little more, and possibly providing a simpler API to access a single list of all Pages to get the latest. Like I said though, this is probably pretty specific. I'll just have to work through it a bit. Thanks for the help, -rob
On Jun 6, 5:49 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > 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 -~----------~----~----~----~------~----~------~--~---

