There is nothing in web2py that will refresh the page automatically when a 
record is deleted.
But you have this code:
    specificSuggestion = db.Suggestion(request.args(0)) 

So if the record is deleted and the page is refreshed (perhaps pressing the 
refresh button) this will give an error. It should be made more failsafe.

    specificSuggestion = db.Suggestion(request.args(0,cast=int)) or 
redirect('missing_record') 

On Tuesday, 6 January 2015 17:32:04 UTC-6, Alex Glaros wrote:
>
> I had the same record up at the same time in both browsers.   So browser 2 
> had the page up and was looking at the record.   I deleted the record from 
> browser 1 while it was currently up on browser 2.
>
> Browser 2 had no way of knowing where to go after record was deleted.  The 
> record created a whole page view.
>
> The code is just regular view to display the record.
>
> The second browser tried to refresh after the record was deleted.
>
> def view_specific_suggestion():
>     vars=dict(objectCategory="suggestion")
>     db.Suggestion.id.readable = db.Suggestion.id.writable = False
>     db.Suggestion.superObjectID.readable = 
> db.Suggestion.superObjectID.writable = False
>     db.Suggestion.created_by.readable = False
>     db.Suggestion.created_by.writable = False
>     is_owner = (lambda row: row.created_by == auth.user_id) if auth.user 
> else False 
>     db.SuperObjectComment.superObjectID.readable = False
>     db.SuperObjectComment.superObjectID.writable = False 
>     specificSuggestion = db.Suggestion(request.args(0)) 
>     SuggestionHeader = specificSuggestion.suggestionTitle 
>     objectComments = db(db.SuperObjectComment.superObjectID == 
> specificSuggestion.superObjectID).select() 
>     db.SuperObjectComment.superObjectID.default = 
> specificSuggestion.superObjectID
>     form = crud.create(db.SuperObjectComment) 
>     return locals()
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to