Hi Jose!

I am going to face the same problem with the application I am coding,
it is a sort of CMS. I have thought about adding a boolean field
called "lock" just as you have used in the past. When a user requests
a page to edit and the lock field is not set to true, she can edit the
page otherwise the user gets a javascript modal window using Jquery
and a plugin stating that the page can be viewed but not edited, the
textarea containing the editor is then set to editable = "no". When
the user sets the page as "published" and not just saved the page, the
lock field is reset and her editor is set also to editable="no"

This is theoretical, as I am still having problems with the Javascript
library I am using and Xinha( editor) and cant test at the moment.




On Sep 6, 10:07 pm, "Jose Galvez" <[EMAIL PROTECTED]> wrote:
> Hi all, I'm hunting for advice.  I am looking for a way to "lock" a webpage
> so that only only one person at a time can edit database data.  Here is the
> scenario, I have a database with a limited number of users who have write
> access to the database, what I'd like to do is lock the editing page so that
> if one of my users is editing a page then the other users will not be able
> to edit the same page(data) at the same time.  I know that this is what
> transactions are for in a database, but what I want to avoid is two people
> looking at the same unedited data and then editing it.  I guess what I
> really want to is lock a database when I use starts editing the data.  The
> issues are:
> 1) How to make sure someone exits the edit mode nicely? what happens if they
> enter the edit page, do nothing and just close the browser, I don't what to
> leave the table locked
> 2) if the table is locked I would still like to let users view the data in
> real time, jut not edit it.
>
> I've used a "lock" table for this in the past, but the issue that I've never
> figured out is how to make sure someone still needs the lock.  Again number
> (1) from above.
>
> I hope that this makes sense, I'll be using sqlalchemy and postgres on the
> back end
>
> thanks for any and all advice
> jose


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to