I have an idea. Instead of a 'message' parameter, there could be a
on_success, on_error callable parameter in the function. I don't know
what the parameters to the callback would be, but this is the rough
idea:
def on_error(request, ?other parameters?):
request.session['message] = "Not saved:"
...
def on_success(request, ?other parameters?):
request.session['message'] = "Saved"
...
def create_job(request):
return create_object(request, model=Job, post_save_redirect='/',
login_required=True, on_error=on_error, on_success=on_success)
I don't know. Just an idea
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---