django when edit the data from data base -
i tryong edit data database getting error @ update_user_id more info please @ link u understood please
http://www.pastie.org/1301839
it seems didn't set update_user_id
key in session. can work around problem using exceptions:
try: update_user_id = request.session["update_user_id"] except keyerror: update_user_id = some_default_value
or (even better) using request.session.get
:
update_user_id = request.session.get("update_user_id", some_default_value)
the 2 snippets equivalent.
Comments
Post a Comment